This commit is contained in:
2024-04-17 08:57:37 +08:00
parent c1b21a6c0e
commit 667a7983d0
8 changed files with 39 additions and 52 deletions

View File

@ -1,16 +1,15 @@
import request from "../../request.js"
// 获取家庭成员详情
export function getInfo(patientCode) {
export function getInfo(patientCode, openid) {
return request({
url: `/applet/register/getInfo/${patientCode}`,
url: `/applet/register/getInfo/${patientCode}&${openid}`,
method: 'GET'
})
}
// 解绑账号
export function delFamilyItem(patientCode) {
export function delFamilyItem(patientCode, openid) {
return request({
url: `/applet/register/unbinding/${patientCode}`,
url: `/applet/register/unbinding/${patientCode}&${openid}`,
method: 'GET'
})
}

View File

@ -33,13 +33,16 @@
<view class="btn" @tap="show = true">
解除绑定家庭成员
</view>
<u-modal v-model="show" :title="title" closeOnClickOverlay :content='content' showCancelButton @confirm='confirmbtn' @close='closebtn'
@cancel='cancelbtn'></u-modal>
<u-modal v-model="show" :title="title" closeOnClickOverlay :content='content' showCancelButton
@confirm='confirmbtn' @close='closebtn' @cancel='cancelbtn'></u-modal>
</view>
</template>
<script>
import {getInfo,delFamilyItem} from '@/api/pagesB/familymemberdetail/familymemberdetail.js'
import {
getInfo,
delFamilyItem
} from '@/api/pagesB/familymemberdetail/familymemberdetail.js'
export default {
data() {
return {
@ -49,17 +52,14 @@
content: '确定要解除绑定吗?',
userinfo: {},
patientCode: '',
};
},
onLoad(options) {
// console.log(options)
this.patientCode = options.patientCode
},
onShow() {
this.userinfo = uni.getStorageSync('userinfo')
console.log(this.userinfo)
getInfo(this.patientCode).then(res => {
getInfo(this.patientCode, uni.getStorageSync('openid')).then(res => {
this.currentInfo = res.data
})
},
@ -68,8 +68,7 @@
this.show = false;
},
confirmbtn() {
console.log(this.currentInfo.cardNo,this.userinfo.cardNo)
delFamilyItem(this.currentInfo.patientCode).then(res => {
delFamilyItem(this.currentInfo.patientCode, uni.getStorageSync('openid')).then(res => {
if (res.code == 200) {
if (this.currentInfo.cardNo == this.userinfo.cardNo) {
uni.showToast({
@ -85,21 +84,13 @@
delta: 2
})
}, 1000);
} else {
uni.showToast({
title: '解除成功',
duration: 1000
duration: 1000,
back: true
});
setTimeout(function() {
uni.navigateBack({
delta: 1
})
}, 1000);
}
}
})
this.show = false;

View File

@ -166,6 +166,7 @@
...mapMutations(['scoket']),
//
rescindapplysaveinfo() {
this.list.openid = uni.getStorageSync('openid')
rescindapplysave(this.list).then(res => {
if (res.code == 200) {
this.$refs.uToast.show({

View File

@ -211,6 +211,7 @@
stepnumber: 1,
code: '',
query: {
openid: null,
province: '370000000000',
provinceName: '山东省',
residentName: null,
@ -369,6 +370,7 @@
this.query.gender = 99
}
}
this.query.openid = uni.getStorageSync('openid')
applysave(this.query).then(res => {
if (res.code == 200) {
this.$refs.uToast.show({

View File

@ -30,7 +30,6 @@
<script>
import {
getForm,
} from '@/api/pagesC/ServiceAppointment/ServiceAppointment.js'
export default {
data() {
@ -45,7 +44,6 @@
packageNo: '',
formName: '',
formNo: '',
};
},
onShow() {
@ -69,7 +67,6 @@
})
} else {
this.listinfo = res.data
}
})
},
@ -82,14 +79,10 @@
uni.navigateTo({
url: `/pagesC/appointmenttime/appointmenttime?item=${JSON.stringify(item)}`
})
}
},
}
</script>
<style lang="scss">
@import './ServiceAppointment.scss'
</style>

View File

@ -80,6 +80,7 @@
type: 'error'
})
} else {
this.listitem.openid = uni.getStorageSync('openid')
detail(this.listitem).then(res => {
if (res.code == 200) {
this.$refs.uToast.show({