From 73c3507d82c06066d592d626ccd1a9a0961e0c5f Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期五, 19 七月 2024 20:10:26 +0800
Subject: [PATCH] ''

---
 wechat_jiaxuan/pages/detailDis/case.js |   49 +++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 47 insertions(+), 2 deletions(-)

diff --git a/wechat_jiaxuan/pages/detailDis/case.js b/wechat_jiaxuan/pages/detailDis/case.js
index 63bb98a..285aca7 100644
--- a/wechat_jiaxuan/pages/detailDis/case.js
+++ b/wechat_jiaxuan/pages/detailDis/case.js
@@ -1,4 +1,4 @@
-import { shareContent } from '../../api/index'
+import { actionDo, getWholecaseInfo } from '../../api/index'
 Page({
 
   /**
@@ -17,8 +17,24 @@
     this.setData({
       bottomLift: app.bottomLift
     })
+    this.getDetail(options.id)
+    // actionDo({
+    //   actionType: 'view',
+    //   id: options.id
+    // })
+    const member = wx.getStorageSync('member')
+    this.setData({id: options.id, member})
   },
-
+  priviewFull(){
+    let { panorama: link, title } = this.data.info
+    wx.navigateTo({
+      url: '/pages/webView/index',
+      success: function(res) {
+        // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�
+        res.eventChannel.emit('acceptDataFromOpenerPage', { link, title })
+      }
+    })
+  },
   openShare() {
     this.setData({showShare: true})
   },
@@ -33,6 +49,35 @@
   //     path: '/pages/index/index?id=' + productDetail.id + '&shareuserid=' + userInfo.id + '&type=0'
   //   }
   // },
+  handleAction(e){
+    const actionType = e.currentTarget.dataset.code
+    const { info } = this.data
+    actionDo({
+      actionType,
+      id: this.data.info.id
+    }).then(res => {
+      info.isCollection = !info.isCollection
+      this.setData({info})
+    })
+  },
+  getDetail(id) {
+    getWholecaseInfo({id}).then(res => {
+      this.setData({ info: res.data })
+      wx.setNavigationBarTitle({
+        title: res.data.title
+     })
+    })
+  },
+  handleDesign() {
+    wx.navigateTo({
+      url: '/pages/design/design',
+    })
+  },
+  playVideo() {
+    wx.previewMedia({
+      sources: [{ url: this.data.info.video, type: 'video' }]
+    })
+  },
   onClose() {
     this.setData({showShare: false})
   },

--
Gitblit v1.9.3