import Magix from 'magix' import View from 'dmp-new/view' Magix.applyStyle('@./insight.less') export default View.extend({ tmpl: '@insight.html', init(options) { this.options = options }, async render() { // const loc = Magix.Router.parse() const statisticalTypes = [ { text: '曝光人数占比', value: '3' }, { text: 'DEEPLINK资产加深率', value: '1' }, { text: '点击率', value: '2' } ] const { mountedCallback } = this.options const statisticalTypesMap = Magix.toMap(statisticalTypes, 'value') const { type = statisticalTypes[0].value } = this.updater.get() this.updater.digest({ params: { ...this.options, statisticalTypesMap }, type, statisticalTypes }) // 模块请求完毕回调通知外面,加载下一个模块 mountedCallback && mountedCallback() } })