Blame view

public/js/home/refund-exchange.page.js 809 Bytes
郭成尧 authored
1 2
const Vue = require('vue');
const lazyload = require('vue-lazyload');
王水玲 authored
3
const exchange = require('home/exchange/exchange.vue').default;
郭成尧 authored
4 5
const bus = require('plugin/vue-bus');
const yohoApp = require('yoho-app');
郭成尧 authored
6 7 8 9 10

require('plugin/vue-filter')(Vue);

Vue.use(lazyload, { preLoad: 3 });
郭成尧 authored
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
/**
 * 发射提交表单事件
 */
function subExchangeForm() {
    bus.$emit('subExchangeForm');
}

if (yohoApp && yohoApp.isMarsApp) {
    yohoApp.ready(function() {
        yohoApp.addNativeMethod('subExchangeForm', subExchangeForm);
        yohoApp.invokeMethod('set.topRightButton', {
            name: '提交',
            callback: 'subExchangeForm()'
        });
    });
}
yyq authored
28 29 30 31 32 33
new Vue({
    el: '#exchange',
    components: {
        exchange
    }
});
郭成尧 authored
34 35

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