许成详 6 years ago
parent
commit
80bcee3825
2 changed files with 6 additions and 5 deletions
  1. 5
    4
      pages/ActivityDetail/index.js
  2. 1
    1
      pages/ActivityDetail/index.wxml

+ 5
- 4
pages/ActivityDetail/index.js View File

209
             FloorUserName: item.customerName,
209
             FloorUserName: item.customerName,
210
             CreateDate: item.createDate,
210
             CreateDate: item.createDate,
211
             Content: item.commentContent,
211
             Content: item.commentContent,
212
-            ImgList: item.commentImgList,
212
+            ImgList: item.commentImgList || [],
213
             LikeNum: '0',
213
             LikeNum: '0',
214
             ParentId: item.parentId,
214
             ParentId: item.parentId,
215
             Childs: []
215
             Childs: []
221
               CreateDate: subItem.createDate,
221
               CreateDate: subItem.createDate,
222
               Content: subItem.commentContent,
222
               Content: subItem.commentContent,
223
               LikeNum: '0',
223
               LikeNum: '0',
224
-              ImgList: subItem.commentImgList
224
+              ImgList: subItem.commentImgList || []
225
             })
225
             })
226
           })
226
           })
227
           CommentList[index].Childs = aChild
227
           CommentList[index].Childs = aChild
245
   CheckBigImg(e) { // 查看大图
245
   CheckBigImg(e) { // 查看大图
246
     // console.log(e.target.dataset)
246
     // console.log(e.target.dataset)
247
     if (e.target.dataset.type - 0 === 1) { // 评论大图
247
     if (e.target.dataset.type - 0 === 1) { // 评论大图
248
+      // console.log(this.data.CommentList[e.target.dataset.mainindex].ImgList)
248
       this.setData({
249
       this.setData({
249
-        CurrentImgList: this.data.CommentList[e.target.dataset.mainIndex].ImgList,
250
+        CurrentImgList: this.data.CommentList[e.target.dataset.mainindex].ImgList,
250
         CurrentIndex: e.target.dataset.index,
251
         CurrentIndex: e.target.dataset.index,
251
         ShowMaxSwiper: true
252
         ShowMaxSwiper: true
252
       })
253
       })
253
     } else { // 回复大图
254
     } else { // 回复大图
254
       this.setData({
255
       this.setData({
255
-        CurrentImgList: this.data.CommentList[e.target.dataset.mainIndex].Childs[e.target.dataset.subIndex].ImgList,
256
+        CurrentImgList: this.data.CommentList[e.target.dataset.mainindex].Childs[e.target.dataset.subindex].ImgList,
256
         CurrentIndex: e.target.dataset.index,
257
         CurrentIndex: e.target.dataset.index,
257
         ShowMaxSwiper: true
258
         ShowMaxSwiper: true
258
       })
259
       })

+ 1
- 1
pages/ActivityDetail/index.wxml View File

127
       <block wx:for="{{CurrentImgList}}" wx:for-item="item" wx:for-index="index" wx:key="key">
127
       <block wx:for="{{CurrentImgList}}" wx:for-item="item" wx:for-index="index" wx:key="key">
128
         <swiper-item>
128
         <swiper-item>
129
           <view class="swiper-item">
129
           <view class="swiper-item">
130
-            <image mode="aspectFit" src="{{item.url}}" class="centerLabel contain" bindtap="CloseMaxSwiper"></image>
130
+            <image mode="aspectFit" src="{{item.imgUrl}}" class="centerLabel contain" bindtap="CloseMaxSwiper"></image>
131
           </view>
131
           </view>
132
         </swiper-item>
132
         </swiper-item>
133
       </block>
133
       </block>