session.wxlogin().then(res => {
if (utils.isEmptyObj(res.user)) {
app.globalData.needReg = true
$ this .showSplash()
} else {
try {
app.globalData.needReg = false
$ this .show()
let id = e.currentTarget.id
let path = "" ;
if (id == 'chengzhong' ) {
path = '/pages/weight/weight'
} else if (id == 'dianshu' ) {
path = '/pages/count/count'
}
wx.switchTab({
url: path
})
} catch (e){
wx.showModal({
title: 'TODO' ,
content: 'TODO,TODO' +e
})
}
}
}). catch (e => {
console.log(e)
wx.showModal({
title: '164' ,
content: '164,e' +e.toString()
})
})
console.log( '------------' )
|
code的问题 检查下代码 是不是哪里改错了
无效的code
这不够清楚吗?