From d9a89d83c2048a964f16ca179feb2b7f21b9d33a Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期一, 29 七月 2024 16:28:47 +0800
Subject: [PATCH] 提交

---
 wechat_jiaxuan/pages/userinfo/index.js |   36 +++++++++++++++++++++++++-----------
 1 files changed, 25 insertions(+), 11 deletions(-)

diff --git a/wechat_jiaxuan/pages/userinfo/index.js b/wechat_jiaxuan/pages/userinfo/index.js
index a6c42a2..7aa68b1 100644
--- a/wechat_jiaxuan/pages/userinfo/index.js
+++ b/wechat_jiaxuan/pages/userinfo/index.js
@@ -33,7 +33,7 @@
       val5: '',
     }
   },
-  onLoad(options) {
+  onShow() {
     this.initData()
   },
   onSubmit() {
@@ -67,6 +67,7 @@
       housearea: housearea || '',
       housetype: houseType.val1 + '-' + houseType.val2 + '-' + houseType.val3 + '-' + houseType.val4 + '-' + houseType.val5
     }).then(res => {
+      wx.setStorageSync('member', res.data)
       wx.showToast({
         title: '淇濆瓨鎴愬姛',
         icon: 'none'
@@ -133,6 +134,29 @@
       region: e.detail.value
     })
   },
+  getBindchooseavatar(e) {
+    var that = this
+    if (e.detail.avatarUrl) {
+      wx.uploadFile({
+        url: uploadUrl,
+        filePath: e.detail.avatarUrl,
+        formData: {
+          folder: "member"
+        },
+        name: 'file',
+        success (res) {
+          let data = JSON.parse(res.data)
+          that.setData({
+            imgurl: data.data.imgaddr,
+            imgurlFull: data.data.url,
+          })
+        }
+      })
+    }
+  },
+  getNickName(e) {
+    this.setData({ nikname: e.detail.value })
+  },
   changeAddr() {
     // console.log('鐐瑰嚮浜�');
     wx.chooseLocation({
@@ -198,22 +222,12 @@
               imgurl: data.data.imgaddr,
               imgurlFull: data.data.url,
             })
-            setTimeout(() => {
-              console.log('imgurlFull', this.data.imgurlFull);
-            }, 1000)
           }
         })
       }
     })
   },
   onReady() {
-
-  },
-
-  /**
-   * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず
-   */
-  onShow() {
 
   },
 

--
Gitblit v1.9.3