Explorar el Código

fix(mobile-h5): polish WeChat notify bind entry UX on home

Co-authored-by: Cursor <cursoragent@cursor.com>
zlwu hace 2 meses
padre
commit
db975dac47
Se han modificado 1 ficheros con 10 adiciones y 5 borrados
  1. 10 5
      mobile-h5/pages/index/index.vue

+ 10 - 5
mobile-h5/pages/index/index.vue

@@ -12,7 +12,11 @@
           <text v-if="deptName">{{ deptName }}</text>
         </view>
         <view class="meta__right">
-          <text class="home-mp-notify" @click="onTapMpNotify">
+          <text
+            class="home-mp-notify"
+            :class="{ 'home-mp-notify--bound': mpNotifyBound }"
+            @click="onTapMpNotify"
+          >
             {{ mpNotifyBound ? '微信通知已开启' : '开启微信审批通知' }}
           </text>
           <text class="home-logout" @click="onLogout">退出登录</text>
@@ -135,7 +139,6 @@
         menus: [],
         menusLoading: true,
         mpNotifyBound: false,
-        mpNotifyLoading: false,
         banners: [
           {
             id: 'banner-video-1',
@@ -165,14 +168,11 @@
     },
     methods: {
       async refreshMpBindStatus() {
-        this.mpNotifyLoading = true
         try {
           const res = await fetchMpBindStatus()
           this.mpNotifyBound = !!(res && res.bound)
         } catch (_) {
           this.mpNotifyBound = false
-        } finally {
-          this.mpNotifyLoading = false
         }
       },
       onTapMpNotify() {
@@ -269,6 +269,11 @@
     text-underline-offset: 4rpx;
   }
 
+  .home-mp-notify--bound {
+    color: var(--text-muted, #5f7a6d);
+    text-decoration: none;
+  }
+
   .home-menus-loading {
     display: flex;
     flex-direction: column;