From 00bf17838b496e6fcfed2e521f9c27f8f0e3e3c7 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期一, 05 八月 2024 18:38:20 +0800
Subject: [PATCH] ‘’
---
wechat_staff/pages/detailDis/product.js | 22 ++++++++++++----------
1 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/wechat_staff/pages/detailDis/product.js b/wechat_staff/pages/detailDis/product.js
index f22f525..ca16234 100644
--- a/wechat_staff/pages/detailDis/product.js
+++ b/wechat_staff/pages/detailDis/product.js
@@ -16,6 +16,7 @@
info: {},
member: {},
showShare: false,
+ isFold: false,
enjoyList: []
},
onShow(){
@@ -79,10 +80,11 @@
actionType: flag ? 'collect' : 'collect_cancel'
}).then(res => {
info.isCollection = flag
- wx.showToast({title: flag ? '鏀惰棌鎴愬姛' : '鍙栨秷鏀惰棌'})
+ wx.showToast({title: flag ? '鏀惰棌鎴愬姛' : '鍙栨秷鏀惰棌', icon: 'none'})
this.setData({
info
})
+ wx.setStorageSync('conentCountTemp', this.data.info)
})
}
},
@@ -92,7 +94,7 @@
info
} = this.data
wx.previewImage({
- urls: info.imageurlList,
+ urls: info.bannerImgList,
current: url
})
},
@@ -105,7 +107,7 @@
info
} = this.data
wx.previewImage({
- urls: info.imageurlList,
+ urls: info.spaceList.map(i => i.spaceImg),
current: url
})
},
@@ -117,13 +119,15 @@
getProductInfo({
id
}).then(res => {
- const index = enjoyList.findIndex( i => i.id === res.data.id )
+ const index = enjoyList.findIndex( i =>(res.data && i.id === res.data.id) )
this.setData({
info: {
...res.data,
isEnjoy: index > -1
}
})
+ const { info} = this.data
+ wx.setStorageSync('conentCountTemp', info)
wx.setNavigationBarTitle({
title: res.data.title
})
@@ -167,18 +171,16 @@
// this.setData({showShare: false})
// })
},
+ changeFold() {
+ this.setData({ isFold: !this.data.isFold })
+ },
// onShareAppMessage: function () {
// // let { productDetail, userInfo } = this.data
// return {
// title: productDetail.title,
// path: '/pages/index/index?id=' + productDetail.id + '&shareuserid=' + userInfo.id + '&type=0'
// }
- // },
- onClose() {
- this.setData({
- showShare: false
- })
- },
+ // },
handleDown() {
let {
info
--
Gitblit v1.9.3