Commit 12002f62 by 无尘

fix: 更新loading

parent ca6f73c9
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2020-09-08 17:11:02
* @LastEditors: 无尘
* @LastEditTime: 2020-12-21 10:28:25
* @LastEditTime: 2020-12-22 10:19:42
-->
<template>
<div class="app-detail" v-loading="loading">
......@@ -102,7 +102,6 @@ export default {
const that = this;
that.loading = true;
getAppDetail({ menuId, applicationId }).then(res => {
that.loading = false;
const { applicationName, applicationDesc, applicationVersion, overTime, adminRange, storeAdminRange, applicationLogo, serverId } = res.result || {};
that.appData.expirationDate = new Date().getTime() - overTime; // 到期时间
that.appData.expirationDay = overTime - new Date().getTime(); // 剩余到期天数
......
<template>
<div class="app-list">
<div class="app-list" v-loading="loading">
<template v-for="(item, index) in appList">
<div v-if="!!item.applications && item.applications.length" class="m-b-50" :key="index+'cate'">
<h3 class="page-title">{{item.applicationCategoryName || '--'}}</h3>
......@@ -43,7 +43,8 @@ export default {
name: 'AppList',
data() {
return {
appList: []
appList: [],
loading: false
};
},
created() {
......@@ -52,9 +53,10 @@ export default {
},
methods: {
getAppList() {
this.loading = true;
getAppList().then(res => {
this.appList = res.result || [];
});
}).finally(() => this.loading = false);
},
/**
* @description: 进入后台
......
......@@ -4,10 +4,10 @@
* @Author: 无尘
* @Date: 2020-10-16 11:46:25
* @LastEditors: 无尘
* @LastEditTime: 2020-10-30 14:39:37
* @LastEditTime: 2020-12-22 10:16:46
-->
<template>
<div class="app-market-body">
<div class="app-market-body" v-loading="loading">
<div class="app-market-account">
<el-tooltip class="item" effect="dark" content="绑定服务市场账号后可购买应用。购买信息在服务市场可查看。" placement="top-start"> <span class="font-16 color-303133 font-w-600 common-bottom-border">服务市场账号</span></el-tooltip>
<el-button :class="['m-l-20 bind-btn-add', marketAccount.accountId ? 'bind-btn-hide': 'bind-btn-show']" type="primary" @click="addAcount">添加</el-button>
......@@ -48,7 +48,8 @@ export default {
bindTime: '',
bindName: ''
},
showDialog: false
showDialog: false,
loading: false
};
},
// 生命周期 - 挂载完成(访问DOM元素)
......@@ -81,6 +82,7 @@ export default {
*/
getMarket() {
const that = this;
that.loading = true;
const para = {
};
getMarketAccount(para)
......@@ -89,7 +91,8 @@ export default {
})
.catch(function(error) {
});
})
.finally(() => that.loading = false);
}
},
watch: {}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment