Explorar o código

优化我的页面登录

张田田 hai 3 semanas
pai
achega
231d0bd8a8
Modificáronse 2 ficheiros con 10 adicións e 1 borrados
  1. 9 0
      miniprogram/pages/mine/mine.ts
  2. 1 1
      miniprogram/pages/mine/mine.wxml

+ 9 - 0
miniprogram/pages/mine/mine.ts

@@ -188,6 +188,15 @@ Page({
     }
   },
 
+  // 点击头像/名称区域
+  onHeadTap() {
+    if (!this.data.patient?.patientId) {
+      wx.navigateTo({
+        url: '/module/user/pages/user-certification/user-certification?hide=true',
+      });
+    }
+  },
+
   // 健康档案
   toHealthPage() {
     if (!this.data.patient?.patientId) {

+ 1 - 1
miniprogram/pages/mine/mine.wxml

@@ -3,7 +3,7 @@
   <t-navbar title="我的" t-class-title="nav-title" />
   <scroll-view class="page-scroll__container mine-box" type="list" scroll-y style="height: calc(100vh - 180rpx); padding-bottom: calc(100rpx + env(safe-area-inset-bottom));">
     <view class="head-container">
-      <view class="head-box">
+      <view class="head-box" catch:tap="onHeadTap">
         <t-avatar class="avatar-example" size="64px">W</t-avatar>
         <view class="name-box">
           <view class="name" wx:if="{{loaded}}">{{patient ? patient.name : '未登录'}}</view>