import Magix from 'magix' import View from '../../../../view' Magix.applyStyle('@./chance-analysis.less') export default View.extend({ tmpl: '@chance-analysis.html', init (options) { this.options = options }, render () { const { crowd, inputType, inputKey } = this.options this.updater.digest({ crowd, inputType, inputKey }) }, async 'confirm' (e) { this.updater.digest({ loading: true }) const vf = await this.waitVframeCreated(Magix.Vframe.get(`${this.id}_onekeyputin`)) const result = await vf.invoke('check') this.updater.digest({ loading: false }) if (result.ok) { this.alert('成功提示', '恭喜,人群投放成功', () => { this.options.close() }) } else { this.alert('错误提示', result.msg) } }, 'cancel' (e) { this.options.close() } })