chrome中报错:errorHandler TypeError: Global.on_launch is not a function
App.vue 中代码:
const Global = require('./config/global');
export default {
onLaunch: function () {
Global.on_launch();
},
onShow: function () {
console.log('App Show');
},
onHide: function () {
console.log('App Hide');
}
}
global.vue 中代码:
const api = require('./api');
export default {
on_launch: function() {
//每次检查登录状态
this.token = wx.getStorageSync('token');
this.userInfo = wx.getStorageSync('userInfo');
//this.app_signin();
}
}
1 个回复
l***@outlook.com (作者)
改成
就好了,问题关闭谢谢