From 3f1212403ab7701d15894c988fe5ed67d1462213 Mon Sep 17 00:00:00 2001
From: chenyc <501753378@qq.com>
Date: 星期二, 26 八月 2025 13:36:10 +0800
Subject: [PATCH] gx

---
 src/views/home/index.vue |   41 +++++++++++++++++++++++++++++------------
 1 files changed, 29 insertions(+), 12 deletions(-)

diff --git a/src/views/home/index.vue b/src/views/home/index.vue
index 36b5316..acfddc2 100644
--- a/src/views/home/index.vue
+++ b/src/views/home/index.vue
@@ -2,13 +2,13 @@
     <div class="page">
         <div class="box_1">
             <div class="userinfo">
-                <div class="name">张三丰</div>
-                <div class="userCode">卡号:202324224242 </div>
+                <div class="name" v-if="patientInfo.patientInfo.patientName !== undefined">{{patientInfo.patientInfo.patientName}}</div>
+                <div class="userCode">卡号:{{patientInfo.patientInfo.patientCardNo}} </div>
                 <div class="userQRcode">
                     <img
                         style=" width: 60px;height: 60px;margin-left: 8%; margin-top: 20px;"
                         referrerpolicy="no-referrer"
-                        src="@/views/home/assets/img/SketchPng011ef35b32ef075413b756766208370cde43357dffc3333d2acf29b70793c15d.png"
+                        :src="patientInfo.patientInfo.patientAvatarIcon"
                     />
                 </div>
             </div>
@@ -17,7 +17,7 @@
                     round
                     width="78px"
                     height="78px"
-                    src="https://fastly.jsdelivr.net/npm/@vant/assets/cat.jpeg"
+                    :src="Info.headimgurl"
                 />
             </div>
             <div class="meuns">
@@ -64,14 +64,18 @@
         <div class="viewInfo">
             <div class="box">
                 <div class="crainfo">
-                    <div class="tizhong">86</div>
+                    <div class="tizhong">{{最近体重血压.体重}}</div>
                 </div>
                 <div class="hanzhi">体重(kg)</div>
                 <div class="yinyu">Patient weight data</div>
             </div>
             <div class="box">
                 <div class="crainfo">
-                    <div class="xueya">138/88</div>
+                    <div class="xueya">
+                        <div v-if="最近体重血压.血压">{{最近体重血压.血压.split('/')[0]}}</div>
+                        <div style="height: 1px;background-color: #909399;"></div>
+                        <div v-if="最近体重血压.血压">{{最近体重血压.血压.split('/')[1]}}</div>
+                    </div>
                 </div>
                 <div class="hanzhi">血压(mmHg)</div>
                 <div class="yinyu">Patient blood pressure data</div>
@@ -117,6 +121,7 @@
         </div>
         <van-tabbar v-model="active" @change="tabChang">
             <van-tabbar-item name="home" icon="like">首页</van-tabbar-item>
+            <van-tabbar-item name="xuanjiao" icon="smile-o">宣教</van-tabbar-item>
             <van-tabbar-item name="my" icon="manager">我的</van-tabbar-item>
         </van-tabbar>
     </div>
@@ -124,7 +129,7 @@
   <script lang="ts" setup>
     import { onMounted,ref,computed,watch } from 'vue'
     import { userInfoStore } from '@/stores/userInfo'
-    import { Image as VanImage,Tabbar as VanTabbar , TabbarItem as VanTabbarItem } from 'vant'
+    import { Image as VanImage,Tabbar as VanTabbar , TabbarItem as VanTabbarItem, Toast } from 'vant'
     import {useRouter} from 'vue-router'
     import meun1 from './assets/meun1.png'
     import meun2 from './assets/meun2.png'
@@ -138,16 +143,28 @@
     const tabChang=(index:any)=>{
         if (index==='home'){
             router.push('/')
-        } else {
+        } else if (index==='xuanjiao') {
+            router.push('xuanjiao')
+        } else if (index==='my') {
             router.push('my')
         }
     }
     const topath=(url:string)=>{
         console.log('sss')
-        router.push(url)
+        if (url==='/report222'){
+            Toast('此功能暂未开通')
+        } else {
+            router.push(url)
+        }
     }
     const patientInfo=computed(() => {
         return userInfo.patient
+    })
+    const 最近体重血压=computed(() => {
+        return userInfo.最近体重血压
+    })
+    const Info=computed(() => {
+        return userInfo.info
     })
     watch(
         ()=>patientInfo,
@@ -156,9 +173,9 @@
         }
     )
     onMounted(() => {
-        if (userInfo.info.openid===''){
-            router.push('login')
-        }
+        // if (userInfo.info.openid===''){
+        //     router.push('login')
+        // }
         console.log(userInfo.patient,'患者信息')
         console.log(userInfo.info,'微信账号信息')
     })

--
Gitblit v1.8.0