refund.page.js 815 Bytes
import Vue from 'vue';
import refund from 'vues/home/refund/refund.vue';
const lazyload = require('vue-lazyload');
const bus = require('js/plugin/vue-bus');
const vueFilter = require('js/plugin/vue-filter');
const yohoApp = require('js/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);