Browse Source

首页 修改显示图片数量

master
邓宏 2 years ago
parent
commit
0a71c207d6
  1. 7
      pages/home/index.vue

7
pages/home/index.vue

@ -231,7 +231,7 @@
</table> </table>
<view class="article"> <view class="article">
<text class="plant-bijibenjilutongxunlu" @click="$u.route({url:'pages/massif/myPlant'})"/> <text class="plant-bijibenjilutongxunlu" @click="$u.route({url:'pages/massif/myPlant'})"/>
<u-image mode="aspectFill" width="56rpx" height="46rpx" radius="8rpx" :src="`${host}/${massif.images[0]}`" @click="$u.route({url:'pages/massif/myPlant'})"> <u-image v-for="(v,k) in (massif.images||[])" :key="k" mode="aspectFill" width="56rpx" height="46rpx" radius="8rpx" :src="`${host}/${v}`" @click="$u.route({url:'pages/massif/myPlant'})">
<text slot="error" class="plant-xiaopangchetupianjiazaishibai"/> <text slot="error" class="plant-xiaopangchetupianjiazaishibai"/>
</u-image> </u-image>
@ -351,7 +351,10 @@ import request,{host} from '@/common/request'
params:{plantBaseId: this.$store.state.baseInfo.id} params:{plantBaseId: this.$store.state.baseInfo.id}
}) })
if(res.statu){ if(res.statu){
this.massif=res.data this.massif={
...res.data,
images:res.data.images.slice(0,3)
}
}else{ }else{
uni.showModal({ uni.showModal({
title:"提示", title:"提示",

Loading…
Cancel
Save