Commit 3bfe6f3c by xiongyuwen

no message

parent 962770a7
......@@ -78,17 +78,19 @@ export default {
{
this.$router.push(`/category`);
}else{
this.code = this.getQueryVariable("code");
this.state = this.getQueryVariable("state");
if (preurl) {
this.preurl = preurl;
}
if (this.code) {
if (!!this.code) {
this.getStaffInfo(this.code);
} else {
this.pcwxgetCode();
this.createCode();
this.create4kCode();
this.pcwxgetCode();
}
if (this.forums && this.forums.set_site && this.forums.set_site.site_mode) {
this.site_mode = this.forums.set_site.site_mode;
......@@ -245,10 +247,11 @@ export default {
});
},
getStaffInfo(code) {
let _this=this;
let url=`https://discuz.bailuntec.com/api/login?code=${code}&state=${this.state}`
//this.$message.warning(url);
axios
.get(
`https://discuz.bailuntec.com/api/login?code=${code}&state=${this.state}`
url
)
.then((res) => {
this.userId = res.data.data.relationships.users.data.id;
......@@ -273,7 +276,9 @@ export default {
}
}
}
});
}).catch((err) => {
this.$message.warning(err+url);
});
},
getQueryVariable(variable) {
var query = window.location.search.substring(1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment