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..a66ca02 100644 --- a/pages/myinformation/myinformation.vue +++ b/pages/myinformation/myinformation.vue @@ -17,14 +17,14 @@ 请先登录! - - + + 已签约 - - + + 未签约 - - + + {{appPersonallist.phone}} @@ -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)