|
@@ -1,24 +1,25 @@
|
|
<template>
|
|
<template>
|
|
<!-- pages/me.wxml -->
|
|
<!-- pages/me.wxml -->
|
|
<view class="container">
|
|
<view class="container">
|
|
- <uni-search-bar @confirm="search" :focus="true" v-model="searchValue" @blur="search" @input="search"
|
|
|
|
|
|
+ <uni-search-bar :focus="true" v-model="searchValue" @input="search"
|
|
style="width: 100%;"
|
|
style="width: 100%;"
|
|
@cancel="cancel">
|
|
@cancel="cancel">
|
|
</uni-search-bar>
|
|
</uni-search-bar>
|
|
<view class="rnwdList">
|
|
<view class="rnwdList">
|
|
<view class="list" @tap="goDetails(item)" v-for="(item, index1) in qbwd" :key="index1">
|
|
<view class="list" @tap="goDetails(item)" v-for="(item, index1) in qbwd" :key="index1">
|
|
|
|
+ <span v-if="index1 < 3" style="color: red;">[置顶]</span>
|
|
<span class="listTitle">{{ item.titleName }}</span>
|
|
<span class="listTitle">{{ item.titleName }}</span>
|
|
|
|
|
|
- <view class="onePic" v-if="item.urls.length == 1">
|
|
|
|
|
|
+ <view class="onePic" v-if="index1 >2 ? item.urls.length == 1 : false ">
|
|
<image :src="loadImgSrc(item.urls[index2])" v-for="(v, index2) in item.urls" :key="index2">
|
|
<image :src="loadImgSrc(item.urls[index2])" v-for="(v, index2) in item.urls" :key="index2">
|
|
</image>
|
|
</image>
|
|
</view>
|
|
</view>
|
|
- <view class="twoPic" v-if="item.urls.length == 2">
|
|
|
|
|
|
+ <view class="twoPic" v-if="index1 >2 ? item.urls.length == 2 : false">
|
|
<image :src="loadImgSrc(item.urls[index2])" v-for="(v, index2) in item.urls" :key="index2">
|
|
<image :src="loadImgSrc(item.urls[index2])" v-for="(v, index2) in item.urls" :key="index2">
|
|
</image>
|
|
</image>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
- <view class="threePic" v-if="item.urls.length == 3">
|
|
|
|
|
|
+ <view class="threePic" v-if="index1 >2 ? item.urls.length == 3 : false">
|
|
<image :src="loadImgSrc(item.urls[index2])" v-for="(v, index2) in item.urls" :key="index2">
|
|
<image :src="loadImgSrc(item.urls[index2])" v-for="(v, index2) in item.urls" :key="index2">
|
|
</image>
|
|
</image>
|
|
</view>
|
|
</view>
|
|
@@ -62,17 +63,23 @@ export default {
|
|
pageNum: 1,
|
|
pageNum: 1,
|
|
pageSize: 7,
|
|
pageSize: 7,
|
|
titleName: '',
|
|
titleName: '',
|
|
- type: 11,
|
|
|
|
|
|
+ type: 12,
|
|
flag:''
|
|
flag:''
|
|
},
|
|
},
|
|
|
|
+ topList:[],
|
|
total:0,
|
|
total:0,
|
|
searchValue:''
|
|
searchValue:''
|
|
};
|
|
};
|
|
},
|
|
},
|
|
created(){
|
|
created(){
|
|
- this.getList()
|
|
|
|
// 查置顶
|
|
// 查置顶
|
|
- listWx({}).then(e => {
|
|
|
|
|
|
+ listWx({
|
|
|
|
+ type:12,
|
|
|
|
+ isTop:1
|
|
|
|
+ }).then(e => {
|
|
|
|
+ this.topList = e.data
|
|
|
|
+ this.qbwd = this.topList
|
|
|
|
+ this.getList()
|
|
})
|
|
})
|
|
},
|
|
},
|
|
onReachBottom(){
|
|
onReachBottom(){
|
|
@@ -90,12 +97,15 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods:{
|
|
methods:{
|
|
|
|
+ cancel(){
|
|
|
|
+ this.listParams.titleName = ''
|
|
|
|
+ },
|
|
search(){
|
|
search(){
|
|
this.listParams.titleName = this.searchValue
|
|
this.listParams.titleName = this.searchValue
|
|
- this.qbwd = []
|
|
|
|
this.getList()
|
|
this.getList()
|
|
},
|
|
},
|
|
getList(){
|
|
getList(){
|
|
|
|
+ this.qbwd = this.topList
|
|
listWxs(this.listParams).then(res => {
|
|
listWxs(this.listParams).then(res => {
|
|
this.qbwd = [...this.qbwd,...res.rows]
|
|
this.qbwd = [...this.qbwd,...res.rows]
|
|
this.total = res.total
|
|
this.total = res.total
|
|
@@ -103,7 +113,7 @@ export default {
|
|
},
|
|
},
|
|
goDetails(e) {
|
|
goDetails(e) {
|
|
let id = e.id || ''
|
|
let id = e.id || ''
|
|
- let type = 11
|
|
|
|
|
|
+ let type = 12
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
url: `../informationDetail/informationDetail?id=${id}&type=${type}`
|
|
url: `../informationDetail/informationDetail?id=${id}&type=${type}`
|
|
});
|
|
});
|