2023-09-25 11:04:44 +08:00
|
|
|
|
<template>
|
2023-09-26 09:08:56 +08:00
|
|
|
|
<view class="app">
|
2023-09-26 09:59:01 +08:00
|
|
|
|
<view class="code">
|
|
|
|
|
|
<view class="title">
|
|
|
|
|
|
签约时出示二维码
|
|
|
|
|
|
</view>
|
2024-06-25 18:25:50 +08:00
|
|
|
|
<image :src="require('@/pagesC/images/ma2x.png')" mode=""></image>
|
2023-09-26 09:59:01 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
<view class="item">
|
|
|
|
|
|
<view class="lefttext">
|
|
|
|
|
|
姓名:
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="righttext">
|
2023-10-18 10:56:01 +08:00
|
|
|
|
{{currentInfo.patientName}}
|
2023-09-26 09:59:01 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="item">
|
|
|
|
|
|
<view class="lefttext">
|
|
|
|
|
|
手机号:
|
|
|
|
|
|
</view>
|
2023-10-18 10:56:01 +08:00
|
|
|
|
<view class="righttext" v-if="currentInfo.phone">
|
|
|
|
|
|
{{currentInfo.phone.substring(0,3)}}****{{currentInfo.phone.substring(7,11)}}
|
2023-09-26 09:59:01 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="item">
|
|
|
|
|
|
<view class="lefttext">
|
|
|
|
|
|
身份证号:
|
|
|
|
|
|
</view>
|
2023-10-18 10:56:01 +08:00
|
|
|
|
<view class="righttext" v-if="currentInfo.cardNo">
|
|
|
|
|
|
{{currentInfo.cardNo.substring(0,4)}}************{{currentInfo.cardNo.substring(16,18)}}
|
2023-09-26 09:59:01 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
2023-10-18 10:56:01 +08:00
|
|
|
|
<view class="btn" @tap="show = true">
|
2023-09-26 09:59:01 +08:00
|
|
|
|
解除绑定家庭成员
|
2023-09-26 09:08:56 +08:00
|
|
|
|
</view>
|
2024-04-17 08:57:37 +08:00
|
|
|
|
<u-modal v-model="show" :title="title" closeOnClickOverlay :content='content' showCancelButton
|
|
|
|
|
|
@confirm='confirmbtn' @close='closebtn' @cancel='cancelbtn'></u-modal>
|
2023-09-25 11:04:44 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
2024-04-17 08:57:37 +08:00
|
|
|
|
import {
|
|
|
|
|
|
getInfo,
|
|
|
|
|
|
delFamilyItem
|
|
|
|
|
|
} from '@/api/pagesB/familymemberdetail/familymemberdetail.js'
|
2023-09-25 11:04:44 +08:00
|
|
|
|
export default {
|
|
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
2023-10-18 10:56:01 +08:00
|
|
|
|
currentInfo: '',
|
|
|
|
|
|
show: false,
|
|
|
|
|
|
title: '提示',
|
2023-11-10 17:26:40 +08:00
|
|
|
|
content: '确定要解除绑定吗?',
|
2024-04-17 08:57:37 +08:00
|
|
|
|
userinfo: {},
|
|
|
|
|
|
patientCode: '',
|
2023-09-25 11:04:44 +08:00
|
|
|
|
};
|
2023-10-18 10:56:01 +08:00
|
|
|
|
},
|
|
|
|
|
|
onLoad(options) {
|
2024-04-17 08:57:37 +08:00
|
|
|
|
this.patientCode = options.patientCode
|
2023-10-18 10:56:01 +08:00
|
|
|
|
},
|
|
|
|
|
|
onShow() {
|
2024-04-17 08:57:37 +08:00
|
|
|
|
this.userinfo = uni.getStorageSync('userinfo')
|
|
|
|
|
|
getInfo(this.patientCode, uni.getStorageSync('openid')).then(res => {
|
|
|
|
|
|
this.currentInfo = res.data
|
|
|
|
|
|
})
|
2023-10-18 10:56:01 +08:00
|
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
|
|
|
closebtn() {
|
|
|
|
|
|
this.show = false;
|
|
|
|
|
|
},
|
|
|
|
|
|
confirmbtn() {
|
2024-04-17 08:57:37 +08:00
|
|
|
|
delFamilyItem(this.currentInfo.patientCode, uni.getStorageSync('openid')).then(res => {
|
|
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
|
if (this.currentInfo.cardNo == this.userinfo.cardNo) {
|
2023-11-10 17:26:40 +08:00
|
|
|
|
uni.showToast({
|
|
|
|
|
|
title: '解除成功',
|
|
|
|
|
|
duration: 1000
|
|
|
|
|
|
});
|
|
|
|
|
|
uni.removeStorageSync('patientId');
|
2024-07-08 09:23:34 +08:00
|
|
|
|
// uni.removeStorageSync('openid');
|
2023-11-10 17:26:40 +08:00
|
|
|
|
uni.removeStorageSync('phone');
|
|
|
|
|
|
uni.removeStorageSync('userinfo');
|
|
|
|
|
|
setTimeout(function() {
|
|
|
|
|
|
uni.navigateBack({
|
|
|
|
|
|
delta: 2
|
|
|
|
|
|
})
|
|
|
|
|
|
}, 1000);
|
2024-04-17 08:57:37 +08:00
|
|
|
|
} else {
|
2023-11-10 17:26:40 +08:00
|
|
|
|
uni.showToast({
|
|
|
|
|
|
title: '解除成功',
|
2024-04-17 08:57:37 +08:00
|
|
|
|
duration: 1000,
|
|
|
|
|
|
back: true
|
2023-11-10 17:26:40 +08:00
|
|
|
|
});
|
|
|
|
|
|
}
|
2023-10-18 10:56:01 +08:00
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
this.show = false;
|
|
|
|
|
|
},
|
|
|
|
|
|
cancelbtn() {
|
|
|
|
|
|
this.show = false;
|
|
|
|
|
|
}
|
2023-09-25 11:04:44 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss">
|
2024-04-17 08:57:37 +08:00
|
|
|
|
.app {
|
2023-09-26 09:59:01 +08:00
|
|
|
|
background-color: #fff;
|
|
|
|
|
|
width: 96%;
|
|
|
|
|
|
margin: 20rpx auto 0;
|
|
|
|
|
|
height: calc(100vh - 20rpx);
|
|
|
|
|
|
box-shadow: 0rpx 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
|
|
|
|
|
|
padding-top: 24rpx;
|
|
|
|
|
|
|
|
|
|
|
|
.btn {
|
|
|
|
|
|
position: fixed;
|
|
|
|
|
|
bottom: 50rpx;
|
|
|
|
|
|
left: 50%;
|
|
|
|
|
|
transform: translateX(-50%);
|
|
|
|
|
|
width: 500rpx;
|
|
|
|
|
|
height: 70rpx;
|
|
|
|
|
|
background: #26A888;
|
|
|
|
|
|
line-height: 70rpx;
|
|
|
|
|
|
border-radius: 10rpx;
|
|
|
|
|
|
font-size: 31rpx;
|
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
|
color: #FFFFFF;
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
}
|
2023-09-25 11:04:44 +08:00
|
|
|
|
|
2023-09-26 09:59:01 +08:00
|
|
|
|
.item {
|
|
|
|
|
|
width: 94%;
|
|
|
|
|
|
margin: 0 auto;
|
|
|
|
|
|
height: 120rpx;
|
|
|
|
|
|
font-size: 34rpx;
|
|
|
|
|
|
color: #333333;
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
border-bottom: 2rpx solid #E6E6E6;
|
|
|
|
|
|
|
|
|
|
|
|
.lefttext,
|
|
|
|
|
|
.righttext {
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
top: 50%;
|
|
|
|
|
|
left: 4%;
|
|
|
|
|
|
transform: translateY(-50%);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.righttext {
|
|
|
|
|
|
right: 3% !important;
|
|
|
|
|
|
text-align: right;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.code {
|
|
|
|
|
|
width: 96%;
|
|
|
|
|
|
height: 400rpx;
|
|
|
|
|
|
margin: 0 auto 40rpx;
|
|
|
|
|
|
border: 2rpx solid #26A888;
|
|
|
|
|
|
border-radius: 5rpx;
|
|
|
|
|
|
|
|
|
|
|
|
.title {
|
|
|
|
|
|
margin: 50rpx 0 40rpx;
|
|
|
|
|
|
font-size: 32rpx;
|
|
|
|
|
|
color: #26A888;
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
image {
|
|
|
|
|
|
margin-left: 50%;
|
|
|
|
|
|
transform: translateX(-50%);
|
|
|
|
|
|
width: 220rpx;
|
|
|
|
|
|
height: 220rpx;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2024-04-17 08:57:37 +08:00
|
|
|
|
</style>
|