From 4e64e4f6488f477ec3c75af7864f99bb6ae9964d Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期一, 29 七月 2024 19:05:38 +0800
Subject: [PATCH] ll

---
 wechat_jiaxuan/pages/detailDis/product.js   |    4 +
 wechat_jiaxuan/pages/userinfo/index.js      |   34 ++++++++++
 wechat_jiaxuan/pages/userinfo/index.wxss    |   13 ++++
 wechat_jiaxuan/pages/userinfo/index.wxml    |   17 +++--
 wechat_jiaxuan/pages/store/info.less        |    3 +
 wechat_jiaxuan/pages/userinfo/index.less    |   13 ++++
 wechat_jiaxuan/app.json                     |    3 +
 wechat_staff/pages/detailDis/product.wxml   |   16 +++-
 wechat_jiaxuan/pages/detailDis/product.wxml |   12 +++-
 wechat_jiaxuan/pages/detailDis/product.wxss |   13 ++++
 wechat_jiaxuan/pages/detailDis/product.less |   14 ++++
 wechat_jiaxuan/project.private.config.json  |    4 
 wechat_staff/pages/detailDis/product.js     |    4 +
 wechat_jiaxuan/pages/store/info.wxml        |    5 +
 wechat_staff/pages/detailDis/product.less   |   16 ++++-
 wechat_jiaxuan/pages/store/info.wxss        |    3 +
 16 files changed, 148 insertions(+), 26 deletions(-)

diff --git a/wechat_jiaxuan/app.json b/wechat_jiaxuan/app.json
index 1fa43dc..d2f1198 100644
--- a/wechat_jiaxuan/app.json
+++ b/wechat_jiaxuan/app.json
@@ -79,6 +79,9 @@
   "permission": {
     "scope.userLocation": {
       "desc": "浣犵殑浣嶇疆淇℃伅灏嗙敤浜庡皬绋嬪簭浣嶇疆鎺ュ彛鐨勬晥鏋滃睍绀�"
+    },
+    "scope.userInfo": {
+      "desc": "浣犵殑寰俊鍛㈢О灏嗙敤浜庡皬绋嬪簭鍛㈢О鐨勬晥鏋滃睍绀�"
     }
   },
   "componentFramework": "glass-easel",
diff --git a/wechat_jiaxuan/pages/detailDis/product.js b/wechat_jiaxuan/pages/detailDis/product.js
index 5226359..ba7ac8f 100644
--- a/wechat_jiaxuan/pages/detailDis/product.js
+++ b/wechat_jiaxuan/pages/detailDis/product.js
@@ -11,10 +11,14 @@
     current: 0,
     id: '',
     origin: '',
+    isFold: false,
     info: {},
     member: {},
     showShare: false
   },
+  changeFold() {
+    this.setData({ isFold: !this.data.isFold })
+  },
   onLoadLogin(options) {
     this.getDetail(options.id, options.userId || '')
     actionDo({
diff --git a/wechat_jiaxuan/pages/detailDis/product.less b/wechat_jiaxuan/pages/detailDis/product.less
index 1e95095..383004d 100644
--- a/wechat_jiaxuan/pages/detailDis/product.less
+++ b/wechat_jiaxuan/pages/detailDis/product.less
@@ -212,7 +212,16 @@
 .detail {
   padding: 52rpx 40rpx 40rpx;
   background-color: #fff;
-
+  .fold{
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    height: 84rpx;
+    margin-top: 20rpx;
+    .icon{
+      margin-left: 12rpx;
+    }
+  }
   .title {
     font-weight: 600;
     font-size: 36rpx;
@@ -221,7 +230,8 @@
 
   .line {
     display: flex;
-    margin-bottom: 20rpx;
+    padding: 24rpx 0 26rpx;
+    border-bottom: 1rpx dashed #E5E5E5;
     .label {
       width: 120rpx;
       font-size: 24rpx;
diff --git a/wechat_jiaxuan/pages/detailDis/product.wxml b/wechat_jiaxuan/pages/detailDis/product.wxml
index 0ad9ce2..c72efc3 100644
--- a/wechat_jiaxuan/pages/detailDis/product.wxml
+++ b/wechat_jiaxuan/pages/detailDis/product.wxml
@@ -31,9 +31,15 @@
   </view>
   <view class="detail">
     <view class="title">浜у搧璇︽儏</view>
-    <view class="line" wx:for="{{ info.productParamList }}">
-      <view class="label">{{ item.paramName }}锛�</view>
-      <view class="val">{{ item.paramValue }}</view>
+    <block wx:for="{{ info.productParamList }}">
+      <view wx:if="{{ index < 5 || isFold }}" class="line" >
+        <view class="label">{{ item.paramName }}锛�</view>
+        <view class="val">{{ item.paramValue }}</view>
+      </view>
+    </block>
+    <view wx:if="{{ info.productParamList.length > 5 }}" class="fold" bindtap="changeFold">
+      <text>{{ isFold ? '鏀惰捣' : '灞曞紑' }}</text>
+      <van-icon class="icon" name="{{ isFold ? 'arrow-up' : 'arrow-down' }}" />
     </view>
   </view>
   <!-- 瀵屾枃鏈� -->
diff --git a/wechat_jiaxuan/pages/detailDis/product.wxss b/wechat_jiaxuan/pages/detailDis/product.wxss
index 6a6dba3..dee868f 100644
--- a/wechat_jiaxuan/pages/detailDis/product.wxss
+++ b/wechat_jiaxuan/pages/detailDis/product.wxss
@@ -191,6 +191,16 @@
   padding: 52rpx 40rpx 40rpx;
   background-color: #fff;
 }
+.detail .fold {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  height: 84rpx;
+  margin-top: 20rpx;
+}
+.detail .fold .icon {
+  margin-left: 12rpx;
+}
 .detail .title {
   font-weight: 600;
   font-size: 36rpx;
@@ -198,7 +208,8 @@
 }
 .detail .line {
   display: flex;
-  margin-bottom: 20rpx;
+  padding: 24rpx 0 26rpx;
+  border-bottom: 1rpx dashed #E5E5E5;
 }
 .detail .line .label {
   width: 120rpx;
diff --git a/wechat_jiaxuan/pages/store/info.less b/wechat_jiaxuan/pages/store/info.less
index de1cba3..5378b2b 100644
--- a/wechat_jiaxuan/pages/store/info.less
+++ b/wechat_jiaxuan/pages/store/info.less
@@ -103,6 +103,9 @@
     }
   }
 }
+.empty_wrap{
+  padding-top: 100rpx;
+}
 .container{
   overflow: hidden;
   height: 100%;
diff --git a/wechat_jiaxuan/pages/store/info.wxml b/wechat_jiaxuan/pages/store/info.wxml
index 28f3b57..177b8c9 100644
--- a/wechat_jiaxuan/pages/store/info.wxml
+++ b/wechat_jiaxuan/pages/store/info.wxml
@@ -12,7 +12,7 @@
     </view>
     <view class="main_content">
       <view class="title">闂ㄥ簵瀵艰喘</view>
-      <scroll-view	scroll-y class="list">
+      <scroll-view scroll-y class="list">
         <view class="item" wx:for="{{ info.usersList }}">
           <image data-id="{{ item.iamId }}" bindtap="handleDetail" src="{{ item.imgurlFull ? item.imgurlFull : '../../static/images/default_avatar.png' }}" class="avatar"></image>
           <view data-id="{{ item.iamId }}" bindtap="handleDetail" class="content">
@@ -21,6 +21,9 @@
           </view>
           <view data-phone="{{ item.phone }}" bindtap="callPhone" class="btn">鑱旂郴TA</view>
         </view>
+        <view wx:if="{{ info.usersList.length == 0 }}" class="empty_wrap">
+          <image class="default_empty" src="../../static/images/default_empty.png"></image>
+        </view>
       </scroll-view>
     </view>
   </view>
diff --git a/wechat_jiaxuan/pages/store/info.wxss b/wechat_jiaxuan/pages/store/info.wxss
index cd9eb99..da3c36a 100644
--- a/wechat_jiaxuan/pages/store/info.wxss
+++ b/wechat_jiaxuan/pages/store/info.wxss
@@ -95,6 +95,9 @@
   color: var(--themeColor);
   border: 1rpx solid var(--themeColor);
 }
+.empty_wrap {
+  padding-top: 100rpx;
+}
 .container {
   overflow: hidden;
   height: 100%;
diff --git a/wechat_jiaxuan/pages/userinfo/index.js b/wechat_jiaxuan/pages/userinfo/index.js
index 7aa68b1..b153030 100644
--- a/wechat_jiaxuan/pages/userinfo/index.js
+++ b/wechat_jiaxuan/pages/userinfo/index.js
@@ -2,7 +2,8 @@
   uploadUrl,
   editMember,
   getMemberInfo,
-  getArea
+  getArea,
+  getWxMiniPhone
 } from '../../api/index'
 Page({
 
@@ -33,7 +34,19 @@
       val5: '',
     }
   },
-  onShow() {
+  onLoad() {
+    wx.getUserInfo({
+      success: function(res) {
+        console.log('res', res);
+        var userInfo = res.userInfo
+        var nickName = userInfo.nickName
+        var avatarUrl = userInfo.avatarUrl
+        var gender = userInfo.gender //鎬у埆 0锛氭湭鐭ャ��1锛氱敺銆�2锛氬コ
+        var province = userInfo.province
+        var city = userInfo.city
+        var country = userInfo.country
+      }
+    })
     this.initData()
   },
   onSubmit() {
@@ -72,6 +85,9 @@
         title: '淇濆瓨鎴愬姛',
         icon: 'none'
       })
+      setTimeout(() => {
+        wx.navigateBack()
+      }, 500)
     })
   },
   initData() {
@@ -154,6 +170,18 @@
       })
     }
   },
+  getPhoneNumber (e) {
+    const data = { ...e.detail }
+    getWxMiniPhone({
+      encryptedData: data.encryptedData,
+      iv: data.iv,
+      sessionKey: wx.getStorageSync('sessionKey') || data.iv,
+    }).then(res => {
+      this.setData({
+        phone: res.data
+      })
+    })
+  },
   getNickName(e) {
     this.setData({ nikname: e.detail.value })
   },
@@ -162,11 +190,13 @@
     wx.chooseLocation({
       type: 'wgs84',
       success: (res) => {
+        console.log('res', res);
         this.setData({
           longitude: res.longitude,
           latitude: res.latitude,
           address: res.address,
         })
+        console.log('address', this.data.address);
       }
     })
   },
diff --git a/wechat_jiaxuan/pages/userinfo/index.less b/wechat_jiaxuan/pages/userinfo/index.less
index 6c13af8..ab0032c 100644
--- a/wechat_jiaxuan/pages/userinfo/index.less
+++ b/wechat_jiaxuan/pages/userinfo/index.less
@@ -40,7 +40,20 @@
       font-size: 30rpx;
       color: #777777;
     }
+    .wechat_phone{
+      width: 100%;
+      flex: 1;
+      color: #111111;
+      border-bottom: 1rpx solid #e5e5e5;
+      display: flex;
+      justify-content: space-between;
+      .btn{
+        font-size: 30rpx;
+        color: #B08771;
+      }
+    }
     .input{
+      width: 100%;
       flex: 1;
       color: #111111;
       border-bottom: 1rpx solid #e5e5e5;
diff --git a/wechat_jiaxuan/pages/userinfo/index.wxml b/wechat_jiaxuan/pages/userinfo/index.wxml
index 7af2c4b..0d35875 100644
--- a/wechat_jiaxuan/pages/userinfo/index.wxml
+++ b/wechat_jiaxuan/pages/userinfo/index.wxml
@@ -14,7 +14,10 @@
     </view>
     <view class="line">
       <view class="label">鐢佃瘽</view>
-      <van-field type="number" border="{{ false }}" class="input" model:value="{{ phone }}" maxlength="{{ 11 }}" clearable />
+      <view class="wechat_phone">
+        <van-field type="number" border="{{ false }}" model:value="{{ phone }}" maxlength="{{ 11 }}" clearable />
+        <button open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber" class="btn">寰俊鎺堟潈</button>
+      </view>
     </view>
     <view class="line">
       <view class="label">鍩庡競</view>
@@ -45,7 +48,7 @@
     </view>
     <view class="line">
       <view class="label">闈㈢Н</view>
-      <van-field type="number" border="{{ false }}" class="input" model:value="{{ housearea }}" maxlength="{{ 30 }}" clearable />
+      <van-field custom-style="width: 100%" type="digit" border="{{ false }}" class="input" model:value="{{ housearea }}" maxlength="{{ 30 }}" clearable />
       <text>m虏</text>
     </view>
     <view class="line">
@@ -69,23 +72,23 @@
       <view class="label">鎴垮眿鎴峰瀷</view>
       <view class="val">
         <view class="item">
-          <van-field data-str="val1" bind:blur="houseBlur" type="number" class="input" maxlength="{{ 3 }}" />
+          <van-field value="{{ houseType.val1 }}" data-str="val1" bind:blur="houseBlur" type="number" class="input" maxlength="{{ 3 }}" />
           <view class="unit">瀹�</view>
         </view>
         <view class="item">
-          <van-field data-str="val2" bind:blur="houseBlur" type="number" class="input" maxlength="{{ 3 }}" />
+          <van-field value="{{ houseType.val2 }}" data-str="val2" bind:blur="houseBlur" type="number" class="input" maxlength="{{ 3 }}" />
           <view class="unit">鍘�</view>
         </view>
         <view class="item">
-          <van-field data-str="val3" bind:blur="houseBlur" type="number" class="input" maxlength="{{ 3 }}" />
+          <van-field value="{{ houseType.val3 }}" data-str="val3" bind:blur="houseBlur" type="number" class="input" maxlength="{{ 3 }}" />
           <view class="unit">鍘�</view>
         </view>
         <view class="item">
-          <van-field data-str="val4" bind:blur="houseBlur" type="number" class="input" maxlength="{{ 3 }}" />
+          <van-field value="{{ houseType.val4 }}" data-str="val4" bind:blur="houseBlur" type="number" class="input" maxlength="{{ 3 }}" />
           <view class="unit">鍗�</view>
         </view>
         <view class="item">
-          <van-field data-str="val5" bind:blur="houseBlur" type="number" class="input" maxlength="{{ 3 }}" />
+          <van-field value="{{ houseType.val5 }}" data-str="val5" bind:blur="houseBlur" type="number" class="input" maxlength="{{ 3 }}" />
           <view class="unit">闃�</view>
         </view>
       </view>
diff --git a/wechat_jiaxuan/pages/userinfo/index.wxss b/wechat_jiaxuan/pages/userinfo/index.wxss
index 9434ad9..51bb340 100644
--- a/wechat_jiaxuan/pages/userinfo/index.wxss
+++ b/wechat_jiaxuan/pages/userinfo/index.wxss
@@ -42,7 +42,20 @@
   font-size: 30rpx;
   color: #777777;
 }
+.list .line .wechat_phone {
+  width: 100%;
+  flex: 1;
+  color: #111111;
+  border-bottom: 1rpx solid #e5e5e5;
+  display: flex;
+  justify-content: space-between;
+}
+.list .line .wechat_phone .btn {
+  font-size: 30rpx;
+  color: #B08771;
+}
 .list .line .input {
+  width: 100%;
   flex: 1;
   color: #111111;
   border-bottom: 1rpx solid #e5e5e5;
diff --git a/wechat_jiaxuan/project.private.config.json b/wechat_jiaxuan/project.private.config.json
index 5a7c8d4..0503390 100644
--- a/wechat_jiaxuan/project.private.config.json
+++ b/wechat_jiaxuan/project.private.config.json
@@ -60,8 +60,8 @@
         },
         {
           "name": "",
-          "pathName": "pages/consult/detail",
-          "query": "id=1813577799402684418",
+          "pathName": "pages/userinfo/index",
+          "query": "",
           "launchMode": "default",
           "scene": null
         }
diff --git a/wechat_staff/pages/detailDis/product.js b/wechat_staff/pages/detailDis/product.js
index 302616e..1d3a8c5 100644
--- a/wechat_staff/pages/detailDis/product.js
+++ b/wechat_staff/pages/detailDis/product.js
@@ -16,6 +16,7 @@
     info: {},
     member: {},
     showShare: false,
+    isFold: false,
     enjoyList: []
   },
   onShow(){
@@ -167,6 +168,9 @@
     //   this.setData({showShare: false})
     // })
   },
+  changeFold() {
+    this.setData({ isFold: !this.data.isFold })
+  },
   // onShareAppMessage: function () {
   //   // let { productDetail, userInfo } = this.data
   //   return {
diff --git a/wechat_staff/pages/detailDis/product.less b/wechat_staff/pages/detailDis/product.less
index f257c46..6051637 100644
--- a/wechat_staff/pages/detailDis/product.less
+++ b/wechat_staff/pages/detailDis/product.less
@@ -194,7 +194,16 @@
 .detail {
   padding: 52rpx 40rpx 40rpx;
   background-color: #fff;
-
+  .fold{
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    height: 84rpx;
+    margin-top: 20rpx;
+    .icon{
+      margin-left: 12rpx;
+    }
+  }
   .title {
     font-weight: 600;
     font-size: 36rpx;
@@ -203,9 +212,10 @@
 
   .line {
     display: flex;
-    margin-bottom: 20rpx;
+    padding: 24rpx 0 26rpx;
+    border-bottom: 1rpx dashed #E5E5E5;
     .label {
-      width: auto;
+      width: 120rpx;
       font-size: 24rpx;
       color: #666666;
       flex-shrink: 0;
diff --git a/wechat_staff/pages/detailDis/product.wxml b/wechat_staff/pages/detailDis/product.wxml
index 9384c24..edf23cc 100644
--- a/wechat_staff/pages/detailDis/product.wxml
+++ b/wechat_staff/pages/detailDis/product.wxml
@@ -28,11 +28,17 @@
       </view>
     </view>
   </view>
-  <view class="detail">
-    <view class="title" bind:tap="goTestPage">浜у搧璇︽儏</view>
-    <view class="line" wx:for="{{ info.productParamList }}">
-      <view class="label">{{ item.paramName }}锛�</view>
-      <view class="val">{{ item.paramValue }}</view>
+   <view class="detail">
+    <view class="title">浜у搧璇︽儏</view>
+    <block wx:for="{{ info.productParamList }}">
+      <view wx:if="{{ index < 5 || isFold }}" class="line" >
+        <view class="label">{{ item.paramName }}锛�</view>
+        <view class="val">{{ item.paramValue }}</view>
+      </view>
+    </block>
+    <view wx:if="{{ info.productParamList.length > 5 }}" class="fold" bindtap="changeFold">
+      <text>{{ isFold ? '鏀惰捣' : '灞曞紑' }}</text>
+      <van-icon class="icon" name="{{ isFold ? 'arrow-up' : 'arrow-down' }}" />
     </view>
   </view>
   <!-- 瀵屾枃鏈� -->

--
Gitblit v1.9.3