From 4eaf6d8835d4e9b204f13d012f13bbd8a94a21cc Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期日, 21 七月 2024 22:52:37 +0800
Subject: [PATCH] lll
---
wechat_jiaxuan/pages/consult/detail.js | 46 +++++++++++++++++++++++++++-------------------
1 files changed, 27 insertions(+), 19 deletions(-)
diff --git a/wechat_jiaxuan/pages/consult/detail.js b/wechat_jiaxuan/pages/consult/detail.js
index 0042f46..31af89b 100644
--- a/wechat_jiaxuan/pages/consult/detail.js
+++ b/wechat_jiaxuan/pages/consult/detail.js
@@ -1,12 +1,15 @@
-// pages/consult/detail.js
+import { shareContent, getProductNewsInfo } from '../../api/index'
Page({
/**
* 椤甸潰鐨勫垵濮嬫暟鎹�
*/
data: {
- navTitle: '璇︽儏',
- bottomLift: 0
+ bottomLift: 0,
+ info: {},
+ detail: {},
+
+ showShare: false
},
/**
@@ -17,25 +20,30 @@
this.setData({
bottomLift: app.bottomLift
})
+ this.getDetail(options.id)
},
-
- /**
- * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚
- */
- onReady() {
-
+ getDetail(id) {
+ getProductNewsInfo({ id }).then(res => {
+ this.setData({ info: res.data })
+ })
},
-
- /**
- * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず
- */
- onShow() {
-
+ openShare() {
+ this.setData({showShare: true})
},
-
- /**
- * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰闅愯棌
- */
+ handleShare() {
+ console.log('鐐瑰嚮浜嗗垎浜�');
+ shareContent(this.data.info.id)
+ },
+ // 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})
+ },
onHide() {
},
--
Gitblit v1.9.3