From aae6cb63fac8f2956615481382c101cfd2e7d45c Mon Sep 17 00:00:00 2001
From: chenyc <501753378@qq.com>
Date: 星期日, 28 五月 2023 22:15:52 +0800
Subject: [PATCH] gxapi

---
 src/views/login/index.vue |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/src/views/login/index.vue b/src/views/login/index.vue
index d63d4d5..5c74b1e 100644
--- a/src/views/login/index.vue
+++ b/src/views/login/index.vue
@@ -36,7 +36,7 @@
     }
     const getUserinfo=()=>{
         ajaxPost('/patient/info/getPatientInfo','').then((re:any)=>{
-            console.log(re)
+            console.log(re,'得到患者的信息getUserinfo')
             userInfo.setPatient(re)
             router.push('/')
         })
@@ -44,14 +44,15 @@
     const onSubmit = (values:any) => {
         console.log('submit', values)
         loadingBUt.value=true
-        ajaxPost('/patient/info/wechatLogin2',`mobile=${username.value}&password=${password.value}`,config).then((re:any)=>{
+        const openid='odFja56xfwSZDHhAEMn-JotSzlRc'
+        ajaxPost('/patient/info/wechatLogin2',`mobile=${username.value}&password=${password.value}&openId=${openid}`,config).then((re:any)=>{
             console.log(re)
             if (re===''){
                 Toast('登录失败,请重新登录')
             } else {
                 console.log('得到tokeng')
                 Session.set('token', re)
-                Toast('登录成功。。。。。')
+                Toast('登录成功')
                 getUserinfo()
             }
         }).finally(()=>{
@@ -81,7 +82,7 @@
                 Toast('登录失败,请重新登录')
             } else {
                 Session.set('token', re)
-                Toast('登录成功。。。。。')
+                Toast('登录成功')
                 getUserinfo()
             }
         })
@@ -136,11 +137,10 @@
                         ajaxPost('patient/info/wechatLogin','openId='+openId,config).then((re:any)=>{
                             console.log('openid换的accesstoken=',re)
                             if (re===''){
-                                Toast('请填写表单登录。。')
+                                Toast('请填写表单登录')
                             } else {
-                                console.log()
                                 Session.set('token', re)
-                                Toast('登录成功。。。。。')
+                                Toast('登录成功')
                                 getUserinfo()
                             }
                         })
@@ -191,13 +191,14 @@
                         placeholder="请输入登录名"
                         :rules="[{ required: true, message: '请输入登录名' }]"
                     />
+                    <!-- :rules="[{ required: true, message: '请填写密码' }]" -->
                     <van-field
                         v-model="password"
                         type="password"
                         name="密  码"
                         label="密&nbsp&nbsp码"
                         placeholder="6-16位数字或者字母组合"
-                        :rules="[{ required: true, message: '请填写密码' }]"
+                      
                     >
                         <template #button>
                             <van-button size="small" type="default" @click="wjmm">忘记密码</van-button>

--
Gitblit v1.8.0