miaofuhao 7 kuukautta sitten
vanhempi
commit
1613c47576
3 muutettua tiedostoa jossa 22 lisäystä ja 5 poistoa
  1. BIN
      0428-1dist.zip
  2. 18 1
      src/components/main/Navbar/index.vue
  3. 4 4
      src/utils/commonDic.js

BIN
0428-1dist.zip


+ 18 - 1
src/components/main/Navbar/index.vue

6
     <top-nav id="topmenu-container" class="topmenu-container" v-if="settingsStore.topNav" />
6
     <top-nav id="topmenu-container" class="topmenu-container" v-if="settingsStore.topNav" />
7
 
7
 
8
     <div class="right-menu">
8
     <div class="right-menu">
9
+      <div v-if="intervalDate" style="color: #DC143C; font-size: 20px; font-weight: 700; margin-right: 60px;">系统将在{{ intervalDate }}天后到期停止使用,请及时联系管理员。</div>
9
       <!-- 签入界面 -->
10
       <!-- 签入界面 -->
10
       <telephone-login></telephone-login>
11
       <telephone-login></telephone-login>
11
       <template v-if="appStore.device !== 'mobile'">
12
       <template v-if="appStore.device !== 'mobile'">
116
   const appStore = useAppStore()
117
   const appStore = useAppStore()
117
   const userStore = useUserStore()
118
   const userStore = useUserStore()
118
   const settingsStore = useSettingsStore()
119
   const settingsStore = useSettingsStore()
119
-
120
+  
120
   function toggleSideBar() {
121
   function toggleSideBar() {
121
     appStore.toggleSideBar()
122
     appStore.toggleSideBar()
122
   }
123
   }
149
   const activeName = ref(-1);
150
   const activeName = ref(-1);
150
   const loading = ref(false)
151
   const loading = ref(false)
151
   const msgNum = ref(false);
152
   const msgNum = ref(false);
153
+  onMounted(() => {
154
+    getInterval();
155
+  })
156
+   // 授权 到期时间  
157
+   const intervalDate  = ref(0)
158
+   function getInterval() {
159
+    getPageListData('/getauthdate').then(({ data }) => {
160
+      console.log(data)
161
+      intervalDate.value = data || 0;
162
+      if ( data === 0 ) {
163
+        logout()
164
+      }
165
+    })
166
+
167
+  }
152
 
168
 
153
   // 获取消息
169
   // 获取消息
154
   const getMsg = function _f(type = activeName.value) {
170
   const getMsg = function _f(type = activeName.value) {
173
 
189
 
174
     return _f;
190
     return _f;
175
   }();
191
   }();
192
+  
176
   setInterval(() => {
193
   setInterval(() => {
177
     getMsg();
194
     getMsg();
178
   }, 1000 * 30)
195
   }, 1000 * 30)

+ 4 - 4
src/utils/commonDic.js

151
         title: '电话',
151
         title: '电话',
152
         value: '1',
152
         value: '1',
153
     },
153
     },
154
-    // {
155
-    //   title: '短信',
156
-    //   value: '2',
157
-    // }
154
+    {
155
+      title: '短信',
156
+      value: '2',
157
+    }
158
 
158
 
159
 ];
159
 ];
160
 export const followExecution = [{
160
 export const followExecution = [{