Kaynağa Gözat

供销社列表 详情 图片

wangzhe 1 yıl önce
ebeveyn
işleme
c835166f20

+ 1 - 0
pages/cooperative/cooperative.vue

@@ -4,6 +4,7 @@
         <view class="rnwdList" v-for="(item, index) in list" :key="index">
             <view @tap="goDetails(item.id)" class="cooperativeImgBox">
                 <image :src="loadImgSrc('/snbj.png')" class="cooperativeImg"></image>
+                <!--<image :src="loadImgSrc(item.imgUrl)" class="cooperativeImg"></image>-->
             </view>
             <view @tap="goDetails(item.id)" class="cooperativeBox">
                 <view class="list">

+ 3 - 1
pages/cooperative/details.vue

@@ -3,6 +3,7 @@
         <!-- 供销社详情 -->
         <view class="cooperativeImgBox">
             <image :src="loadImgSrc('/snbj.png')" class="cooperativeImg"></image>
+            <!--<image :src="loadImgSrc(imgUrl)" class="cooperativeImg"></image>-->
         </view>
         <view class="itemBox" v-for="(item, index) in list" :key="index">
             <view class="item">
@@ -22,6 +23,7 @@
     export default {
     data() {
         return {
+            imgUrl:'-',
             list: [
                 {
                     title: "名称",
@@ -60,13 +62,13 @@
         getDetails(id) {
             getDetails(id).then(response => {
                 let details = response.data;
-                console.log(response.data)
                 let list = [];
                 list.push({ title:"名称", content:details.name });
                 list.push({ title:"地址", content:details.address });
                 list.push({ title:"负责人", content:details.chargePeople });
                 list.push({ title:"负责人电话", content:details.chargePhone });
                 this.list = list;
+                this.imgUrl = details.imgUrl;
             });
         },
     }