whj 2 vuotta sitten
vanhempi
commit
532da6f7df
2 muutettua tiedostoa jossa 17 lisäystä ja 6 poistoa
  1. 9 1
      src/api/upms/login.js
  2. 8 5
      src/views/Login.vue

+ 9 - 1
src/api/upms/login.js

@@ -45,7 +45,15 @@ export function getDataDict () {
     }
   })
 }
-
+export function getLogo () {
+  return axios({
+    url: '/upms/configs/logo',
+    method: 'get',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
 export function getSmsCaptcha (parameter) {
   return axios({
     url: '/verify/sms/code/send',

+ 8 - 5
src/views/Login.vue

@@ -3,7 +3,7 @@
     <div class="fh-login">
       <div class="fh-login-left">
         <h2 style="padding-bottom: 0px">CNTHB</h2>
-        <h2 style="padding-bottom: 0px">HITACHI ABB</h2>
+        <h2 style="padding-bottom: 0px">{{ logo }}</h2>
         <h2 style="font-size:30px">设备管理系统</h2>
       </div>
       <div class="fh-login-right">
@@ -63,7 +63,7 @@
 import TwoStepCaptcha from '@/components/tools/TwoStepCaptcha'
 import { mapActions } from 'vuex'
 import { timeFix } from '@/utils/util'
-import { getSmsCaptcha, checkCaptchaCode } from '@/api/upms/login'
+import { getSmsCaptcha, checkCaptchaCode, getLogo } from '@/api/upms/login'
 import { encryptPassword } from '@/common/common'
 import cookie from 'vue-cookie'
 import BaseTool from '@/utils/tool'
@@ -92,7 +92,8 @@ export default {
         smsSendBtn: false
       },
       remberMe: null,
-      password: null
+      password: null,
+      logo: ''
     }
   },
   created () {
@@ -120,8 +121,10 @@ export default {
       })
     })
     this.getCaptchaImage()
-    // this.logo = this.DictCache.getValueByLabelMapByType(this.DictCache.TYPE.LOGO)
-    // console.log(this.logo )
+    getLogo().then(res => {
+      console.log(res)
+      this.logo = res.data
+    })
   },
   methods: {
     ...mapActions(['Login', 'Logout']),