From bddafd4283dc4d7e7ec9f40c6e36cf2ccb55ea86 Mon Sep 17 00:00:00 2001
From: chenyc <501753378@qq.com>
Date: 星期二, 26 八月 2025 19:03:16 +0800
Subject: [PATCH] gx

---
 src/views/HomeLoading/index.vue |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/src/views/HomeLoading/index.vue b/src/views/HomeLoading/index.vue
index 2b56715..2f6c7bf 100644
--- a/src/views/HomeLoading/index.vue
+++ b/src/views/HomeLoading/index.vue
@@ -16,7 +16,7 @@
     </div>
 </template>
 
-  <script setup>
+  <script setup lang="ts">
     import { ref, onMounted } from 'vue'
     import {useRoute,useRouter} from 'vue-router'
     import { ajaxGet ,ajaxPost} from '@/utils/axios'
@@ -28,15 +28,22 @@
     const route = useRoute()
     const router=useRouter()
     const isLoading = ref(true)
+    const config={
+        headers: {
+            'Content-Type': 'application/x-www-form-urlencoded'
+        }
+    }
     const getUserinfo=()=>{
-        ajaxPost('/patient/info/getPatientInfo','').then((re:any)=>{
+        ajaxPost('/patient/info/getPatientInfo','').then((re)=>{
             console.log(re,'得到患者的信息getUserinfo')
             userInfo.setPatient(re)
             router.push('/')
         })
     }
     onMounted(() => {
+        // alert('请在微信中打开本小程序')
         const token=Session.get('token')
+        // alert('token='+token)
         if (token && userInfo.info.openid!==''){
             console.log('已经登录了')
             getUserinfo()
@@ -46,6 +53,7 @@
         const queryInfo=route.query
         const {code}=queryInfo
         console.log(code)
+        // alert('code='+code)
         if (code){// 得到code换取openid
             ajaxGet('wechat/code',{code}).then((re)=>{
                 console.log(re,'获取openid')
@@ -67,6 +75,7 @@
             })
         }
         else { // 没有code 就重新进入微信url获取code
+            // alert('没有code,重新进入微信授权')
             const appid = 'wx790bd67db6206070' // 微信APPid
             const local = window.location.href
             window.location.href =

--
Gitblit v1.8.0