|
|
@@ -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;
|