|
@@ -4,12 +4,15 @@
|
|
<view class="top-warp">
|
|
<view class="top-warp">
|
|
<view class="search">
|
|
<view class="search">
|
|
<view class="place">
|
|
<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'
|
|
<!-- <picker @change="bindPickerChange" :value="multiIndex" :range="multiArray" range-key='label'
|
|
mode="multiSelector" @columnchange='columnchange'>
|
|
mode="multiSelector" @columnchange='columnchange'>
|
|
<view class="text">{{searchPlace}}</view>
|
|
<view class="text">{{searchPlace}}</view>
|
|
</picker> -->
|
|
</picker> -->
|
|
- <u-icon name="arrow-down" color="#333333" size="17" bold style='margin-left: 6rpx;'></u-icon>
|
|
|
|
|
|
+
|
|
</view>
|
|
</view>
|
|
<u-search placeholder="请输入作物名称或用户名称" v-model="keyword" :input-style='inputStyle'
|
|
<u-search placeholder="请输入作物名称或用户名称" v-model="keyword" :input-style='inputStyle'
|
|
:show-action="false" disabled @click='toSearch'>
|
|
:show-action="false" disabled @click='toSearch'>
|
|
@@ -34,14 +37,18 @@
|
|
<view class="bottom" style="margin-top: 6rpx;">
|
|
<view class="bottom" style="margin-top: 6rpx;">
|
|
<text class="color1" v-if="item.tranType=='采购'">采购</text>
|
|
<text class="color1" v-if="item.tranType=='采购'">采购</text>
|
|
<text class="color2" v-if="item.tranType=='销售'">销售</text>
|
|
<text class="color2" v-if="item.tranType=='销售'">销售</text>
|
|
- <text class="color3">{{$helper.changeTime(item.remark3)}}</text>
|
|
|
|
|
|
+ <text class="color3">{{item.remark3?$helper.changeTime(item.remark3):''}}</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</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>
|
|
<text class="case" style="color:#878C9C;">已关注</text>
|
|
</view>
|
|
</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>
|
|
<u-icon name="plus" color="#333333" size="17" bold></u-icon><text class="case">关注</text>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
@@ -50,8 +57,12 @@
|
|
<mote-lines-divide :dt="item.publishingContent" :line="3" expandText="展开" foldHint="收起" />
|
|
<mote-lines-divide :dt="item.publishingContent" :line="3" expandText="展开" foldHint="收起" />
|
|
</view>
|
|
</view>
|
|
<view class="row3">
|
|
<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>
|
|
|
|
+ <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-row justify="space-between" gutter="10">
|
|
<u-col span="4">
|
|
<u-col span="4">
|
|
<view class="demo-layout bg-purple">
|
|
<view class="demo-layout bg-purple">
|
|
@@ -78,6 +89,7 @@
|
|
<text class="text">{{item.placeDelivery}}</text>
|
|
<text class="text">{{item.placeDelivery}}</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
+
|
|
</view>
|
|
</view>
|
|
|
|
|
|
<!-- <good-list :list="goods"></good-list> -->
|
|
<!-- <good-list :list="goods"></good-list> -->
|
|
@@ -89,13 +101,14 @@
|
|
:content-style="contentStyle" showCancelButton='true' @confirm="cancelFollow" @cancel="show=false">
|
|
:content-style="contentStyle" showCancelButton='true' @confirm="cancelFollow" @cancel="show=false">
|
|
</u-modal>
|
|
</u-modal>
|
|
</view>
|
|
</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'}"
|
|
<u-modal v-model="isShowAlert" :title-style="{fontSize: '18px',fontWeight:'500'}"
|
|
:content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定' title='提示'
|
|
:content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定' title='提示'
|
|
showCancelButton='false' content="尚未登录,是否立即登录" @confirm="alertBtn" @cancel="cancelClick"></u-modal>
|
|
showCancelButton='false' content="尚未登录,是否立即登录" @confirm="alertBtn" @cancel="cancelClick"></u-modal>
|
|
<u-modal v-model="isSHowReleaseAlert" :title-style="{fontSize: '18px',fontWeight:'500'}"
|
|
<u-modal v-model="isSHowReleaseAlert" :title-style="{fontSize: '18px',fontWeight:'500'}"
|
|
- :content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='我知道了'
|
|
|
|
- title='温馨提示' content="交易信息为用户自由发布,正式签订合同前切勿进行任何付款操作,以免给您的财产造成损失。" @confirm="releaseAlertbtn"></u-modal>
|
|
|
|
|
|
+ :content-style="{fontSize: '14px',fontWeight:'400','text-align':'left'}" confirm-color='#22C572'
|
|
|
|
+ confirm-text='我知道了' title='温馨提示' content="交易信息为用户自由发布,正式签订合同前切勿进行任何付款操作,以免给您的财产造成损失。"
|
|
|
|
+ @confirm="releaseAlertbtn"></u-modal>
|
|
<u-toast ref="uToast" />
|
|
<u-toast ref="uToast" />
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
@@ -127,8 +140,8 @@
|
|
selectPlace: '',
|
|
selectPlace: '',
|
|
mescroll: null,
|
|
mescroll: null,
|
|
isShowAlert: false,
|
|
isShowAlert: false,
|
|
- showCancelButton:'true',
|
|
|
|
- showCancelButton1:'false',
|
|
|
|
|
|
+ showCancelButton: 'true',
|
|
|
|
+ showCancelButton1: 'false',
|
|
contentStyle: {
|
|
contentStyle: {
|
|
"font-weight": 700
|
|
"font-weight": 700
|
|
},
|
|
},
|
|
@@ -136,6 +149,7 @@
|
|
selectItem: {},
|
|
selectItem: {},
|
|
show: false,
|
|
show: false,
|
|
keyword: '',
|
|
keyword: '',
|
|
|
|
+ keyword1: '',
|
|
inputStyle: {
|
|
inputStyle: {
|
|
// "padding-left": '30rpx'
|
|
// "padding-left": '30rpx'
|
|
},
|
|
},
|
|
@@ -147,7 +161,7 @@
|
|
// },
|
|
// },
|
|
noMoreSize: 4, //如果列表已无数据,可设置列表的总数量要大于半页才显示无更多数据;避免列表数据过少(比如只有一条数据),显示无更多数据会不好看; 默认5
|
|
noMoreSize: 4, //如果列表已无数据,可设置列表的总数量要大于半页才显示无更多数据;避免列表数据过少(比如只有一条数据),显示无更多数据会不好看; 默认5
|
|
empty: {
|
|
empty: {
|
|
- icon: '/static/empty.png',
|
|
|
|
|
|
+ // icon: '/static/empty.png',
|
|
tip: '暂无内容', // 提示
|
|
tip: '暂无内容', // 提示
|
|
// btnText: '去看看'
|
|
// btnText: '去看看'
|
|
},
|
|
},
|
|
@@ -246,6 +260,15 @@
|
|
},
|
|
},
|
|
|
|
|
|
methods: {
|
|
methods: {
|
|
|
|
+ previewImage(item, index) {
|
|
|
|
+ console.log(111111111)
|
|
|
|
+ var i = item.imgList; //获取当前页面的轮播图数据
|
|
|
|
+ //uniapp预览轮播图
|
|
|
|
+ uni.previewImage({
|
|
|
|
+ current: index, //预览图片的下标
|
|
|
|
+ urls: i //预览图片的地址,必须要数组形式,如果不是数组形式就转换成数组形式就可以
|
|
|
|
+ })
|
|
|
|
+ },
|
|
releaseAlertbtn() {
|
|
releaseAlertbtn() {
|
|
getApp().globalData.userRelease = false
|
|
getApp().globalData.userRelease = false
|
|
this.isSHowReleaseAlert = false
|
|
this.isSHowReleaseAlert = false
|
|
@@ -284,6 +307,9 @@
|
|
this.keyword = e
|
|
this.keyword = e
|
|
},
|
|
},
|
|
toSearch() {
|
|
toSearch() {
|
|
|
|
+
|
|
|
|
+ this.keyword1=this.keyword
|
|
|
|
+ uni.setStorageSync('jiaoyikeyword',this.keyword)
|
|
this.isShowSearch = true
|
|
this.isShowSearch = true
|
|
},
|
|
},
|
|
follow(val, type) {
|
|
follow(val, type) {
|
|
@@ -344,7 +370,7 @@
|
|
downCallback() {
|
|
downCallback() {
|
|
this.mescroll.resetUpScroll();
|
|
this.mescroll.resetUpScroll();
|
|
},
|
|
},
|
|
- upCallback(page) {
|
|
|
|
|
|
+ async upCallback(page) {
|
|
uni.showLoading({
|
|
uni.showLoading({
|
|
title: '数据加载中',
|
|
title: '数据加载中',
|
|
mask: true
|
|
mask: true
|
|
@@ -354,6 +380,7 @@
|
|
let _obj = {
|
|
let _obj = {
|
|
|
|
|
|
}
|
|
}
|
|
|
|
+ console.log(this.selectType)
|
|
if (this.selectType == '关注') {
|
|
if (this.selectType == '关注') {
|
|
_obj = {
|
|
_obj = {
|
|
pageSize: page.size,
|
|
pageSize: page.size,
|
|
@@ -375,22 +402,39 @@
|
|
pcphone: 'mobile'
|
|
pcphone: 'mobile'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- this.$api.doRequest('get', '/transactionExchangeInfo/selectTransactionExchangeInfo', _obj).then(res => {
|
|
|
|
- console.log(res.data.data.records)
|
|
|
|
- if (res.data.code == 200) {
|
|
|
|
- let curPageData = res.data.data.records;
|
|
|
|
- let curPageLen = curPageData.length;
|
|
|
|
- let totalPage = res.data.data.total;
|
|
|
|
- if (page.num == 1) this.goods = [];
|
|
|
|
- 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(',')
|
|
|
|
|
|
+ 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;
|
|
|
|
+ if (page.num == 1) this.goods = [];
|
|
|
|
+ this.goods = this.goods.concat(curPageData);
|
|
|
|
+ console.log(curPageLen, totalPage)
|
|
|
|
+ this.mescroll.endByPage(curPageLen, totalPage);
|
|
}
|
|
}
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ 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()
|
|
|
|
+ })
|
|
|
|
+
|
|
}
|
|
}
|
|
- uni.hideLoading()
|
|
|
|
- })
|
|
|
|
|
|
+ }
|
|
|
|
+
|
|
},
|
|
},
|
|
//点击空布局按钮的回调
|
|
//点击空布局按钮的回调
|
|
emptyClick() {
|
|
emptyClick() {
|
|
@@ -421,6 +465,10 @@
|
|
background: #F5F6FA;
|
|
background: #F5F6FA;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /deep/.button-show {
|
|
|
|
+ width: 80rpx;
|
|
|
|
+ }
|
|
|
|
+
|
|
.flex {
|
|
.flex {
|
|
display: flex;
|
|
display: flex;
|
|
}
|
|
}
|
|
@@ -535,7 +583,7 @@
|
|
margin-top: 18rpx;
|
|
margin-top: 18rpx;
|
|
display: flex;
|
|
display: flex;
|
|
align-items: center;
|
|
align-items: center;
|
|
- /* justify-content: space-between; */
|
|
|
|
|
|
+ justify-content: space-between;
|
|
flex-wrap: wrap;
|
|
flex-wrap: wrap;
|
|
/* background: #bbb; */
|
|
/* background: #bbb; */
|
|
|
|
|
|
@@ -543,9 +591,9 @@
|
|
.img {
|
|
.img {
|
|
display: flex;
|
|
display: flex;
|
|
align-items: center;
|
|
align-items: center;
|
|
- justify-content: center;
|
|
|
|
- width: 214rpx;
|
|
|
|
- height: 214rpx;
|
|
|
|
|
|
+ /* justify-content: space-between; */
|
|
|
|
+ width: 210rpx;
|
|
|
|
+ height: 210rpx;
|
|
margin-bottom: 20rpx;
|
|
margin-bottom: 20rpx;
|
|
background: lightblue;
|
|
background: lightblue;
|
|
list-style: none;
|
|
list-style: none;
|