Commit 8dc17740 by 田爽

闪动优化

parent bd269db5
......@@ -42,9 +42,6 @@ export default {
computed: {
routes() {},
},
beforeCreate() {
Loading.service({customClass: 'el-loading-custom-class'});
},
created() {
this.InfoFn();
},
......@@ -67,11 +64,13 @@ export default {
if(JSON.parse(localStorage.getItem('isList'+this.id)) && JSON.parse(localStorage.getItem('isList'+this.id)) == 1){
listRes = localStorage.getItem('msg'+this.id) ? JSON.parse(localStorage.getItem('msg'+this.id)) : null
} else {
Loading.service({customClass: 'el-loading-custom-class'});
const params = {
id: this.id,
token:this.$route.query.token ||''
};
listRes = await this.$api.news.announInfo(params);
Loading.service().close();
}
const { returnCode, data ,returnMsg} = listRes;
if (returnCode === "0" && data !=null) {
......@@ -103,7 +102,6 @@ export default {
this.$message.error(returnMsg)
}
this.loading=false
Loading.service().close();
},
},
};
......
......@@ -214,9 +214,6 @@ export default {
]
};
},
beforeCreate() {
Loading.service({customClass: 'el-loading-custom-class'});
},
created() {
this.InfoFn();
// if(JSON.parse(localStorage.getItem('isList'+this.id)) && JSON.parse(localStorage.getItem('isList'+this.id)) == 1){
......@@ -260,11 +257,13 @@ export default {
if(JSON.parse(localStorage.getItem('isList'+this.id)) && JSON.parse(localStorage.getItem('isList'+this.id)) == 1){
listRes = localStorage.getItem('msg'+this.id) ? JSON.parse(localStorage.getItem('msg'+this.id)) : null
} else {
Loading.service({customClass: 'el-loading-custom-class'});
const params = {
id: this.id,
token:this.$route.query.token ||''
};
listRes = await this.$api.news.newsInfo(params);
Loading.service().close();
}
const { returnCode, data ,returnMsg} = listRes;
if (returnCode === "0" && data !=null) {
......@@ -299,7 +298,7 @@ export default {
this.$message.error(returnMsg)
}
this.loading=false
Loading.service().close();
// Loading.service().close();
},
// getBreadcrumb(classId){
......
......@@ -162,9 +162,6 @@ export default {
sharesinastring: null,
};
},
beforeCreate() {
Loading.service({customClass: 'el-loading-custom-class'});
},
created() {
this.InfoFn();
this.newsTop10();
......@@ -187,11 +184,13 @@ export default {
if(JSON.parse(localStorage.getItem('isList'+this.id)) && JSON.parse(localStorage.getItem('isList'+this.id)) == 1){
listRes = localStorage.getItem('msg'+this.id) ? JSON.parse(localStorage.getItem('msg'+this.id)) : null
} else {
Loading.service({customClass: 'el-loading-custom-class'});
const params = {
id: this.id,
token:this.$route.query.token ||''
};
listRes = await this.$api.news.jcspiInfo(params);
Loading.service().close();
}
const { returnCode, data ,returnMsg} = listRes;
if (returnCode === "0" && data !=null) {
......@@ -227,7 +226,6 @@ export default {
this.$message.error(returnMsg)
}
this.loading=false
Loading.service().close();
},
// top列表
async newsTop10() {
......
......@@ -96,9 +96,6 @@ export default {
},
},
beforeCreate() {
Loading.service({customClass: 'el-loading-custom-class'});
},
created() {
this.InfoFn();
},
......@@ -130,11 +127,13 @@ export default {
if(JSON.parse(localStorage.getItem('isList'+this.id)) && JSON.parse(localStorage.getItem('isList'+this.id)) == 1){
listRes = localStorage.getItem('msg'+this.id) ? JSON.parse(localStorage.getItem('msg'+this.id)) : null
} else {
Loading.service({customClass: 'el-loading-custom-class'});
const params = {
id: this.id,
token:this.$route.query.token ||''
};
listRes = await this.$api.news.newsTopicInfo(params);
Loading.service().close();
}
const { returnCode, data ,returnMsg} = listRes;
if (returnCode === "0" && data !=null) {
......
......@@ -158,6 +158,7 @@ export default {
list-style: disc;
border-bottom: 1px dashed #eee;
font-size: 14px;
cursor: pointer;
}
.main-list li a {
......
......@@ -188,6 +188,7 @@ export default {
list-style: disc;
border-bottom: 1px dashed #eee;
font-size: 14px;
cursor: pointer;
}
.main-list li a {
......
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