Prechádzať zdrojové kódy

fix(mobile-h5): remove WeChat notify shortcut from home header

Co-authored-by: Cursor <cursoragent@cursor.com>
zlwu 2 mesiacov pred
rodič
commit
eb337e6ce3
1 zmenil súbory, kde vykonal 0 pridanie a 46 odobranie
  1. 0 46
      mobile-h5/pages/index/index.vue

+ 0 - 46
mobile-h5/pages/index/index.vue

@@ -12,13 +12,6 @@
           <text v-if="deptName">{{ deptName }}</text>
         </view>
         <view class="meta__right">
-          <text
-            class="home-mp-notify"
-            :class="{ 'home-mp-notify--bound': mpNotifyBound }"
-            @click="onTapMpNotify"
-          >
-            {{ mpNotifyBound ? '微信通知已开启' : '开启微信审批通知' }}
-          </text>
           <text class="home-logout" @click="onLogout">退出登录</text>
         </view>
       </view>
@@ -98,7 +91,6 @@
   import {
     clearSession,
     fetchCurrentUser,
-    fetchMpBindStatus,
     getUser
   } from '../../utils/auth.js'
   import { fetchMyMobileMenus } from '../../utils/menu.js'
@@ -138,7 +130,6 @@
         deptName: '',
         menus: [],
         menusLoading: true,
-        mpNotifyBound: false,
         banners: [
           {
             id: 'banner-video-1',
@@ -163,25 +154,9 @@
         .catch(() => {
           /* 本地缓存已展示,忽略刷新失败 */
         })
-      this.refreshMpBindStatus()
       this.loadMenus()
     },
     methods: {
-      async refreshMpBindStatus() {
-        try {
-          const res = await fetchMpBindStatus()
-          this.mpNotifyBound = !!(res && res.bound)
-        } catch (_) {
-          this.mpNotifyBound = false
-        }
-      },
-      onTapMpNotify() {
-        if (this.mpNotifyBound) {
-          uni.showToast({ title: '已开启', icon: 'none' })
-          return
-        }
-        uni.navigateTo({ url: '/pages/oa/mp-bind/index' })
-      },
       mergeBadgesIntoMenus(menus, badgeMap) {
         const map = badgeMap || {}
         return (menus || []).map((m) => {
@@ -253,27 +228,6 @@
 </script>
 
 <style lang="scss" scoped>
-  .meta__right {
-    display: flex;
-    flex-direction: column;
-    align-items: flex-end;
-    gap: 12rpx;
-    flex-shrink: 0;
-  }
-
-  .home-mp-notify {
-    font-size: 22rpx;
-    line-height: 1.3;
-    color: rgba(6, 95, 70, 0.72);
-    text-decoration: underline;
-    text-underline-offset: 4rpx;
-  }
-
-  .home-mp-notify--bound {
-    color: var(--text-muted, #5f7a6d);
-    text-decoration: none;
-  }
-
   .home-menus-loading {
     display: flex;
     flex-direction: column;