🎉 登录部门切换可配置是否开启

dev
smallchill 4 years ago
parent 061c9dd97e
commit 53614e9669
  1. 1
      src/config/website.js
  2. 19
      src/page/login/userlogin.vue

@ -11,6 +11,7 @@ export default {
tenantMode: true, // 是否开启租户模式
tenantId: "000000", // 管理组租户编号
captchaMode: true, // 是否开启验证码模式
switchMode: true, // 是否开启部门切换模式
lockPage: '/lock',
tokenTime: 3000,
tokenHeader: 'Blade-Auth',

@ -226,15 +226,18 @@
spinner: "el-icon-loading"
});
this.$store.dispatch("LoginByUsername", this.loginForm).then(() => {
const deptId = this.userInfo.dept_id;
const roleId = this.userInfo.role_id;
if (deptId.includes(",") || roleId.includes(",")) {
this.loginForm.deptId = deptId;
this.loginForm.roleId = roleId;
this.userBox = true;
} else {
this.$router.push({path: this.tagWel.value});
if (this.website.switchMode) {
const deptId = this.userInfo.dept_id;
const roleId = this.userInfo.role_id;
if (deptId.includes(",") || roleId.includes(",")) {
this.loginForm.deptId = deptId;
this.loginForm.roleId = roleId;
this.userBox = true;
loading.close();
return false;
}
}
this.$router.push({path: this.tagWel.value});
loading.close();
}).catch(() => {
loading.close();

Loading…
Cancel
Save