refund.page.js 819 Bytes
const Vue = require('vue');
const lazyload = require('vue-lazyload');
const bus = require('plugin/vue-bus');
const refund = require('home/refund/refund.vue').default;
const vueFilter = require('plugin/vue-filter');
const yohoApp = require('yoho-app');

/**
 * 发射提交表单事件
 */
function subRefundForm() {
    bus.$emit('subRefundForm');
}

if (yohoApp && yohoApp.isMarsApp) {
    yohoApp.ready(function() {
        yohoApp.addNativeMethod('subRefundForm', subRefundForm);
        yohoApp.invokeMethod('set.topRightButton', {
            name: '提交',
            callback: 'subRefundForm()'
        });
    });
}

Vue.use(vueFilter);
Vue.use(lazyload, { preLoad: 3 });

new Vue({
    el: '#refund',
    components: {
        refund
    }
});

$('.yoho-header').find('.nav-btn').on('click', subRefundForm);