修改登录时后台报30001未弹出窗口bug

dev_2022-05-11
e 3 years ago
parent b34d2fc3db
commit 74f80e65ce
  1. 2
      src/main.js
  2. 11
      src/pages/account/login/index.vue
  3. 4
      src/setting.js

@ -39,7 +39,7 @@ Vue.prototype.auth = function(values){
// 直接拿值进行匹配,取得当前router的mate信息,传入,返回一个boolean,以此进行vif判断
// router.meta 信息匹配传进来的value,用vif去进行按钮级权限配置即可。
// $router.currentRoute.meta
console.log(router.currentRoute.meta,'当前路由的按钮权限数组')
// console.log(router.currentRoute.meta,'当前路由的按钮权限数组')
return router.currentRoute.meta.btn.some(e=>e===values)
}
new Vue({

@ -122,17 +122,18 @@ export default {
if (valid) {
this.loginForm.distinguish = Number(this.activeName);
this.$post(this.api.logins, this.loginForm).then(res => {
if (res && res.status == 30001) {
this.phoneVisible = true;
}
this.getVerImg();
this.loginForm.code = "";
util.local.set(Setting.tokenKey, res.data.token, Setting.tokenExpires);
let redirect = this.$route.query.redirect ? decodeURIComponent(this.$route.query.redirect) : "/index";
this.$router.replace(redirect);
util.successMsg("登录成功");
this.queryCustomer();
}).catch(res => {
if (res && res.status == 30001) {
this.phoneVisible = true;
}
this.getVerImg();
this.loginForm.code = "";
});
} else {
return util.errorMsg("请检查表单数据");

@ -36,9 +36,9 @@ if (isHh) {
} else if (isDev) {
jumpPath = "http://192.168.31.154:8087/";
// host = "http://39.108.250.202:9000/"; // 中台测试服
host = "http://192.168.31.151:9000/"; // 榕
// host = "http://192.168.31.151:9000/"; // 榕
// host = "http://192.168.31.125:9000/"; // 坤
// host = 'http://192.168.31.137:9000/'; // 赓
host = 'http://192.168.31.137:9000/'; // 赓
title = "职站服务端管理系统";
} else {
console.log("其它版本");

Loading…
Cancel
Save