From a23cca37fbfa2659abaee7e53e24fd8f248fa3ae Mon Sep 17 00:00:00 2001
From: "8889998@qq.com" <8889998@qq.com>
Date: Thu, 17 Jul 2025 22:29:43 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=AD=BE=E5=88=B0?=
=?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=82=A3=E8=80=85=E7=9B=B8=E5=85=B3=E9=97=AE?=
=?UTF-8?q?=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components/FormItem.vue | 6 +-
pages/modify_visitor/modify_visitor.vue | 177 ++++++++++++++++++++++++++++++--
pages/visitors/visitors.vue | 9 +-
pages/waiting_method/waiting_method.vue | 16 ++-
4 files changed, 185 insertions(+), 23 deletions(-)
diff --git a/components/FormItem.vue b/components/FormItem.vue
index 3b2ab6f..641c4d8 100644
--- a/components/FormItem.vue
+++ b/components/FormItem.vue
@@ -111,14 +111,10 @@ export default {
height: 44rpx;
flex-grow: 1;
font-size: 32rpx;
- flex: 1;
padding-left: 20rpx;
color: #000000;
- display: flex;
- justify-content: flex-end;
- align-items: center;
- flex-grow: 1;
text-align: right;
+ box-sizing: border-box;
}
.picker {
diff --git a/pages/modify_visitor/modify_visitor.vue b/pages/modify_visitor/modify_visitor.vue
index a38d2b5..69c8e3c 100644
--- a/pages/modify_visitor/modify_visitor.vue
+++ b/pages/modify_visitor/modify_visitor.vue
@@ -12,11 +12,14 @@
+ :hover-class="(canSubmit ? 'hover' : '')" @click="submit" v-if="!vid && (doctorInfo.aid || !canSubmit)">
确认新增
-
+
+
+
+
+ :hover-class="(canSubmit ? 'hover' : '')" @click="submit" v-if="vid">
确认修改
@@ -29,6 +32,23 @@
+
+
+
+
+
@@ -59,7 +79,9 @@ export default {
genders: {
0:'男',
1:'女'
- },
+ },
+ doctorInfo:false,
+ realName:'',
}
},
components: {
@@ -81,10 +103,53 @@ export default {
});
}
},
- onShow() {
- if (this.vid) this.getVisitorInfo()
+ onShow() {
+ if (this.vid) {
+ this.getVisitorInfo()
+ }else{
+ this.getDoctorInfo()
+ }
},
- methods: {
+ methods: {
+ handleConfirmPhone(){
+ if(!this.realName.trim()){
+ uni.showModal({
+ title:'提示',
+ content: '姓名不可为空',
+ })
+ return
+ }
+ this.$http.req('/api/user/set_realname', { realname:this.realName}, 'POST').then(data => {
+ if (data == -1) return
+ this.$refs.nameWrap.close()
+ });
+ },
+ getPhoneNumber(e) {
+ console.log(e)
+ if (e.detail.errMsg === 'getPhoneNumber:ok') {
+ this.$http.req('api/user/bind_phone', {phonecode:e.detail.code}, 'POST').then(data=>{
+ if(data == -1) return
+ this.getDoctorInfo()
+ });
+ } else {
+
+ }
+ },
+ async getDoctorInfo() {
+ this.$http.req('api/user/index_info', {}, 'GET').then(data=>{
+ if(data == -1) return
+
+ this.doctorInfo = data;
+
+ if(!data.realname && data.aid) {
+ this.$nextTick(() => {
+ this.$refs.nameWrap.open('bottom')
+ })
+ }
+
+ console.log(this.doctorInfo)
+ });
+ },
handleConfirm(sex){
this.sex = sex;
this.checkSubmit()
@@ -176,12 +241,104 @@ export default {
}
-