define(['jquery', 'bootstrap', 'backend', 'form'], function ($, undefined, Backend, Form) { return { index: function () { new Vue({ el: '#splitConfigIndex', data: { form: { split_enable: '0', split_mode: 'wechat', split_provider: 'auto', delay_acct_enable: '0', split_timing: 'payed', split_amount_source: 'mixed', split_max_rate: '30', platform_receiver_account: '', platform_huifu_id: '', platform_receiver_name: '平台' } }, mounted() { Fast.api.ajax({ url: 'shopro/split/config/index', type: 'GET' }, (ret, res) => { this.form = Object.assign(this.form, res.data || {}); return false; }); }, methods: { save() { Fast.api.ajax({ url: 'shopro/split/config/save', type: 'POST', data: { row: this.form } }); } } }); } }; });