refund-exchange.page.js
801 Bytes
const Vue = require('vue');
const lazyload = require('vue-lazyload');
const exchange = require('home/exchange/exchange.vue');
const bus = require('plugin/vue-bus');
const yohoApp = require('yoho-app');
require('plugin/vue-filter')(Vue);
Vue.use(lazyload, { preLoad: 3 });
/**
* 发射提交表单事件
*/
function subExchangeForm() {
bus.$emit('subExchangeForm');
}
if (yohoApp && yohoApp.isMarsApp) {
yohoApp.ready(function() {
yohoApp.addNativeMethod('subExchangeForm', subExchangeForm);
yohoApp.invokeMethod('set.topRightButton', {
name: '提交',
callback: 'subExchangeForm()'
});
});
}
new Vue({
el: '#exchange',
components: {
exchange
}
});
$('.yoho-header').find('.nav-btn').on('click', subExchangeForm);