From 7dc29ed74ebaa8a0e66f68264d9a13f95dc3af21 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期五, 02 八月 2024 11:09:06 +0800
Subject: [PATCH] aa
---
wechat_jiaxuan/pages/detailDis/product.js | 29 +++++++++++++++++++----------
1 files changed, 19 insertions(+), 10 deletions(-)
diff --git a/wechat_jiaxuan/pages/detailDis/product.js b/wechat_jiaxuan/pages/detailDis/product.js
index ba7ac8f..4c4970b 100644
--- a/wechat_jiaxuan/pages/detailDis/product.js
+++ b/wechat_jiaxuan/pages/detailDis/product.js
@@ -1,7 +1,9 @@
import {
getProductInfo,
- actionDo
+ actionDo,
+ getMemberInfo
} from '../../api/index'
+import { eventBus } from '../../utils/eventBus'
Page({
/**
* 椤甸潰鐨勫垵濮嬫暟鎹�
@@ -14,7 +16,10 @@
isFold: false,
info: {},
member: {},
- showShare: false
+ showShare: false,
+ options: {
+ empty: '鏃犲弬鏁�'
+ }
},
changeFold() {
this.setData({ isFold: !this.data.isFold })
@@ -26,6 +31,12 @@
id: options.id
})
},
+ onUnload() {
+ console.log('璇︽儏杩涜浜嗛攢姣�');
+ setTimeout(() => {
+ eventBus.emit('productDeBack', this.data.info)
+ }, 500)
+ },
onLoad(options) {
var app = getApp().globalData
this.setData({
@@ -34,10 +45,8 @@
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) {
@@ -66,9 +75,8 @@
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',
@@ -84,6 +92,7 @@
})
wx.showToast({
title: actionType == 'collect' ? '鏀惰棌鎴愬姛' : '鍙栨秷鏀惰棌',
+ icon: "none"
})
})
},
@@ -97,6 +106,9 @@
})
wx.setNavigationBarTitle({
title: res.data.title
+ })
+ getMemberInfo().then(res => {
+ this.setData({ member: res.data })
})
})
},
@@ -189,9 +201,6 @@
})
},
onHide() {
-
- },
- onUnload() {
},
onPullDownRefresh() {
--
Gitblit v1.9.3