diff --git a/src/main.js b/src/main.js index 4d783c7..719d2d7 100644 --- a/src/main.js +++ b/src/main.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({ diff --git a/src/pages/account/login/index.vue b/src/pages/account/login/index.vue index 481069b..008fc94 100644 --- a/src/pages/account/login/index.vue +++ b/src/pages/account/login/index.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("请检查表单数据");