const Magix = require('magix') const $ = require('$') module.exports = { async getPreRunData (params) { const _params = $.extend(true, { currentPage: 1, pageSize: 10 }, params) try { const models = [{ name: 'api_operation_crowd_package_$id_result_get', pathParams: [this.options.data.id, 'result'], params: _params }] const [model] = await this.fetch(models) const data = model.get('data', {}) return data } catch (error) { this.alert('错误提示', error.msg || error.message) throw error } // return d.promise() } }