Merge remote-tracking branch 'origin/master' into master

# Conflicts:
#	src/setting.js
dev_2022-05-11
yujialong 3 years ago
commit 6cbd22e378
  1. 2
      src/main.js
  2. 7
      src/pages/account/login/index.vue

@ -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,14 +122,15 @@ export default {
if (valid) {
this.loginForm.distinguish = Number(this.activeName);
this.$post(this.api.logins, this.loginForm).then(res => {
util.local.set(Setting.tokenKey, res.data.token, Setting.tokenExpires);
this.queryCustomer();
}).catch(res => {
if (res && res.status == 30001) {
this.phoneVisible = true;
}
this.getVerImg();
this.loginForm.code = "";
util.local.set(Setting.tokenKey, res.data.token, Setting.tokenExpires);
this.queryCustomer();
}).catch(res => {
});
} else {
return util.errorMsg("请检查表单数据");

Loading…
Cancel
Save