diff --git a/src/components/common/header.vue b/src/components/common/header.vue index 8571fb3..4872c03 100644 --- a/src/components/common/header.vue +++ b/src/components/common/header.vue @@ -192,543 +192,510 @@ diff --git a/src/pages/yyyfLogin.vue b/src/pages/yyyfLogin.vue index 9909ada..89bc795 100644 --- a/src/pages/yyyfLogin.vue +++ b/src/pages/yyyfLogin.vue @@ -10,6 +10,7 @@ import {FILE_URL} from '@/api/app'; import {signIn} from '@/api/yyyf'; import {Loading} from 'element-ui'; + export default { name: 'yyyfLogin', props: {}, @@ -21,39 +22,35 @@ }, computed: {}, - - created() { this.startLoading(); let params = this.parseUrl(); //判断是否来自以渔有方 - if (!$.isEmptyObject(params) &¶ms.userId != undefined && params.reqType != undefined) { + if (!$.isEmptyObject(params) && params.userId != undefined && params.reqType != undefined) { this.loginFromYyyf(params); - }else{ - let self=this; + } else { this.$alert('参数错误', '提示', { - type:'error', - showClose:false, + type: 'error', + showClose: false, confirmButtonText: '确定', confirmButtonClass: 'btn-self-style', callback: action => { - self.closeWindow() + this.closeWindow() } }); } - }, methods: { startLoading: function () { //使用Element loading-start 方法 this.loading = Loading.service({ lock: true, - text: '初始化登录1ing...', + text: '初始化登录ing...', background: 'rgba(204, 0, 0, 0.7)' - }) + }); }, endLoading: function () { //使用Element loading-close 方法 - loading.close() + this.loading.close() }, parseUrl: function () { let params = {}; //定义数组 @@ -88,8 +85,6 @@ signIn(params).then(res => { // console.log(res); if (res.data.code === 200) { - debugger; - this.loading = false; //保存登录的token到cookie // Cookie.set('token', res.data.data.token); localStorage.setItem('yyyfToken', res.data.data.yyyfUserToken); @@ -100,8 +95,13 @@ this.endLoading() location.href = '/'; } else { - //this.loading = false; - this.$message.warning(res.data.msg); + self.$message.warning({ + message: res.data.msg, + onClose: function () { + this.closeWindow(); + } + }); + } }); }, @@ -120,8 +120,8 @@