From 6f3a69657587918957fc24593f1996573cc78d87 Mon Sep 17 00:00:00 2001 From: shidongli Date: Fri, 27 Oct 2023 10:54:45 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/pages/myinformation/myinformation.js | 6 +++--- pages/myinformation/myinformation.vue | 8 ++++---- pages/register/register.vue | 6 ++++-- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/api/pages/myinformation/myinformation.js b/api/pages/myinformation/myinformation.js index ff16787..9ffd2b7 100644 --- a/api/pages/myinformation/myinformation.js +++ b/api/pages/myinformation/myinformation.js @@ -37,12 +37,12 @@ export function registerdata(data) { }) } // 获取当前注册居民 -export function getCurrentUser(openid) { +export function getCurrentUser(openid, cityCode) { return request({ - url: `/applet/register/getList/${openid}`, + url: `/applet/register/getCurrentResident/${openid}/${cityCode}`, method: 'GET', header: { - // Authorization: 'Bearer' + ' ' + uni.getStorageSync('token') + Authorization: 'Bearer' + ' ' + uni.getStorageSync('token') }, }) } diff --git a/pages/myinformation/myinformation.vue b/pages/myinformation/myinformation.vue index f1b89ad..2a8384c 100644 --- a/pages/myinformation/myinformation.vue +++ b/pages/myinformation/myinformation.vue @@ -211,13 +211,12 @@ familyList: {}, //切换列表 userinfo: {}, //用户信息 valueopenid: '', + cityCode:'', }; }, onShow() { - - // this.bjimg = baseurl + '/profile/appletPicture/inviteFriendsOne.png' let that = this that.userinfo = uni.getStorageSync('userinfo') @@ -225,6 +224,7 @@ that.baseurl = baseurl const value = uni.getStorageSync('patientId'); this.valueopenid = uni.getStorageSync('openid'); + this.cityCode=uni.getStorageSync('region'); if (value) { that.myInfo() } else { @@ -268,7 +268,7 @@ }, // 获取成员 getpersnoal() { - getCurrentUser(this.valueopenid).then(res => { + getCurrentUser(this.valueopenid,this.cityCode).then(res => { console.log(res) this.familyList = res.data @@ -538,4 +538,4 @@ \ No newline at end of file + diff --git a/pages/register/register.vue b/pages/register/register.vue index 9715190..2a675da 100644 --- a/pages/register/register.vue +++ b/pages/register/register.vue @@ -285,7 +285,7 @@ sex: '', sexname: '', birthDate: '', - cityCode: '1', + cityCode: '', householdCardNo:'', householdRelationship:'', }, @@ -374,6 +374,8 @@ console.log(this.query) var that = this that.query.openid = uni.getStorageSync('openid'); + that.query.cityCode = uni.getStorageSync('region'); + if (that.query.sexname == '男') { that.query.sex = 'MALE'; } else if (that.query.sexname == '女') { @@ -407,7 +409,7 @@ } else { registerdata(that.query).then(res => { if (res.code == 200) { - getCurrentUser(that.query.openid, '1').then(res => { + getCurrentUser(that.query.openid,that.query.cityCode).then(res => { uni.setStorageSync('patientId', res.data.id); uni.setStorageSync('patientName', res.data.patientName); uni.setStorageSync("userinfo", res.data) From 98e9e3c30a51e776cb6047b8adf3edf90a45221b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=97=AB=E6=99=93=E8=8C=B9?= <1935832701@qq.com> Date: Fri, 27 Oct 2023 11:08:26 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=9C=AA=E7=AD=BE=E7=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/myinformation/myinformation.vue | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pages/myinformation/myinformation.vue b/pages/myinformation/myinformation.vue index 2a8384c..a66ca02 100644 --- a/pages/myinformation/myinformation.vue +++ b/pages/myinformation/myinformation.vue @@ -17,14 +17,14 @@ 请先登录! - - + + 已签约 - - + + 未签约 - - + + {{appPersonallist.phone}}