zhaojs
2023-05-26 802501cb668f2962c0daab7ecbd1489844284b77
uniapp/pages/login/bindingPhone.vue
@@ -103,6 +103,33 @@
               })
            }
         },
         targetToIndex(e)
         {
            var that = this;
            that.login(e.data.userinfo);
            utils.setCache('userInfo', e.data.userinfo)
            getApp().globalData.userInfo = e.data.userinfo
            that.$alert('登录成功')
            setTimeout(function(){
               console.log(e.data.userinfo)
               if(!e.data.userinfo.invitation_code)
               {
                  uni.redirectTo({
                     url: './setInviteCode'
                  })
               }
               else if (e.data.userinfo.isPwd == 'N') {
                  uni.redirectTo({
                     url: './setPass'
                  })
               } else {
                  uni.switchTab({
                     url: '../index/index'
                  })
               }
            },1000)
         },
         bindMobile(){
            var that = this;
            if(!this.hasLogin && this.wxUser != ""){
@@ -113,7 +140,8 @@
               }).then(e => {
                  console.log(e)
                  if (e.code != 0) return that.$alert(e.msg)
                  that.login(e.data.userinfo);
                  this.targetToIndex(e);
                  /* that.login(e.data.userinfo);
                  that.$alert('登录成功')
                  setTimeout(function() {
                     if (e.data.userinfo.isPwd ==
@@ -126,7 +154,7 @@
                           url: '../index/index'
                        })
                     }
                  }, 1000)
                  }, 1000) */
               }).catch(function (err) {
                  console.log(err)
               })