@@ -0,0 +1,10 @@ | |||||
import request from '@/utils/request' | |||||
//互动交流 | |||||
export function interactionList(query) { | |||||
return request({ | |||||
url: '/website/communicateList', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} |
@@ -93,17 +93,13 @@ export default { | |||||
this.queryParams.number = 2 ; | this.queryParams.number = 2 ; | ||||
this.queryParams.pageSize = 5 ; | this.queryParams.pageSize = 5 ; | ||||
newList(this.queryParams).then(response => { | newList(this.queryParams).then(response => { | ||||
console.log(response); | |||||
for (var i = 0; i < response.rows.length; i++) { | for (var i = 0; i < response.rows.length; i++) { | ||||
this.newList.push(response.rows[i]); | this.newList.push(response.rows[i]); | ||||
var imgStrs = response.rows[i].content.match(/<IMG src=\"([^\"]*?)\">/gi) | var imgStrs = response.rows[i].content.match(/<IMG src=\"([^\"]*?)\">/gi) | ||||
if (imgStrs != null && imgStrs != '') { | if (imgStrs != null && imgStrs != '') { | ||||
console.log(imgStrs[0].length-2) | |||||
console.log(imgStrs[0]) | |||||
this.newList[i].img = imgStrs[0].substr(10,(imgStrs[0].length-12)); | this.newList[i].img = imgStrs[0].substr(10,(imgStrs[0].length-12)); | ||||
} | } | ||||
} | } | ||||
console.log(this.newList) | |||||
if(this.newList.length >= response.total){ | if(this.newList.length >= response.total){ | ||||
this.finished = true; | this.finished = true; | ||||
return; | return; | ||||
@@ -117,13 +113,10 @@ export default { | |||||
this.queryParams.number = 1 ; | this.queryParams.number = 1 ; | ||||
this.queryParams.pageSize = 5 ; | this.queryParams.pageSize = 5 ; | ||||
newList(this.queryParams).then(response => { | newList(this.queryParams).then(response => { | ||||
console.log(response); | |||||
this.bannerList = response.rows; | this.bannerList = response.rows; | ||||
for (var i = 0; i < response.rows.length; i++) { | for (var i = 0; i < response.rows.length; i++) { | ||||
var imgStrs = response.rows[i].content.match(/<IMG src=\"([^\"]*?)\">/gi) | var imgStrs = response.rows[i].content.match(/<IMG src=\"([^\"]*?)\">/gi) | ||||
if (imgStrs != null && imgStrs != '') { | if (imgStrs != null && imgStrs != '') { | ||||
console.log(imgStrs[0].length-2) | |||||
console.log(imgStrs[0]) | |||||
this.bannerList[i].img = imgStrs[0].substr(10,(imgStrs[0].length-12)); | this.bannerList[i].img = imgStrs[0].substr(10,(imgStrs[0].length-12)); | ||||
} | } | ||||
} | } | ||||
@@ -44,6 +44,7 @@ | |||||
</template> | </template> | ||||
<script> | <script> | ||||
import { interactionList } from "@/api/interaction/index"; | |||||
export default { | export default { | ||||
name: "notice", | name: "notice", | ||||
data() { | data() { | ||||
@@ -51,11 +52,33 @@ export default { | |||||
//是否显示加载 | //是否显示加载 | ||||
loading: false, | loading: false, | ||||
//是否滚动到底部 | //是否滚动到底部 | ||||
finished: true, | |||||
finished: false, | |||||
//查询参数 | |||||
queryParams: { | |||||
deptId:100, | |||||
pageNum:1, | |||||
pageSize:10 | |||||
}, | |||||
//数据集合 | |||||
interactionList:[], | |||||
}; | }; | ||||
}, | }, | ||||
mounted() {}, | |||||
methods: {}, | |||||
created() {}, | |||||
methods: { | |||||
//成交公告集合 | |||||
getList(){ | |||||
this.loading = true; | |||||
interactionList(this.queryParams).then(response => { | |||||
this.interactionList = response.rows; | |||||
if(this.interactionList.length >= response.total){ | |||||
this.finished = true; | |||||
return; | |||||
} | |||||
this.queryParams.pageNum += 1 ; | |||||
this.loading = false; | |||||
}); | |||||
}, | |||||
}, | |||||
}; | }; | ||||
</script> | </script> | ||||
@@ -26,8 +26,8 @@ | |||||
<van-tab title="选项"> | <van-tab title="选项"> | ||||
<template #title><van-icon name="records" size="18" style="top: 4px"/>鉴证公告</template> | <template #title><van-icon name="records" size="18" style="top: 4px"/>鉴证公告</template> | ||||
<van-list | <van-list | ||||
v-model="loading1" | |||||
:finished="finished1" | |||||
v-model="attestationLoading" | |||||
:finished="attestationFinished" | |||||
finished-text="没有更多了" | finished-text="没有更多了" | ||||
style="margin-top: 10px;" | style="margin-top: 10px;" | ||||
@load="getAttestationList" | @load="getAttestationList" | ||||
@@ -54,16 +54,24 @@ export default { | |||||
//是否滚动到底部 | //是否滚动到底部 | ||||
finished: false, | finished: false, | ||||
//是否显示加载 | //是否显示加载 | ||||
loading1: false, | |||||
attestationLoading: false, | |||||
//是否滚动到底部 | //是否滚动到底部 | ||||
finished1: false, | |||||
attestationFinished: false, | |||||
//成交公告集合 | //成交公告集合 | ||||
noticeList:[], | noticeList:[], | ||||
//鉴证公告集合 | //鉴证公告集合 | ||||
attestationList:[], | attestationList:[], | ||||
//查询参数 | |||||
//成交公告查询参数 | |||||
queryParams: { | queryParams: { | ||||
deptId:100, | deptId:100, | ||||
pageNum:1, | |||||
pageSize:10 | |||||
}, | |||||
//鉴证公告查询参数 | |||||
attestationQueryParams: { | |||||
deptId:100, | |||||
pageNum:1, | |||||
pageSize:10 | |||||
}, | }, | ||||
}; | }; | ||||
}, | }, | ||||
@@ -75,9 +83,7 @@ export default { | |||||
getList(){ | getList(){ | ||||
this.loading = true; | this.loading = true; | ||||
noticeList(this.queryParams).then(response => { | noticeList(this.queryParams).then(response => { | ||||
console.log(response); | |||||
this.noticeList = response.rows; | this.noticeList = response.rows; | ||||
console.log(this.noticeList) | |||||
if(this.noticeList.length >= response.total){ | if(this.noticeList.length >= response.total){ | ||||
this.finished = true; | this.finished = true; | ||||
return; | return; | ||||
@@ -88,17 +94,15 @@ export default { | |||||
}, | }, | ||||
//鉴证公告集合 | //鉴证公告集合 | ||||
getAttestationList(){ | getAttestationList(){ | ||||
this.loading = true; | |||||
Attestation(this.queryParams).then(response => { | |||||
console.log(response); | |||||
this.attestationLoading = true; | |||||
Attestation(this.attestationQueryParams).then(response => { | |||||
this.attestationList = response.rows; | this.attestationList = response.rows; | ||||
console.log(this.attestationList) | |||||
if(this.attestationList.length >= response.total){ | if(this.attestationList.length >= response.total){ | ||||
this.finished = true; | |||||
this.attestationFinished = true; | |||||
return; | return; | ||||
} | } | ||||
this.queryParams.pageNum += 1 ; | this.queryParams.pageNum += 1 ; | ||||
this.loading = false; | |||||
this.attestationLoading = false; | |||||
}); | }); | ||||
}, | }, | ||||
}, | }, | ||||