|
@@ -4,12 +4,14 @@
|
|
|
<view class="top-warp">
|
|
|
<view class="search">
|
|
|
<view class="place">
|
|
|
- <selectAddress @selectAddress='selectAddress' :searchPlace='searchPlace'></selectAddress>
|
|
|
+ <selectAddress @selectAddress='selectAddress' :searchPlace='searchPlace'>
|
|
|
+ <u-icon :slot="'icon'" name="arrow-down" color="#333333" size="17" bold style='margin-left: 6rpx;'></u-icon>
|
|
|
+ </selectAddress>
|
|
|
<!-- <picker @change="bindPickerChange" :value="multiIndex" :range="multiArray" range-key='label'
|
|
|
mode="multiSelector" @columnchange='columnchange'>
|
|
|
<view class="text">{{searchPlace}}</view>
|
|
|
</picker> -->
|
|
|
- <u-icon name="arrow-down" color="#333333" size="17" bold style='margin-left: 6rpx;'></u-icon>
|
|
|
+
|
|
|
</view>
|
|
|
<u-search placeholder="请输入作物名称或用户名称" v-model="keyword" :input-style='inputStyle'
|
|
|
:show-action="false" disabled @click='toSearch'>
|
|
@@ -38,10 +40,10 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="right" v-if="item.followed==1" @click="follow(item,1)">
|
|
|
+ <view class="right" v-if="item.followed==1&&item.commonUser&&item.commonUser.userName!=userInfo.userName" @click="follow(item,1)">
|
|
|
<text class="case" style="color:#878C9C;">已关注</text>
|
|
|
</view>
|
|
|
- <view class="right" v-else @click="follow(item,2)">
|
|
|
+ <view class="right" v-else-if='item.followed!=1&&item.commonUser&&item.commonUser.userName!=userInfo.userName' @click="follow(item,2)">
|
|
|
<u-icon name="plus" color="#333333" size="17" bold></u-icon><text class="case">关注</text>
|
|
|
</view>
|
|
|
|
|
@@ -50,8 +52,10 @@
|
|
|
<mote-lines-divide :dt="item.publishingContent" :line="3" expandText="展开" foldHint="收起" />
|
|
|
</view>
|
|
|
<view class="row3">
|
|
|
- <image :src="item1" mode="aspectFill" v-for="(item1,index) in item.imgList" class="img">
|
|
|
+ <image :src="item1" mode="aspectFill" v-for="(item1,index) in item.imgList" @tap="previewImage(item,index)" class="img">
|
|
|
</image>
|
|
|
+ <image v-if='item.imgList.length%3==1||item.imgList.length%3==2' class="img" style='background:#fff;'></image>
|
|
|
+ <image v-if='item.imgList.length%3==1' class="img" style='background:#fff;'></image>
|
|
|
<!-- <u-row justify="space-between" gutter="10">
|
|
|
<u-col span="4">
|
|
|
<view class="demo-layout bg-purple">
|
|
@@ -78,6 +82,7 @@
|
|
|
<text class="text">{{item.placeDelivery}}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
+
|
|
|
</view>
|
|
|
|
|
|
<!-- <good-list :list="goods"></good-list> -->
|
|
@@ -89,7 +94,7 @@
|
|
|
:content-style="contentStyle" showCancelButton='true' @confirm="cancelFollow" @cancel="show=false">
|
|
|
</u-modal>
|
|
|
</view>
|
|
|
- <search v-if="isShowSearch" @searchVal='searchVal'></search>
|
|
|
+ <search :searchcontent='keyword1' v-if="isShowSearch" @searchVal='searchVal'></search>
|
|
|
<u-modal v-model="isShowAlert" :title-style="{fontSize: '18px',fontWeight:'500'}"
|
|
|
:content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定' title='提示'
|
|
|
showCancelButton='false' content="尚未登录,是否立即登录" @confirm="alertBtn" @cancel="cancelClick"></u-modal>
|
|
@@ -136,6 +141,7 @@
|
|
|
selectItem: {},
|
|
|
show: false,
|
|
|
keyword: '',
|
|
|
+ keyword1:'',
|
|
|
inputStyle: {
|
|
|
// "padding-left": '30rpx'
|
|
|
},
|
|
@@ -147,7 +153,7 @@
|
|
|
// },
|
|
|
noMoreSize: 4, //如果列表已无数据,可设置列表的总数量要大于半页才显示无更多数据;避免列表数据过少(比如只有一条数据),显示无更多数据会不好看; 默认5
|
|
|
empty: {
|
|
|
- icon: '/static/empty.png',
|
|
|
+ // icon: '/static/empty.png',
|
|
|
tip: '暂无内容', // 提示
|
|
|
// btnText: '去看看'
|
|
|
},
|
|
@@ -246,6 +252,15 @@
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
+ previewImage(item,index){
|
|
|
+ console.log(111111111)
|
|
|
+ var i = item.imgList; //获取当前页面的轮播图数据
|
|
|
+ //uniapp预览轮播图
|
|
|
+ uni.previewImage({
|
|
|
+ current:index, //预览图片的下标
|
|
|
+ urls:i //预览图片的地址,必须要数组形式,如果不是数组形式就转换成数组形式就可以
|
|
|
+ })
|
|
|
+ },
|
|
|
releaseAlertbtn() {
|
|
|
getApp().globalData.userRelease = false
|
|
|
this.isSHowReleaseAlert = false
|
|
@@ -284,7 +299,10 @@
|
|
|
this.keyword = e
|
|
|
},
|
|
|
toSearch() {
|
|
|
+ this.keyword1=this.keyword
|
|
|
this.isShowSearch = true
|
|
|
+
|
|
|
+ console.log(this.keyword1)
|
|
|
},
|
|
|
follow(val, type) {
|
|
|
// 2关注
|
|
@@ -344,7 +362,7 @@
|
|
|
downCallback() {
|
|
|
this.mescroll.resetUpScroll();
|
|
|
},
|
|
|
- upCallback(page) {
|
|
|
+ async upCallback(page) {
|
|
|
uni.showLoading({
|
|
|
title: '数据加载中',
|
|
|
mask: true
|
|
@@ -354,6 +372,7 @@
|
|
|
let _obj = {
|
|
|
|
|
|
}
|
|
|
+ console.log(this.selectType)
|
|
|
if (this.selectType == '关注') {
|
|
|
_obj = {
|
|
|
pageSize: page.size,
|
|
@@ -375,9 +394,9 @@
|
|
|
pcphone: 'mobile'
|
|
|
}
|
|
|
}
|
|
|
- this.$api.doRequest('get', '/transactionExchangeInfo/selectTransactionExchangeInfo', _obj).then(res => {
|
|
|
- console.log(res.data.data.records)
|
|
|
+ await this.$api.doRequest('get', '/transactionExchangeInfo/selectTransactionExchangeInfo', _obj).then(res => {
|
|
|
if (res.data.code == 200) {
|
|
|
+ console.log(res.data.data.records,page.num)
|
|
|
let curPageData = res.data.data.records;
|
|
|
let curPageLen = curPageData.length;
|
|
|
let totalPage = res.data.data.total;
|
|
@@ -385,12 +404,28 @@
|
|
|
this.goods = this.goods.concat(curPageData);
|
|
|
console.log(curPageLen, totalPage)
|
|
|
this.mescroll.endByPage(curPageLen, totalPage);
|
|
|
- for (let i = 0; i < this.goods.length; i++) {
|
|
|
- this.goods[i].imgList = this.goods[i].urlImg.split(',')
|
|
|
- }
|
|
|
}
|
|
|
- uni.hideLoading()
|
|
|
})
|
|
|
+
|
|
|
+ if(this.goods.length>0){
|
|
|
+ for (let i = 0; i < this.goods.length; i++) {
|
|
|
+ await this.$api.doRequest('get', 'appendix/query/getFileList', {
|
|
|
+ appendixIds: this.goods[i].urlImg
|
|
|
+ }).then(res1 => {
|
|
|
+ if(i==this.goods.length-1){
|
|
|
+ uni.hideLoading()
|
|
|
+ }
|
|
|
+ var arr=[]
|
|
|
+ for (let q = 0; q < res1.data.data.length; q++) {
|
|
|
+ arr.push(res1.data.data[q].appendixPath)
|
|
|
+ }
|
|
|
+ this.goods[i].imgList = arr
|
|
|
+ this.$forceUpdate()
|
|
|
+ })
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
//点击空布局按钮的回调
|
|
|
emptyClick() {
|
|
@@ -420,7 +455,9 @@
|
|
|
.content {
|
|
|
background: #F5F6FA;
|
|
|
}
|
|
|
-
|
|
|
+ /deep/.button-show{
|
|
|
+ width:80rpx;
|
|
|
+ }
|
|
|
.flex {
|
|
|
display: flex;
|
|
|
}
|
|
@@ -535,7 +572,7 @@
|
|
|
margin-top: 18rpx;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
- /* justify-content: space-between; */
|
|
|
+ justify-content: space-between;
|
|
|
flex-wrap: wrap;
|
|
|
/* background: #bbb; */
|
|
|
|
|
@@ -543,8 +580,8 @@
|
|
|
.img {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
- justify-content: center;
|
|
|
- width: 214rpx;
|
|
|
+ /* justify-content: space-between; */
|
|
|
+ width: 31.6333%;
|
|
|
height: 214rpx;
|
|
|
margin-bottom: 20rpx;
|
|
|
background: lightblue;
|