From 6f0ba034182411a8790fc9e9cc7685089b793a98 Mon Sep 17 00:00:00 2001 From: xiongchengqiang Date: Wed, 20 May 2020 17:01:36 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E5=91=98=E5=B7=A5=E6=A6=82=E5=86=B5loading?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/staff/profile/index.vue | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/views/modules/staff/profile/index.vue b/src/views/modules/staff/profile/index.vue index 44e7355..f366c08 100644 --- a/src/views/modules/staff/profile/index.vue +++ b/src/views/modules/staff/profile/index.vue @@ -51,7 +51,16 @@ export default { }, methods: { async handleGetEmployeessItuation (data = {}) { + const loading = this.$loading({ + lock: true, + text: 'Loading', + spinner: 'el-icon-loading', + background: 'rgba(0, 0, 0, 0.7)' + }) let result = await apiEmployeessItuation(data) + setTimeout(() => { + loading.close() + }, 500) console.log('result: ', result) if (result.code === 0) { this.dataInfo = result.data @@ -61,14 +70,7 @@ export default { }, // 获取页面数据 async initData () { - const loading = this.$loading({ - lock: true, - text: 'Loading', - spinner: 'el-icon-loading', - background: 'rgba(0, 0, 0, 0.7)' - }) await this.handleGetEmployeessItuation() - loading.close() }, submit (data) { this.handleGetEmployeessItuation(data)