How does VUE log in using QQJS SDK?

VUE single page application will automatically close if you add a callback page to the script tag

if you don"t add it, use window.close () to close the QQ pop-up window in the code, and you won"t continue to execute the following code

.

QQlogin () {

      let that = this;
      QC.Login({  
          btnId:"qqLogin",
      }, function(reqData, opts){  
          //  
          let name = reqData.nickname
          let headimg = reqData.figureurl_2;
          if(QC.Login.check()){  
              //QQ  
              QC.Login.getMe(function(openId, accessToken){  
                  that.thirdLogin(openId,name,headimg)
              });  
          }  
      })
   },
   thirdLogin (openid,nick,headimg) {
          QC.Login.signOut(); 
          this.$axios.post("thirdLogin",{
            openid:openid,
            nick:nick,
            headimg:headimg
          })
          .then((re)=>{
            let res = re.data.data;
            let money = res.money == null ? 0 : res.money;
            this.$store.commit("setAllParam",[
                false,
                res.id,
                res.tel,
                res.headimg,
                res.companyId,
                res.nick,
                res.nick,
                money
              ]) 
             this.$router.push({path:decodeURIComponent(this.$store.state.url)});
             window.close();
          })
       }
    }

part of the code asks for help. Thank you


have you worked it out now? can you teach me

Menu