管理家庭成员

This commit is contained in:
shidongli 2023-10-30 14:56:03 +08:00
parent 81728643c7
commit a0c54b7d99
3 changed files with 21 additions and 20 deletions

View File

@ -37,12 +37,12 @@ export function registerdata(data) {
}) })
} }
// 获取当前注册居民 // 获取当前注册居民
export function getCurrentUser(openid, cityCode) { export function getCurrentUser(openid) {
return request({ return request({
url: `/applet/register/getCurrentResident/${openid}/${cityCode}`, url: `/applet/register/getList/${openid}`,
method: 'GET', method: 'GET',
header: { header: {
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token') // Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
}, },
}) })
} }

View File

@ -256,8 +256,8 @@
} }
}, },
// //
getpersnoal() { getpersnoal() {
getCurrentUser(this.valueopenid, this.cityCode).then(res => { getCurrentUser(this.valueopenid).then(res => {
this.familyList = res.data this.familyList = res.data
}) })
}, },

View File

@ -14,7 +14,7 @@
{{item.cardNo}} {{item.cardNo}}
</view> </view>
<view class="border"></view> <view class="border"></view>
<view class="identityname"> <view class="identityname" v-if="item.householdRelationship">
{{item.householdRelationship=='1'?"户主本人":''}} {{item.householdRelationship=='1'?"户主本人":''}}
{{item.householdRelationship=='2'?"配偶":''}} {{item.householdRelationship=='2'?"配偶":''}}
{{item.householdRelationship=='3'?"子女":''}} {{item.householdRelationship=='3'?"子女":''}}
@ -46,19 +46,20 @@
<script> <script>
import { import {
getCurrentUser, getCurrentUser,
} from '@/api/pages/myinformation/myinformation.js'; } from '@/api/pages/myinformation/myinformation.js';
export default { export default {
data() { data() {
return { return {
familyList:{} familyList:{},
valueopenid:'',
}; };
}, },
onShow(){ onShow(){
this.valueopenid = uni.getStorageSync('openid'); this.valueopenid = uni.getStorageSync('openid');
this.getpersnoal() this.getpersnoal()
}, },
methods: { methods: {
// //
@ -66,7 +67,7 @@
getCurrentUser(this.valueopenid).then(res => { getCurrentUser(this.valueopenid).then(res => {
console.log(res) console.log(res)
this.familyList = res.data this.familyList = res.data
}) })
}, },
// //
@ -84,16 +85,16 @@
}) })
} }
}, },
onReachBottom() { // // onReachBottom() { //
if (this.couponlist.length >= this.total) {} else { // if (this.couponlist.length >= this.total) {} else {
this.pageNum++; // this.pageNum++;
selectCoupon(this.pageNum, this.pageSize, this.patientId, this.couponstatus).then(res => { // selectCoupon(this.pageNum, this.pageSize, this.patientId, this.couponstatus).then(res => {
res.rows.forEach(e => { // res.rows.forEach(e => {
this.couponlist.push(e) // this.couponlist.push(e)
}) // })
}) // })
} // }
}, // },
onPullDownRefresh() { // onPullDownRefresh() { //
this.pageNum = 1; this.pageNum = 1;
this.getlist(); this.getlist();