From 0650ef1c4a1ff83afad6235f54ef1c8fc1983489 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=A4=A9=E9=AA=84?= <5307576@qq.com> Date: Mon, 1 Jun 2026 17:52:47 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=E6=9C=BA=E6=9E=84?= =?UTF-8?q?=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index/index.vue | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/pages/index/index.vue b/pages/index/index.vue index 881039b..b29449f 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -140,17 +140,18 @@ import ProfilePage from '../profile/profile.vue' type Institution = { id: string + code: string name: string city: string typeName: string } const institutions: Institution[] = [ - { id: '1', name: '协和医学院', city: '北京', typeName: '医学院校' }, - { id: '2', name: '四川大学华西医院', city: '成都', typeName: '三甲医院' }, - { id: '3', name: '复旦大学附属中山医院', city: '上海', typeName: '三甲医院' }, - { id: '4', name: '中山大学孙逸仙纪念医院', city: '广州', typeName: '三甲医院' }, - { id: 'others', name: '其他机构', city: '其他', typeName: '手动登记' } + { id: 'H001', code: 'H001', name: '协和医学院', city: '北京', typeName: '医学院校' }, + { id: 'H002', code: 'H002', name: '四川大学华西医院', city: '成都', typeName: '三甲医院' }, + { id: 'H003', code: 'H003', name: '复旦大学附属中山医院', city: '上海', typeName: '三甲医院' }, + { id: 'H004', code: 'H004', name: '中山大学孙逸仙纪念医院', city: '广州', typeName: '三甲医院' }, + { id: 'OTHER', code: 'OTHER', name: '其他机构', city: '其他', typeName: '手动登记' } ] const form = reactive({ @@ -239,14 +240,17 @@ function handleLogin() { submitting.value = true loginWithCode({ phone: form.phone, - code: form.code + code: form.code, + institution_code: selectedInstitution.value.code, + institution_name: selectedInstitution.value.name }).then(result => { const backendUser = result.user || {} const normalizedUser = { ...backendUser, id: backendUser.id ? String(backendUser.id) : '', phone: backendUser.phone || form.phone, - institutionId: selectedInstitution.value?.id || '', + institutionId: selectedInstitution.value?.code || '', + institutionCode: selectedInstitution.value?.code || '', institutionName: selectedInstitution.value?.name || '' }