zhaojs
2023-05-19 51121a6c9eaf9bdd04bf11ce591ca3e2d0903d81
uniapp/pages/login/wxlogin.vue
@@ -62,6 +62,32 @@
               })
            }
         },
         targetToIndex(e)
         {
            var that = this;
            that.login(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)
         },
         wxlogin() {
            var that = this;
            if (this.isread) {
@@ -80,20 +106,7 @@
                                 if (e.code != 0) return that.$alert(e.msg)
                                 var res = e.data;
                                 if(res.type == 'goUser'){
                                    that.login(e.data.userinfo);
                                    that.$alert('登录成功')
                                    setTimeout(function() {
                                       if (res.userinfo.isPwd ==
                                          'N') {
                                          uni.redirectTo({
                                             url: './setPass'
                                          })
                                       } else {
                                          uni.switchTab({
                                             url: '../index/index'
                                          })
                                       }
                                    }, 1000)
                                    this.targetToIndex(e);
                                 }else if(res.type == 'bindMobile'){
                                    uni.navigateTo({
                                       url: "./bindingPhone?wx="+encodeURIComponent(JSON.stringify(res.info))