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/product.js        |   10 +++-
 wechat_jiaxuan/components/authCard/authCard.wxml |    2 
 wechat_jiaxuan/pages/design/design.js            |    8 +++
 wechat_jiaxuan/pages/detailDis/case.js           |   10 +++-
 wechat_staff/utils/config.js                     |    4 +-
 wechat_jiaxuan/components/authCard/authCard.js   |   12 ++++--
 wechat_jiaxuan/pages/detailDis/realpic.js        |   10 +++-
 wechat_jiaxuan/pages/consult/detail.js           |   10 +++-
 wechat_jiaxuan/utils/config.js                   |    2 
 9 files changed, 47 insertions(+), 21 deletions(-)

diff --git a/wechat_jiaxuan/components/authCard/authCard.js b/wechat_jiaxuan/components/authCard/authCard.js
index 5183248..6182d46 100644
--- a/wechat_jiaxuan/components/authCard/authCard.js
+++ b/wechat_jiaxuan/components/authCard/authCard.js
@@ -34,11 +34,15 @@
         model: {
           longitude,
           latitude
-        },capacity: 3,page:1
+        },
+        capacity: 3,
+        page: 1
       }).then(res => {
-        this.setData({
-          shopList: res.data.records
-        })
+        if (res.data && res.data.records) {
+          this.setData({
+            shopList: res.data.records || []
+          })
+        }
       })
     },
     shopDetail(e) {
diff --git a/wechat_jiaxuan/components/authCard/authCard.wxml b/wechat_jiaxuan/components/authCard/authCard.wxml
index bff7593..a0ed562 100644
--- a/wechat_jiaxuan/components/authCard/authCard.wxml
+++ b/wechat_jiaxuan/components/authCard/authCard.wxml
@@ -12,7 +12,7 @@
       <image class="right" src="../../static/icon/arrow_right.png" mode="widthFix"></image>
     </view>
     <view class="list">
-      <view class="item" wx:for="{{shopList}}">
+      <view class="item" wx:for="{{shopList}}" wx:key="index">
         <view class="name">
           <view class="icon">
             <image src="../../static/icon/mendian_item.png" mode="widthFix"></image>
diff --git a/wechat_jiaxuan/pages/consult/detail.js b/wechat_jiaxuan/pages/consult/detail.js
index c320ac0..1cfef91 100644
--- a/wechat_jiaxuan/pages/consult/detail.js
+++ b/wechat_jiaxuan/pages/consult/detail.js
@@ -33,15 +33,19 @@
     // this.getDetail(options.id, options.userId || '')
   },
   handleDesign() {
-    const { member } = this.data
+    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', '/pages/design/design')
+      wx.setStorageSync('tempPath', path)
       return wx.navigateTo({
         url: '/pages/auth/auth',
       })
     }
     wx.navigateTo({
-      url: '/pages/design/design',
+      url: path,
     })
   },
   onShareAppMessage() {
diff --git a/wechat_jiaxuan/pages/design/design.js b/wechat_jiaxuan/pages/design/design.js
index ce18bfd..d1ed19e 100644
--- a/wechat_jiaxuan/pages/design/design.js
+++ b/wechat_jiaxuan/pages/design/design.js
@@ -12,6 +12,7 @@
    * 椤甸潰鐨勫垵濮嬫暟鎹�
    */
   data: {
+    guideName: '',
     name: '',
     phone: '',  
     showAreaList: false,
@@ -30,6 +31,9 @@
   },
   onLoad(options) {
     this.initData()
+    if(options.name){
+      this.setData({ guideName: options.name })
+    }
     qqmapsdk = new QQMapWX({
       key: 'HIDBZ-2QXL4-TAWUD-XET6Q-EKTJE-CCBSQ'
     });
@@ -76,7 +80,8 @@
     const {
       name,
       phone,
-      addr
+      addr,
+      guideName
     } = this.data
     if (!name) return wx.showToast({
       title: '璇疯緭鍏ュ鍚�',
@@ -102,6 +107,7 @@
     saveFreeCustomizationApply({
       name,
       phone,
+      username: guideName || null,
       ...addr
     }).then(res => {
       wx.showToast({
diff --git a/wechat_jiaxuan/pages/detailDis/case.js b/wechat_jiaxuan/pages/detailDis/case.js
index 3a5e508..9896fc0 100644
--- a/wechat_jiaxuan/pages/detailDis/case.js
+++ b/wechat_jiaxuan/pages/detailDis/case.js
@@ -155,15 +155,19 @@
     })
   },
   handleDesign() {
-    const { member } = this.data
+    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', '/pages/design/design')
+      wx.setStorageSync('tempPath', path)
       return wx.navigateTo({
         url: '/pages/auth/auth',
       })
     }
     wx.navigateTo({
-      url: '/pages/design/design',
+      url: path,
     })
   },
   playVideo() {
diff --git a/wechat_jiaxuan/pages/detailDis/product.js b/wechat_jiaxuan/pages/detailDis/product.js
index 2bc3305..89f8e81 100644
--- a/wechat_jiaxuan/pages/detailDis/product.js
+++ b/wechat_jiaxuan/pages/detailDis/product.js
@@ -142,15 +142,19 @@
     })
   },
   handleDesign() {
-    const { member } = this.data
+    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', '/pages/design/design')
+      wx.setStorageSync('tempPath', path)
       return wx.navigateTo({
         url: '/pages/auth/auth',
       })
     }
     wx.navigateTo({
-      url: '/pages/design/design',
+      url: path,
     })
   },
   openShare() {
diff --git a/wechat_jiaxuan/pages/detailDis/realpic.js b/wechat_jiaxuan/pages/detailDis/realpic.js
index 1921e9f..a0384bc 100644
--- a/wechat_jiaxuan/pages/detailDis/realpic.js
+++ b/wechat_jiaxuan/pages/detailDis/realpic.js
@@ -123,15 +123,19 @@
     })
   },
   handleDesign() {
-    const { member } = this.data
+    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', '/pages/design/design')
+      wx.setStorageSync('tempPath', path)
       return wx.navigateTo({
         url: '/pages/auth/auth',
       })
     }
     wx.navigateTo({
-      url: '/pages/design/design',
+      url: path,
     })
   },
   openShare() {
diff --git a/wechat_jiaxuan/utils/config.js b/wechat_jiaxuan/utils/config.js
index 0fbace4..adc2531 100644
--- a/wechat_jiaxuan/utils/config.js
+++ b/wechat_jiaxuan/utils/config.js
@@ -1,7 +1,7 @@
 
 
 
-// export const baseUrl = 'http://192.168.0.136:10027' // 鏈湴
+// export const baseUrl = 'http://192.168.43.177:10027' // 鏈湴
 // export const baseUrl = 'https://dmtest.ahapp.net/web_interface' //娴嬭瘯鏈嶅姟鍣�
 
 // 娴嬭瘯鏈嶅姟鍣�
diff --git a/wechat_staff/utils/config.js b/wechat_staff/utils/config.js
index f224b25..78c38f0 100644
--- a/wechat_staff/utils/config.js
+++ b/wechat_staff/utils/config.js
@@ -1,8 +1,8 @@
-export const baseUrl = 'http://192.168.0.170:80' 
+// export const baseUrl = 'http://192.168.0.170:80' 
 // 娴嬭瘯鏈嶅姟鍣�
 // export const baseUrl = 'https://dmdev.zhibang.com:8443/web_interface'
 // 鐢熶骇鏈嶅姟鍣�
-// export const baseUrl = 'https://zbyj.zbom.com/web_interface'
+export const baseUrl = 'https://zbyj.zbom.com/web_interface'
  
 // 鑵捐鍦板浘寮�鍙戣�� key
 export const qqMapKey = 'HIDBZ-2QXL4-TAWUD-XET6Q-EKTJE-CCBSQ'

--
Gitblit v1.9.3