Jelajahi Sumber

登录页面获取数据

wang_xy 2 tahun lalu
induk
melakukan
e0dae6db3e
2 mengubah file dengan 18 tambahan dan 2 penghapusan
  1. 9 1
      src/api/login.js
  2. 9 1
      src/views/system/login.vue

+ 9 - 1
src/api/login.js

@@ -58,4 +58,12 @@ export function getCodeImg() {
     method: 'get',
     timeout: 20000
   })
-}
+}
+
+//获取登录页基本信息
+export function fontConfig() {
+  return request({
+    url: '/system/fontConfig/getSysFontConfig/Agriculture',
+    method: 'get',
+  })
+}

+ 9 - 1
src/views/system/login.vue

@@ -46,7 +46,7 @@
 <script>
 	import StarBackground from '@/components/star'
 	import {
-		getCodeImg
+		getCodeImg,fontConfig
 	} from '@/api/login'
 	import Cookies from 'js-cookie'
 	import {
@@ -108,8 +108,16 @@
 		created() {
 			this.getCode()
 			this.getCookie()
+      this.fontConfig();
 		},
 		methods: {
+      fontConfig(){
+        fontConfig().then(res => {
+          this.systemTitle.title = res.data.fontTitle;
+          this.systemTitle.subTitle = res.data.subTitle;
+          this.backgroudImg = res.data.picUrl;
+        })
+      },
 			getCode() {
 				getCodeImg().then(res => {
 					this.captchaOnOff = res.captchaOnOff === undefined ? true : res.captchaOnOff