From 5e57deb4c7a53c3307f59b2267127b4dd7fd0b02 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期日, 29 九月 2024 15:05:10 +0800
Subject: [PATCH] ll

---
 wechat_jiaxuan/pages/detailDis/case.js |   36 ++++++++++++++++++++++++------------
 1 files changed, 24 insertions(+), 12 deletions(-)

diff --git a/wechat_jiaxuan/pages/detailDis/case.js b/wechat_jiaxuan/pages/detailDis/case.js
index fe270e3..9896fc0 100644
--- a/wechat_jiaxuan/pages/detailDis/case.js
+++ b/wechat_jiaxuan/pages/detailDis/case.js
@@ -29,6 +29,9 @@
       eventBus.emit('caseDeBack', this.data.info)
     }, 500)
   },
+  onShow(){
+    this.setData({ member: wx.getStorageSync('member') })
+  },
   onLoad(options) {
     var app = getApp().globalData
     this.setData({
@@ -79,8 +82,14 @@
       info
     } = this.data
     console.log('鐐瑰嚮浜嗗垎浜�')
-    return {
-      path: '/pages/detailDis/case?id=' + info.id + '&userId=' + info.users.id
+    if(info.users && info.users.id){
+      return {
+        path: '/pages/detailDis/case?id=' + info.id + '&userId=' + info.users.id
+      }
+    }else{
+      return {
+        path: '/pages/detailDis/case?id=' + info.id 
+      }
     }
   },
   handleAction(e) {
@@ -89,7 +98,7 @@
       info
     } = this.data
     const member = wx.getStorageSync('member')
-    if (member.authStatus == '0') {
+    if (!member.phone) {
       return wx.navigateTo({
         url: '/pages/auth/auth',
       })
@@ -146,8 +155,19 @@
     })
   },
   handleDesign() {
+    const { member, origin, info } = this.data
+    let path = '/pages/design/design'
+    if(origin != 'b' && info.users && info.users.id){
+      path = `/pages/design/design?name=${info.users.iamUsername}`
+    }
+    if (!member.phone) {
+      wx.setStorageSync('tempPath', path)
+      return wx.navigateTo({
+        url: '/pages/auth/auth',
+      })
+    }
     wx.navigateTo({
-      url: '/pages/design/design',
+      url: path,
     })
   },
   playVideo() {
@@ -163,14 +183,6 @@
       showShare: false
     })
   },
-
-  /**
-   * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず
-   */
-  onShow() {
-
-  },
-
   /**
    * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰闅愯棌
    */

--
Gitblit v1.9.3