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" import request from "../../request.js"
// 获取家庭成员详情 // 获取家庭成员详情
export function getInfo(patientCode) { export function getInfo(patientCode, openid) {
return request({ return request({
url: `/applet/register/getInfo/${patientCode}`, url: `/applet/register/getInfo/${patientCode}&${openid}`,
method: 'GET' method: 'GET'
}) })
} }
// 解绑账号 // 解绑账号
export function delFamilyItem(patientCode, openid) {
export function delFamilyItem(patientCode) {
return request({ return request({
url: `/applet/register/unbinding/${patientCode}`, url: `/applet/register/unbinding/${patientCode}&${openid}`,
method: 'GET' method: 'GET'
}) })
} }

View File

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

View File

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

View File

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

View File

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

View File

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