Commit 8dc17740 by 田爽

闪动优化

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