lrf402788946 5 năm trước cách đây
mục cha
commit
7990594783
2 tập tin đã thay đổi với 4 bổ sung2 xóa
  1. 2 1
      src/layout/layout-part/heads.vue
  2. 2 1
      src/views/admin-user/index.vue

+ 2 - 1
src/layout/layout-part/heads.vue

@@ -42,7 +42,8 @@ export default {
   methods: {
     ...login(['logout']),
     toLogout() {
-      this.logout();
+      localStorage.removeItem('token');
+      window.location.href = 'http://free.liaoningdoupo.com/platlogin';
       //TODO 跳转到首页
     },
   },

+ 2 - 1
src/views/admin-user/index.vue

@@ -72,7 +72,7 @@ export default {
   methods: {
     ...authUser(['query', 'update', 'create']),
     async search({ skip = 0, limit = 10, ...info } = {}) {
-      const res = await this.query({ skip, limit, ...info });
+      const res = await this.query({ skip, limit, ...info, role: '4' });
       if (this.$checkRes(res)) {
         this.$set(this, `list`, res.data);
         this.$set(this, `total`, res.total);
@@ -85,6 +85,7 @@ export default {
       let res;
       let msg;
       if (isNew) {
+        data.role = '4';
         res = await this.create(data);
         msg = '创建成功';
       } else {