Browse Source

修改交易记录 页面数据显示

master
邓宏 2 years ago
parent
commit
a44243f3f6
  1. 12
      pages/massif/mana/transactions.vue

12
pages/massif/mana/transactions.vue

@ -84,18 +84,18 @@
<scroll-view> <scroll-view>
<view class="card" v-for="(v,k) in list" :key="k"> <view class="card" v-for="(v,k) in list" :key="k">
<u-image radius="20rpx" width="130rpx" height="118rpx" mode="aspectFill" :src="`${host}/${1}`"> <u-image radius="20rpx" width="130rpx" height="118rpx" mode="aspectFill" :src="`${host}/${v.images[0]}`">
<text slot="error" style="font-size:45rpx;" class="plant-xiaopangchetupianjiazaishibai"/> <text slot="error" style="font-size:45rpx;" class="plant-xiaopangchetupianjiazaishibai"/>
</u-image> </u-image>
<view class="info"> <view class="info">
<view class="title">{{v.productName}}</view> <view class="title">{{v.productName}}</view>
<view class="spec"> <view class="spec">
<text>规格20kg/</text> <text>规格{{v.specification}}</text>
<text>云南云天化股份有限公司</text> <text class="over">{{v.buyerAddress}}</text>
</view> </view>
<view class="total"> <view class="total">
<text data-unit="400kg">20</text> <text :data-unit="`${(parseFloat(v.tradeNum)||0)*(parseFloat(v.specification)||0)}${v.weightUnit}`">{{v.tradeNum}}{{v.packUnit_dictText}}</text>
<text>交易日期2022-12-12</text> <text>交易日期{{v.tradeTime}}</text>
</view> </view>
</view> </view>
</view> </view>
@ -166,7 +166,7 @@ export default {
} }
}) })
if(res.statu){ if(res.statu){
this.list=this.list.concat(res.data.records) this.list=this.list.concat(res.data.records.map(v=>({...v,images:v.images.split(",").filter(v=>v)})))
this.total=res.data.total this.total=res.data.total
this.searchVal.pageNo++ this.searchVal.pageNo++
if(this.list.length==this.total)uni.showToast({title:"加载完成!",icon:"none"}) if(this.list.length==this.total)uni.showToast({title:"加载完成!",icon:"none"})

Loading…
Cancel
Save