|
|
@@ -88,13 +88,12 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
- this.onLoad()
|
|
|
+ this.pageNotice()
|
|
|
this.homeData()
|
|
|
},
|
|
|
methods: {
|
|
|
async homeData() {
|
|
|
const res = await homeData({ operatorId: 1 })
|
|
|
- console.log(res)
|
|
|
this.homeList = res.data
|
|
|
},
|
|
|
async pageNews() {
|
|
|
@@ -103,14 +102,13 @@ export default {
|
|
|
if (this.newsform.pageNum == 1) {
|
|
|
this.newsList = res.data.records
|
|
|
} else {
|
|
|
- console.log(this.newsList, '1')
|
|
|
this.newsList = this.newsList.concat(res.data.records)
|
|
|
}
|
|
|
- this.newsform.pageNum = this.newsform.pageNum + 1
|
|
|
+
|
|
|
if (this.newsList.length >= res.data.total) {
|
|
|
this.finished = true
|
|
|
} else {
|
|
|
- this.finished = false
|
|
|
+ this.newsform.pageNum = this.newsform.pageNum + 1
|
|
|
}
|
|
|
},
|
|
|
async pageNotice() {
|
|
|
@@ -121,11 +119,10 @@ export default {
|
|
|
} else {
|
|
|
this.noticeList = this.noticeList.concat(res.data.records)
|
|
|
}
|
|
|
- this.noticeform.pageNum = this.noticeform.pageNum + 1
|
|
|
if (this.noticeList.length >= res.data.total) {
|
|
|
this.finished = true
|
|
|
} else {
|
|
|
- this.finished = false
|
|
|
+ this.noticeform.pageNum = this.noticeform.pageNum + 1
|
|
|
}
|
|
|
},
|
|
|
async pagePolicy() {
|
|
|
@@ -134,14 +131,12 @@ export default {
|
|
|
if (this.policyform.pageNum == 1) {
|
|
|
this.policyList = res.data.records
|
|
|
} else {
|
|
|
- console.log(this.policyList, '1')
|
|
|
this.policyList = this.policyList.concat(res.data.records)
|
|
|
}
|
|
|
- this.policyform.pageNum = this.policyform.pageNum + 1
|
|
|
if (this.policyList.length >= res.data.total) {
|
|
|
this.finished = true
|
|
|
} else {
|
|
|
- this.finished = false
|
|
|
+ this.policyform.pageNum = this.policyform.pageNum + 1
|
|
|
}
|
|
|
},
|
|
|
onLoad() {
|
|
|
@@ -154,6 +149,8 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
changeTab() {
|
|
|
+ this.loading = false
|
|
|
+ this.finished = false
|
|
|
if (this.active == 0) {
|
|
|
this.noticeform.pageNum = 1
|
|
|
this.pageNotice()
|