WZQ 1 год назад
Родитель
Сommit
e1529092c7

BIN
src/assets/wisdom_images/bj.png


BIN
src/assets/wisdom_images/logins.png


BIN
src/assets/wisdom_images/logoDEl.png


BIN
src/assets/wisdom_images/zuo.png


+ 30 - 33
src/components/common/header.vue

@@ -1,30 +1,31 @@
1 1
 <template>
2 2
   <header class="header">
3 3
     <div class="logo">
4
-      <img src="@/assets/wisdom_images/logo.png" alt="Logo">
4
+      <!-- <img src="@/assets/wisdom_images/logo.png" alt="Logo"> -->
5
+      <img src="@/assets/wisdom_images/logoDEl.png" alt="Logo" />
5 6
     </div>
6 7
     <div class="right-section">
7 8
       <div class="userInfo-2">
8 9
         <el-dropdown trigger="click">
9
-                  <span class="el-dropdown-link">
10
-                    <el-avatar
11
-                      :size="22"
12
-                      icon="el-icon-user-solid"
13
-                      style="vertical-align: middle; cursor: pointer"
14
-                    ></el-avatar>
15
-                    <span style="margin-left: 10px; font-size: .8rem;">{{
16
-                        realName
17
-                      }}</span>
18
-                  </span>
10
+          <span class="el-dropdown-link">
11
+            <el-avatar
12
+              :size="22"
13
+              icon="el-icon-user-solid"
14
+              style="vertical-align: middle; cursor: pointer"
15
+            ></el-avatar>
16
+            <span style="margin-left: 10px; font-size: 0.8rem">{{
17
+              realName
18
+            }}</span>
19
+          </span>
19 20
           <el-dropdown-menu slot="dropdown">
20 21
             <el-dropdown-item
21 22
               @click.native="updatemimas"
22 23
               icon="el-icon-s-promotion"
23
-            >修改密码</el-dropdown-item>
24
-            <el-dropdown-item
25
-              @click.native="logout"
26
-              icon="el-icon-s-promotion"
27
-            >退出登录</el-dropdown-item>
24
+              >修改密码</el-dropdown-item
25
+            >
26
+            <el-dropdown-item @click.native="logout" icon="el-icon-s-promotion"
27
+              >退出登录</el-dropdown-item
28
+            >
28 29
           </el-dropdown-menu>
29 30
         </el-dropdown>
30 31
       </div>
@@ -33,15 +34,14 @@
33 34
   </header>
34 35
 </template>
35 36
 <script>
36
-
37 37
 import topMenu from "./topMenu";
38 38
 import bus from "@/utils/bus.js";
39
-import {mapGetters} from "vuex"
40
-import {clearCacheAndGotoLogin} from "@/utils/loginStatusChecker";
41
-import {logout} from "@/api/login/login";
39
+import { mapGetters } from "vuex";
40
+import { clearCacheAndGotoLogin } from "@/utils/loginStatusChecker";
41
+import { logout } from "@/api/login/login";
42 42
 export default {
43 43
   components: {
44
-    topMenu
44
+    topMenu,
45 45
   },
46 46
   data() {
47 47
     return {
@@ -52,15 +52,13 @@ export default {
52 52
       rightNum: 0,
53 53
       isleft: false,
54 54
       isright: true,
55
-      xzdata: [
56
-
57
-      ],
55
+      xzdata: [],
58 56
       menuUrl: "",
59 57
       accouncementNum: "0",
60 58
     };
61 59
   },
62 60
   computed: {
63
-    ...mapGetters(['realName']),
61
+    ...mapGetters(["realName"]),
64 62
     // ...mapGetters(['sidebar', 'index'])
65 63
     // navData() {
66 64
     //   console.log('navData', this.data[0].children)
@@ -92,9 +90,9 @@ export default {
92 90
       // this.$store.dispatch('LogOut').then(resp => {
93 91
       //   this.$router.push({ name: "login" });
94 92
       // })
95
-      logout().then(resp => {
96
-        clearCacheAndGotoLogin(true)
97
-      })
93
+      logout().then((resp) => {
94
+        clearCacheAndGotoLogin(true);
95
+      });
98 96
     },
99 97
     // // 退出
100 98
     // logout() {
@@ -177,19 +175,19 @@ export default {
177 175
 .header {
178 176
   display: flex;
179 177
   justify-content: space-between;
180
-  background-image: url('../../assets/wisdom_images/banner.png');
178
+  background-image: url("../../assets/wisdom_images/banner.png");
181 179
 }
182 180
 
183 181
 .logo {
184 182
   display: flex;
185
-  align-content: center;
186
-  justify-content: center;
183
+  // align-content: center;
184
+  // justify-content: center;
187 185
   margin-left: 5px;
188 186
 }
189 187
 
190 188
 .logo img {
191 189
   object-fit: contain;
192
-  width: 100%;
190
+  width: 72%;
193 191
   height: auto;
194 192
 }
195 193
 
@@ -219,4 +217,3 @@ export default {
219 217
   margin-bottom: 2px;
220 218
 }
221 219
 </style>
222
-

+ 67 - 54
src/page/login/index.vue

@@ -15,7 +15,9 @@
15 15
             display: inline-block;
16 16
           "
17 17
         />-->
18
-        <img src="../../assets/wisdom_images/qhLoginLogo.png"/>
18
+        <!-- <img src="../../assets/wisdom_images/qhLoginLogo.png"/> -->
19
+        <!-- logins -->
20
+        <img style="width: 100%" src="../../assets/wisdom_images/logins.png" />
19 21
       </div>
20 22
     </div>
21 23
     <div class="login_main">
@@ -186,9 +188,9 @@
186 188
 // import Cookies from 'js-cookie'
187 189
 // import axios from "axios";
188 190
 import { getVerify, getCurrUserDetails } from "@/api/login/login";
189
-import {getFunc, getFuncByUserId} from "@/api/user";
191
+import { getFunc, getFuncByUserId } from "@/api/user";
190 192
 // @TODO 假 token 目前以 session 方式验证用户,后期改为 token
191
-const MOCK_TOKEN = "123"
193
+const MOCK_TOKEN = "123";
192 194
 export default {
193 195
   components: {},
194 196
   name: "login",
@@ -257,17 +259,14 @@ export default {
257 259
       // }
258 260
     },
259 261
     async getVerifyFn() {
260
-      const data = await getVerify()
261
-      const base64 = data.file
262
-      this.img = `data:image/png;base64,${base64}`
262
+      const data = await getVerify();
263
+      const base64 = data.file;
264
+      this.img = `data:image/png;base64,${base64}`;
263 265
     },
264 266
     keyupEnter() {
265 267
       document.onkeydown = (e) => {
266 268
         let body = document.getElementsByTagName("body")[0];
267
-        if (
268
-          (e.keyCode === 13) &&
269
-          this.$route.path == "/login"
270
-        ) {
269
+        if (e.keyCode === 13 && this.$route.path == "/login") {
271 270
           console.log("enter");
272 271
           this.handleLogin();
273 272
         }
@@ -280,56 +279,68 @@ export default {
280 279
           this.loading = true;
281 280
           let password = this.loginForm.password;
282 281
           const data = {
283
-            ... this.loginForm
284
-          }
282
+            ...this.loginForm,
283
+          };
285 284
           data.password = this.$md5(this.loginForm.password);
286 285
           this.$store
287 286
             .dispatch("Login", data)
288 287
             .then((response) => {
289 288
               sessionStorage.menuIdx = 0;
290
-              if (response.status) { // 登录成功
291
-                sessionStorage.setItem('TOKENL', MOCK_TOKEN)
292
-                this.$store.dispatch('GetInfo').then(_ => {
293
-                  this.loading = false;
294
-                  this.$systemUtils.updateUserNamePwd(this.loginForm.name, this.loginForm.password)
289
+              if (response.status) {
290
+                // 登录成功
291
+                sessionStorage.setItem("TOKENL", MOCK_TOKEN);
292
+                this.$store
293
+                  .dispatch("GetInfo")
294
+                  .then((_) => {
295
+                    this.loading = false;
296
+                    this.$systemUtils.updateUserNamePwd(
297
+                      this.loginForm.name,
298
+                      this.loginForm.password
299
+                    );
295 300
 
296
-                  getFunc({}).then(all => {
297
-                    const allTree = this.$systemUtils.buildFuncTree(all)
298
-                    const setting = allTree.find(d => d.funcName == '系统管理')
299
-                    console.log('系统管理', allTree, setting)
300
-                    getFuncByUserId().then(resp => {
301
-                      const tree = this.$systemUtils.buildFuncTree(resp)
302
-                      tree.push(setting)
303
-                      console.log('aaaaaaa', resp, tree)
304
-                      sessionStorage.setItem('FUN_RAW', JSON.stringify(resp))
305
-                      sessionStorage.setItem('FUN_TREE', JSON.stringify(tree))
306
-                      this.$router.push({
307
-                        path: "/home",
301
+                    getFunc({}).then((all) => {
302
+                      const allTree = this.$systemUtils.buildFuncTree(all);
303
+                      const setting = allTree.find(
304
+                        (d) => d.funcName == "系统管理"
305
+                      );
306
+                      console.log("系统管理", allTree, setting);
307
+                      getFuncByUserId().then((resp) => {
308
+                        const tree = this.$systemUtils.buildFuncTree(resp);
309
+                        tree.push(setting);
310
+                        console.log("aaaaaaa", resp, tree);
311
+                        sessionStorage.setItem("FUN_RAW", JSON.stringify(resp));
312
+                        sessionStorage.setItem(
313
+                          "FUN_TREE",
314
+                          JSON.stringify(tree)
315
+                        );
316
+                        this.$router.push({
317
+                          path: "/home",
318
+                        });
308 319
                       });
309
-                    })
310
-                  })
320
+                    });
311 321
 
312
-                  // getFuncByUserId().then(resp => {
313
-                  //   const tree = this.$systemUtils.buildFuncTree(resp)
314
-                  //   console.log('aaaaaaa', resp, tree)
315
-                  //   sessionStorage.setItem('FUN_RAW', JSON.stringify(resp))
316
-                  //   sessionStorage.setItem('FUN_TREE', JSON.stringify(tree))
317
-                  //   this.$router.push({
318
-                  //     path: "/home",
319
-                  //   });
320
-                  // })
321
-
322
-                }).catch(_ => {
323
-                  this.getVerifyFn()
324
-                  this.$message({
325
-                    type: "warning",
326
-                    message: '无法获取用户信息,请重新登录',
322
+                    // getFuncByUserId().then(resp => {
323
+                    //   const tree = this.$systemUtils.buildFuncTree(resp)
324
+                    //   console.log('aaaaaaa', resp, tree)
325
+                    //   sessionStorage.setItem('FUN_RAW', JSON.stringify(resp))
326
+                    //   sessionStorage.setItem('FUN_TREE', JSON.stringify(tree))
327
+                    //   this.$router.push({
328
+                    //     path: "/home",
329
+                    //   });
330
+                    // })
331
+                  })
332
+                  .catch((_) => {
333
+                    this.getVerifyFn();
334
+                    this.$message({
335
+                      type: "warning",
336
+                      message: "无法获取用户信息,请重新登录",
337
+                    });
338
+                    this.loading = false;
327 339
                   });
328
-                  this.loading = false;
329
-                })
330 340
                 this.rememberPasswordFn(password);
331 341
                 this.showDialog = true;
332
-              } else { // 登录失败
342
+              } else {
343
+                // 登录失败
333 344
                 this.getVerifyFn();
334 345
                 this.$message({
335 346
                   type: "warning",
@@ -339,10 +350,10 @@ export default {
339 350
               }
340 351
             })
341 352
             .catch((err) => {
342
-              console.log('login error:', err)
353
+              console.log("login error:", err);
343 354
               this.$message({
344 355
                 type: "warning",
345
-                message: '未知异常 -1',
356
+                message: "未知异常 -1",
346 357
               });
347 358
               this.loading = false;
348 359
             });
@@ -440,7 +451,7 @@ export default {
440 451
     },
441 452
     loadAll() {
442 453
       // return JSON.parse(unescape(this.getCookie("companyloginHistory")));
443
-      return null
454
+      return null;
444 455
     },
445 456
     querySearch(queryString, cb) {
446 457
       var restaurants = this.restaurants;
@@ -557,7 +568,8 @@ h3 {
557 568
   @include relative;
558 569
   height: 100vh;
559 570
   min-height: 600px;
560
-  background: url(../../assets/wisdom_images/bg.png) no-repeat center center;
571
+  // background: url(../../assets/wisdom_images/bg.png) no-repeat center center;
572
+  background: url(../../assets/wisdom_images/bj.png) no-repeat center center;
561 573
   background-size: 100% 100%;
562 574
   background-color: #2d3a4b;
563 575
   input:-webkit-autofill {
@@ -631,7 +643,8 @@ h3 {
631 643
   margin-top: 5%;
632 644
   float: left;
633 645
   height: 433px;
634
-  background: url(../../assets/wisdom_images/cicle.png) top left no-repeat;
646
+  // background: url(../../assets/wisdom_images/cicle.png) top left no-repeat;
647
+  background: url(../../assets/wisdom_images/zuo.png) top left no-repeat;
635 648
   background-size: 80%;
636 649
 }
637 650