提交 8d69d84d 编写于 作者: huangwensu's avatar huangwensu

任务列表添加loading

上级 f0f3b8e5
......@@ -8,8 +8,8 @@
xmlns:xlink="http://www.w3.org/1999/xlink"
x="0px"
y="0px"
width="40"
height="40"
width="80"
height="80"
viewBox="0 0 60 60"
style="enable-background:new 0 0 80 80;"
xml:space="preserve"
......@@ -53,6 +53,6 @@
svg path,
svg rect {
fill: #449284;
fill: #aaa;
}
</style>
......@@ -44,6 +44,7 @@
</div>
</div>
</div>
<loading v-if="loadingFlag"></loading>
</div>
</template>
......@@ -52,8 +53,12 @@
import { getNewActivityDesc } from '@/service';
// const cookies = require('cookie-universal')();
import { setCookie, getCookie, delCookie } from '@/utils/index';
import loading from '../components/bussiness/common-loading';
export default {
name: 'TaskActivity',
components: {
loading
},
props: {
acTempId: {
type: Number | String,
......@@ -86,6 +91,7 @@ export default {
},
data() {
return {
loadingFlag: false,
taskList: [],
status: true,
statusText: '去完成',
......@@ -146,7 +152,7 @@ export default {
},
// 活动详情
getNewActivityDesc() {
let self = this;
this.loadingFlag = true;
let req = null;
let {acTempId, acToken} = this;
req = {
......@@ -154,6 +160,7 @@ export default {
token: getCookie('token')
}
getNewActivityDesc({ id: req.id, token: req.token }).then(res => {
this.loadingFlag = false;
if(res.code == '000000') {
if(res.data.loginStatus == 2) { // 未登录 或者token失效
delCookie('token');
......
......@@ -172,7 +172,7 @@ export default {
let param = {
mobile: this.mobilePhone,
authCode: this.authCode,
id: this.userId,
id: this.userId.replace(/\s/g,'+'),
taskId: this.taskId,
activityId: this.activityId
};
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册