|
@@ -24,7 +24,7 @@
|
|
|
width="90%"
|
|
|
title="请补充以下信息"
|
|
|
show-cancel-button
|
|
|
- confirm-button-text="新建卡"
|
|
|
+ confirm-button-text="绑定"
|
|
|
:before-close="beforeClose"
|
|
|
>
|
|
|
<div style="padding: 20px">
|
|
@@ -62,7 +62,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { computed, reactive, ref } from 'vue'
|
|
|
+import { computed, onMounted, reactive, ref } from 'vue'
|
|
|
import store from '../../../store'
|
|
|
import capImg from '../../../assets/capture-img.png'
|
|
|
import allArea from '../../../utils/area'
|
|
@@ -118,6 +118,7 @@ export default {
|
|
|
|
|
|
const inputInfo = reactive({
|
|
|
openId: getLocalOpenId(),
|
|
|
+ relation: 1,
|
|
|
name: null,
|
|
|
socialNo: null,
|
|
|
phone: null,
|
|
@@ -204,13 +205,12 @@ export default {
|
|
|
}
|
|
|
setTimeout(() => {
|
|
|
readInput(inputInfo)
|
|
|
- .then(() => {
|
|
|
- Toast.success('建卡成功!')
|
|
|
+ .then((res) => {
|
|
|
+ Toast.success('绑卡成功!')
|
|
|
+ console.log(res)
|
|
|
+ store.commit('SET_PATIENTCARDS', res.cards)
|
|
|
resolve(true)
|
|
|
- getPatientIdByOpenId(getLocalOpenId()).then((res) => {
|
|
|
- store.commit('SET_PATIENTCARDS', res)
|
|
|
- router.go(-1)
|
|
|
- })
|
|
|
+ router.go(-1)
|
|
|
})
|
|
|
.catch(() => {
|
|
|
resolve(false)
|
|
@@ -218,6 +218,11 @@ export default {
|
|
|
}, 500)
|
|
|
}
|
|
|
})
|
|
|
+
|
|
|
+ onMounted(() => {
|
|
|
+ inputInfo.relation = router.currentRoute.value.params.isDefault
|
|
|
+ })
|
|
|
+
|
|
|
return {
|
|
|
uploadWidth,
|
|
|
uploadHeight,
|
|
@@ -250,4 +255,4 @@ export default {
|
|
|
margin-left: 10px;
|
|
|
color: orangered;
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|