登录失败,项目之前改过 appid之后 改回来 为啥会登陆失败了?
发布于 7 年前 作者 liyao 14618 次浏览 来自 官方Issues
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){
            //TODO handle the exception
            wx.showModal({
                title: 'TODO',
                content: 'TODO,TODO'+e
            })
        }
 
 
    }
}).catch(e => {
    console.log(e)
    wx.showModal({
        title: '164',
        content: '164,e'+e.toString()
    })
})
console.log('------------')
3 回复

这不够清楚吗?

code的问题 检查下代码 是不是哪里改错了

回到顶部