|
@@ -240,16 +240,20 @@ export default {
|
|
|
.then(async (res) => {
|
|
|
console.log("res", res);
|
|
|
let _data = res.data[0][0];
|
|
|
+ let userjson = await getUser({userid: _data.userid})
|
|
|
+ console.log('userjson', userjson);
|
|
|
if (_data.active === 1) {
|
|
|
window.localStorage["identity"] = JSON.stringify(_data.identity);
|
|
|
this.$message.success("登录成功");
|
|
|
await this.login();
|
|
|
- this.$router.push({ path: this.redirect || "/" });
|
|
|
+ if(userjson.data[0][0].type == 1 && userjson.data[0][0].role == 1 && userjson.data[0][0].rrole == 1 ){
|
|
|
+ this.$router.push({ path: "/kanban" });
|
|
|
+ }else {
|
|
|
+ this.$router.push({ path: this.redirect || "/" });
|
|
|
+ }
|
|
|
} else {
|
|
|
this.$message.error("登录失败");
|
|
|
}
|
|
|
- let userjson = await getUser({userid: _data.userid})
|
|
|
- console.log('userjson', userjson);
|
|
|
this.loading = false;
|
|
|
})
|
|
|
.catch((e) => {
|
|
@@ -289,6 +293,8 @@ export default {
|
|
|
.then(async (res) => {
|
|
|
console.log("res", res);
|
|
|
let _data = res.data[0][0];
|
|
|
+ let userjson = await getUser({userid: _data.userid})
|
|
|
+ console.log('userjson', userjson);
|
|
|
if (_data.active === 1) {
|
|
|
await this.$ajax.post(API_CONFIG.baseUrl2 + "UpdateOpenId", [
|
|
|
{ userid: _data.userid, openid: this.openid },
|
|
@@ -296,12 +302,15 @@ export default {
|
|
|
window.localStorage["identity"] = JSON.stringify(_data.identity);
|
|
|
this.$message.success("绑定成功");
|
|
|
await this.login();
|
|
|
- this.$router.push({ path: this.redirect || "/" });
|
|
|
+ if(userjson.data[0][0].type == 1 && userjson.data[0][0].role == 1 && userjson.data[0][0].rrole == 1 ){
|
|
|
+ this.$router.push({ path: "/kanban" });
|
|
|
+ }else {
|
|
|
+ this.$router.push({ path: this.redirect || "/" });
|
|
|
+ }
|
|
|
} else {
|
|
|
this.$message.error("绑定失败");
|
|
|
}
|
|
|
- let userjson = await getUser({userid: _data.userid})
|
|
|
- console.log('userjson', userjson);
|
|
|
+
|
|
|
this.loading = false;
|
|
|
})
|
|
|
.catch((e) => {
|
|
@@ -430,17 +439,21 @@ export default {
|
|
|
}
|
|
|
window.sessionStorage.setItem('org2',this.org2)
|
|
|
}
|
|
|
-
|
|
|
+ let userjson = await getUser({userid: _data.userid})
|
|
|
+ console.log('userjson', userjson);
|
|
|
if (_data.active === 1) {
|
|
|
window.localStorage["identity"] = JSON.stringify(_data.identity);
|
|
|
this.$message.success("登录成功");
|
|
|
await this.login();
|
|
|
- this.$router.push({ path: this.redirect || "/" });
|
|
|
+ if(userjson.data[0][0].type == 1 && userjson.data[0][0].role == 1 && userjson.data[0][0].rrole == 1 ){
|
|
|
+ this.$router.push({ path: "/kanban" });
|
|
|
+ }else {
|
|
|
+ this.$router.push({ path: this.redirect || "/" });
|
|
|
+ }
|
|
|
} else {
|
|
|
this.$message.error("登录失败");
|
|
|
}
|
|
|
- let userjson = await getUser({userid: _data.userid})
|
|
|
- console.log('userjson', userjson);
|
|
|
+
|
|
|
|
|
|
this.loading = false;
|
|
|
})
|