From b7fd27a4a7ac72eef5fc142cae9bb63fe69ef233 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期一, 22 七月 2024 15:34:47 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
wechat_jiaxuan/pages/userinfo/index.js | 51 +++++++++++++++++++++++++++++++++++++++++----------
1 files changed, 41 insertions(+), 10 deletions(-)
diff --git a/wechat_jiaxuan/pages/userinfo/index.js b/wechat_jiaxuan/pages/userinfo/index.js
index ab3fa95..a6c42a2 100644
--- a/wechat_jiaxuan/pages/userinfo/index.js
+++ b/wechat_jiaxuan/pages/userinfo/index.js
@@ -1,7 +1,8 @@
import {
uploadUrl,
editMember,
- getMemberInfo
+ getMemberInfo,
+ getArea
} from '../../api/index'
Page({
@@ -19,8 +20,9 @@
longitude: '',
district: '',
housearea: '',
- // 鍩庡競銆傚湴鍧�
- region: [],
+
+ addr: {},
+ areaData: [],
showHouseType: false,
houseType: {
@@ -45,13 +47,15 @@
longitude,
district,
housearea,
- houseType
+ houseType,
+ addr
} = this.data
if (!nickname) return wx.showToast({
title: '璇疯緭鍏ユ樀绉�',
icon: 'none'
})
editMember({
+ ...addr,
imgurl: imgurl || '',
name: name || '',
nickname: nickname || '',
@@ -93,7 +97,40 @@
longitude: res.data.longitude || '',
district: res.data.district || '',
housearea: res.data.housearea || '',
+ addr: {
+ provinceCode: res.data.provinceCode,
+ provinceName: res.data.provinceName,
+ cityCode: res.data.cityCode,
+ cityName: res.data.cityName,
+ areaCode: res.data.areaCode,
+ areaName: res.data.areaName,
+ }
+
})
+ })
+ getArea().then(res => {
+ this.setData({ areaData: res.data })
+ })
+ },
+ positionChange (e) {
+ console.log(e.detail.value)
+ const names = e.detail.value
+ const codes = e.detail.code
+ let addr = {
+ provinceCode: codes[0] + '00',
+ provinceName: names[0],
+ cityCode: codes[1] + '00',
+ cityName: names[1],
+ areaCode: codes[2] + '00',
+ areaName: names[2],
+ }
+ this.setData({ addr })
+ },
+ bindRegionChange(e) {
+ console.log('picker鍙戦�侀�夋嫨鏀瑰彉锛屾惡甯﹀�间负', e.detail.value)
+ const temp = e.detail.value
+ this.setData({
+ region: e.detail.value
})
},
changeAddr() {
@@ -107,12 +144,6 @@
address: res.address,
})
}
- })
- },
- bindRegionChange(e) {
- console.log('picker鍙戦�侀�夋嫨鏀瑰彉锛屾惡甯﹀�间负', e.detail.value)
- this.setData({
- region: e.detail.value
})
},
openHouse() {
--
Gitblit v1.9.3