Browse Source

Merge remote-tracking branch 'origin/gzb' into wzl

gzb
wangzhonglu 7 months ago
parent
commit
7803b83c1f

+ 3
- 3
src/api/school.js View File

51
 /**
51
 /**
52
  * 3.2.0.2用户--校验登录状态
52
  * 3.2.0.2用户--校验登录状态
53
  */
53
  */
54
-export const ulogin_check_login = (data) =>
55
-  setRequest("ulogin/check_login", data);
54
+export const login_check_login = (data) =>
55
+  setRequest("login/check_login", data);
56
 /**
56
 /**
57
  * 3.2.0.3用户--退出登录
57
  * 3.2.0.3用户--退出登录
58
  */
58
  */
59
-export const ulogin_login_out = (data) => setRequest("ulogin/login_out", data);
59
+export const login_login_out = (data) => setRequest("login/login_out", data);
60
 /**
60
 /**
61
  * 3.2.1用户--管理列表
61
  * 3.2.1用户--管理列表
62
  */
62
  */

+ 33
- 2
src/views/layout.vue View File

160
 <script>
160
 <script>
161
 import { admin_detail, admin_edit_phone, admin_edit_pwd } from "@/api/admin";
161
 import { admin_detail, admin_edit_phone, admin_edit_pwd } from "@/api/admin";
162
 import { login_msg_code } from "@/api/login";
162
 import { login_msg_code } from "@/api/login";
163
+import { login_check_login, login_login_out } from "@/api/school";
163
 import { logdoperatemsg_get_nrn } from "@/api/log";
164
 import { logdoperatemsg_get_nrn } from "@/api/log";
164
 import { pwdCheck, reg } from "@/utils";
165
 import { pwdCheck, reg } from "@/utils";
165
 export default {
166
 export default {
218
           }
219
           }
219
         ]
220
         ]
220
       },
221
       },
222
+      time1: null,
221
       userInfo: {}
223
       userInfo: {}
222
     };
224
     };
223
   },
225
   },
236
     this.userInfo = JSON.parse(
238
     this.userInfo = JSON.parse(
237
       localStorage.getItem("xh_control_userInfo")
239
       localStorage.getItem("xh_control_userInfo")
238
     ).content;
240
     ).content;
241
+    this.get_check_user();
239
   },
242
   },
240
   computed: {
243
   computed: {
241
     // 所属名称
244
     // 所属名称
251
     this.$EventBus.$on("nreadChange", () => {
254
     this.$EventBus.$on("nreadChange", () => {
252
       this.nreadNum = this.nreadNum > 0 ? this.nreadNum - 1 : 0;
255
       this.nreadNum = this.nreadNum > 0 ? this.nreadNum - 1 : 0;
253
     });
256
     });
257
+    this.time1 = setInterval(() => {
258
+      this.get_check_user();
259
+    }, 1000 * 60);
260
+  },
261
+  beforeDestroy() {
262
+    if (this.time1) {
263
+      clearInterval(this.time1);
264
+    }
254
   },
265
   },
255
   methods: {
266
   methods: {
267
+    //判断用户是否需要重新登录
268
+    get_check_user() {
269
+      let adminid = this.userInfo.adminid;
270
+      let loginpwd = this.userInfo.loginpwd;
271
+      login_check_login({ adminid, loginpwd }).then((res) => {
272
+        if (res.code === 0) {
273
+          if (res.obj) {
274
+            let needLogin = res.obj.needLogin;
275
+            if (needLogin) {
276
+              this.toLoginOut();
277
+            }
278
+          }
279
+        } else {
280
+          this.toLoginOut();
281
+        }
282
+      });
283
+    },
256
     init() {
284
     init() {
257
       logdoperatemsg_get_nrn({
285
       logdoperatemsg_get_nrn({
258
         rtype: this.powerParams.rtype,
286
         rtype: this.powerParams.rtype,
382
                 phone: "",
410
                 phone: "",
383
                 msgcode: ""
411
                 msgcode: ""
384
               };
412
               };
385
-
386
             }
413
             }
387
           } else {
414
           } else {
388
             this.$Message.error(res.msg);
415
             this.$Message.error(res.msg);
402
     },
429
     },
403
     // 退出
430
     // 退出
404
     toLoginOut() {
431
     toLoginOut() {
405
-      this.$router.push("/login");
432
+      login_login_out({ adminid: this.userInfo.adminid }).then((res) => {
433
+        this.$router.replace({
434
+          path: "/login"
435
+        });
436
+      });
406
     }
437
     }
407
   }
438
   }
408
 };
439
 };

+ 1
- 1
src/views/regionSection/applicationManage/applicationManage.vue View File

471
               placeholder="请输入更新内容"
471
               placeholder="请输入更新内容"
472
             ></Input>
472
             ></Input>
473
             <div class="appcomm">
473
             <div class="appcomm">
474
-              更新描述不能超过1000个字符<span class="red">{{
474
+              更新内容不能超过1000个字符<span class="red">{{
475
                 wallpaperInfo.appRenew.length
475
                 wallpaperInfo.appRenew.length
476
               }}</span
476
               }}</span
477
               >/1000
477
               >/1000

+ 1
- 1
src/views/schoolSection/applicationManage/applicationList.vue View File

450
               placeholder="请输入更新内容"
450
               placeholder="请输入更新内容"
451
             ></Input>
451
             ></Input>
452
             <div class="appcomm">
452
             <div class="appcomm">
453
-              更新描述不能超过1000个字符<span class="red">{{
453
+              更新内容不能超过1000个字符<span class="red">{{
454
                 wallpaperInfo.appRenew.length
454
                 wallpaperInfo.appRenew.length
455
               }}</span
455
               }}</span
456
               >/1000
456
               >/1000

+ 11
- 1
src/views/schoolSection/deviceManage/deviceManage.vue View File

249
                 class="app_list"
249
                 class="app_list"
250
                 v-for="item in strategyInfo.padApps"
250
                 v-for="item in strategyInfo.padApps"
251
                 :key="item.appid"
251
                 :key="item.appid"
252
+                :title="item.appName"
252
               >
253
               >
253
                 <img :src="$api.baseImageUrl + item.appIcon" />
254
                 <img :src="$api.baseImageUrl + item.appIcon" />
254
-                <div>{{ item.appName }}</div>
255
+                <div class="appName">{{ item.appName }}</div>
255
               </div>
256
               </div>
256
             </div>
257
             </div>
257
           </div>
258
           </div>
1822
             height: 40px;
1823
             height: 40px;
1823
             object-fit: cover;
1824
             object-fit: cover;
1824
           }
1825
           }
1826
+          .appName {
1827
+            width: 100px;
1828
+            padding: 0 8px;
1829
+            cursor: pointer;
1830
+            overflow: hidden;
1831
+            text-overflow: ellipsis;
1832
+            white-space: nowrap;
1833
+            line-height: 14px;
1834
+          }
1825
           .checked {
1835
           .checked {
1826
             position: absolute;
1836
             position: absolute;
1827
             right: 2px;
1837
             right: 2px;

Loading…
Cancel
Save