Bläddra i källkod

前端修改

wulanhaote
庞东旭 3 år sedan
förälder
incheckning
59bb7beb85
4 ändrade filer med 53 tillägg och 23 borttagningar
  1. +10
    -0
      src/api/interaction/index.js
  2. +0
    -7
      src/views/index.vue
  3. +26
    -3
      src/views/interaction/index.vue
  4. +17
    -13
      src/views/notice/index.vue

+ 10
- 0
src/api/interaction/index.js Visa fil

@@ -0,0 +1,10 @@
import request from '@/utils/request'

//互动交流
export function interactionList(query) {
return request({
url: '/website/communicateList',
method: 'get',
params: query
})
}

+ 0
- 7
src/views/index.vue Visa fil

@@ -93,17 +93,13 @@ export default {
this.queryParams.number = 2 ;
this.queryParams.pageSize = 5 ;
newList(this.queryParams).then(response => {
console.log(response);
for (var i = 0; i < response.rows.length; i++) {
this.newList.push(response.rows[i]);
var imgStrs = response.rows[i].content.match(/<IMG src=\"([^\"]*?)\">/gi)
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));
}
}
console.log(this.newList)
if(this.newList.length >= response.total){
this.finished = true;
return;
@@ -117,13 +113,10 @@ export default {
this.queryParams.number = 1 ;
this.queryParams.pageSize = 5 ;
newList(this.queryParams).then(response => {
console.log(response);
this.bannerList = response.rows;
for (var i = 0; i < response.rows.length; i++) {
var imgStrs = response.rows[i].content.match(/<IMG src=\"([^\"]*?)\">/gi)
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));
}
}


+ 26
- 3
src/views/interaction/index.vue Visa fil

@@ -44,6 +44,7 @@
</template>

<script>
import { interactionList } from "@/api/interaction/index";
export default {
name: "notice",
data() {
@@ -51,11 +52,33 @@ export default {
//是否显示加载
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>



+ 17
- 13
src/views/notice/index.vue Visa fil

@@ -26,8 +26,8 @@
<van-tab title="选项">
<template #title><van-icon name="records" size="18" style="top: 4px"/>鉴证公告</template>
<van-list
v-model="loading1"
:finished="finished1"
v-model="attestationLoading"
:finished="attestationFinished"
finished-text="没有更多了"
style="margin-top: 10px;"
@load="getAttestationList"
@@ -54,16 +54,24 @@ export default {
//是否滚动到底部
finished: false,
//是否显示加载
loading1: false,
attestationLoading: false,
//是否滚动到底部
finished1: false,
attestationFinished: false,
//成交公告集合
noticeList:[],
//鉴证公告集合
attestationList:[],
//查询参数
//成交公告查询参数
queryParams: {
deptId:100,
pageNum:1,
pageSize:10
},
//鉴证公告查询参数
attestationQueryParams: {
deptId:100,
pageNum:1,
pageSize:10
},
};
},
@@ -75,9 +83,7 @@ export default {
getList(){
this.loading = true;
noticeList(this.queryParams).then(response => {
console.log(response);
this.noticeList = response.rows;
console.log(this.noticeList)
if(this.noticeList.length >= response.total){
this.finished = true;
return;
@@ -88,17 +94,15 @@ export default {
},
//鉴证公告集合
getAttestationList(){
this.loading = true;
Attestation(this.queryParams).then(response => {
console.log(response);
this.attestationLoading = true;
Attestation(this.attestationQueryParams).then(response => {
this.attestationList = response.rows;
console.log(this.attestationList)
if(this.attestationList.length >= response.total){
this.finished = true;
this.attestationFinished = true;
return;
}
this.queryParams.pageNum += 1 ;
this.loading = false;
this.attestationLoading = false;
});
},
},


Laddar…
Avbryt
Spara