From 1a6905045d38bb50b0c6554c3440bdfd339c8d23 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期二, 30 七月 2024 19:13:46 +0800
Subject: [PATCH] ‘’
---
wechat_jiaxuan/pages/detailDis/product.js | 48 ++++++++++++++++++++++++------------------------
1 files changed, 24 insertions(+), 24 deletions(-)
diff --git a/wechat_jiaxuan/pages/detailDis/product.js b/wechat_jiaxuan/pages/detailDis/product.js
index fd243ff..c65744e 100644
--- a/wechat_jiaxuan/pages/detailDis/product.js
+++ b/wechat_jiaxuan/pages/detailDis/product.js
@@ -1,6 +1,7 @@
import {
getProductInfo,
- actionDo
+ actionDo,
+ getMemberInfo
} from '../../api/index'
Page({
/**
@@ -11,15 +12,24 @@
current: 0,
id: '',
origin: '',
+ isFold: false,
info: {},
member: {},
showShare: false
},
- onLoadLogin(options){
+ changeFold() {
+ this.setData({ isFold: !this.data.isFold })
+ },
+ onLoadLogin(options) {
this.getDetail(options.id, options.userId || '')
actionDo({
actionType: 'view',
id: options.id
+ })
+ getMemberInfo().then(res => {
+ this.setData({
+ member: res.data
+ })
})
},
onLoad(options) {
@@ -27,13 +37,11 @@
this.setData({
bottomLift: app.bottomLift
})
- if(options.origin && options.origin == 'b'){
+ if (options.origin && options.origin == 'b') {
this.setData({ origin: 'b' })
}
- const member = wx.getStorageSync('member')
this.setData({
- id: options.id,
- member
+ id: options.id
})
},
bindchange(e) {
@@ -45,7 +53,7 @@
info
} = this.data
wx.previewImage({
- urls: info.imageurlList,
+ urls: info.bannerImgList,
current: url
})
},
@@ -55,16 +63,15 @@
info
} = this.data
wx.previewImage({
- urls: info.imageurlList,
+ urls: info.spaceList.map(i => i.spaceImg),
current: url
})
},
handleAction(e) {
const actionType = e.currentTarget.dataset.code
const {
- info
+ info, member
} = this.data
- const member = wx.getStorageSync('member')
if (member.authStatus == '0') {
return wx.navigateTo({
url: '/pages/auth/auth',
@@ -125,7 +132,6 @@
})
},
handleShare() {
- console.log('鐐瑰嚮浜嗗垎浜�');
actionDo({
actionType: 'share',
id: this.data.info.id
@@ -134,13 +140,13 @@
// this.setData({showShare: false})
// })
},
- // onShareAppMessage: function () {
- // // let { productDetail, userInfo } = this.data
- // return {
- // title: productDetail.title,
- // path: '/pages/index/index?id=' + productDetail.id + '&shareuserid=' + userInfo.id + '&type=0'
- // }
- // },
+ onShareAppMessage: function () {
+ let { info } = this.data
+ console.log('鐐瑰嚮浜嗗垎浜�')
+ return {
+ path: '/pages/detailDis/product?id=' + info.id + '&userId=' + info.users.id
+ }
+ },
onClose() {
this.setData({
showShare: false
@@ -198,10 +204,4 @@
},
- /**
- * 鐢ㄦ埛鐐瑰嚮鍙充笂瑙掑垎浜�
- */
- onShareAppMessage() {
-
- }
})
\ No newline at end of file
--
Gitblit v1.9.3