Commit 0160cf26 authored by 姬鋆屾's avatar 姬鋆屾

推修改门户的登录页背景图通过接口获取

parent 169b88ad
# 开发环境配置 # 开发环境配置
NODE_ENV = development NODE_ENV = development
# VUE_APP_API_BASE_URL=http://8.136.255.30:11078 # VUE_APP_API_BASE_URL=http://8.136.255.30:11078
VUE_APP_API_BASE_URL=http://192.168.0.124:11078 VUE_APP_API_BASE_URL=http://192.168.0.98:11078
#图片显示拼接 #图片显示拼接
# VUE_APP_API_IMG_URL=http://8.136.255.30:11078/ # VUE_APP_API_IMG_URL=http://8.136.255.30:11078/
VUE_APP_API_IMG_URL=http://192.168.0.124:11078/ VUE_APP_API_IMG_URL=http://192.168.0.98:11078/
#余林 #余林
# VUE_APP_API_PHP_URL=http://8.136.255.30:8090 # VUE_APP_API_PHP_URL=http://8.136.255.30:8090
VUE_APP_API_PHP_URL=http://192.168.0.124:8090 VUE_APP_API_PHP_URL=http://192.168.0.98:8090
#宜宾 #宜宾
#VUE_APP_API_BASE_URL=http://10.12.185.213:11072 #VUE_APP_API_BASE_URL=http://10.12.185.213:11072
...@@ -18,7 +18,7 @@ export function changePassword(params) { ...@@ -18,7 +18,7 @@ export function changePassword(params) {
} }
// 1.2.5. 查询门户口号 // 1.2.5. 查询门户口号
export function getSlogan(params) { export function getSlogan(params) {
return http.post(`${baseURL}/base/param/key?key=title`); return http.post(`${baseURL}/base/param/key?key=${params}`);
} }
// 管理员修改密码 // 管理员修改密码
export function editPassword(params) { export function editPassword(params) {
......
<template> <template>
<div class="login h-full w-full"> <div
class="login h-full w-full"
:style="{ backgroundImage: `url(${imgUrl})` }"
>
<div class="main h-full w-full flex items-center justify-between"> <div class="main h-full w-full flex items-center justify-between">
<div class="slogan"> <div class="slogan">
<p class="slogan-text slogan-text-1 mb-12">{{ sloganTitle }}</p> <p class="slogan-text slogan-text-1 mb-12">{{ sloganTitle }}</p>
...@@ -312,6 +315,7 @@ export default { ...@@ -312,6 +315,7 @@ export default {
{ required: true, validator: changePwdAgain, trigger: "blur" }, { required: true, validator: changePwdAgain, trigger: "blur" },
], ],
}, },
imgUrl: "",
}; };
}, },
computed: { computed: {
...@@ -330,7 +334,17 @@ export default { ...@@ -330,7 +334,17 @@ export default {
methods: { methods: {
...mapMutations("user", ["set_token", "SET_USERDATA", "set_siteList"]), ...mapMutations("user", ["set_token", "SET_USERDATA", "set_siteList"]),
getTitle() { getTitle() {
getSlogan().then((res) => { getSlogan("signImg").then((res) => {
if (res.code == 1) {
res.data
? (this.imgUrl = res.data)
: (this.imgUrl = require("@/assets/images/login_bg.jpg"));
// res.data
// ? (this.imgUrl = require("@/assets/images/login_bg.jpg"))
// : (this.imgUrl = res.data);
}
});
getSlogan("title").then((res) => {
if (res.code == 1) { if (res.code == 1) {
this.sloganTitle = res.data; this.sloganTitle = res.data;
localStorage.setItem("sloganTitle", res.data); localStorage.setItem("sloganTitle", res.data);
...@@ -492,7 +506,7 @@ export default { ...@@ -492,7 +506,7 @@ export default {
--input-height: 50px; --input-height: 50px;
--input-border-color: rgba(238, 238, 238, 1); --input-border-color: rgba(238, 238, 238, 1);
--time: 1.5s; --time: 1.5s;
background: url("@/assets/images/login_bg.jpg"); // background: url("@/assets/images/login_bg.jpg");
background-size: 100% auto; background-size: 100% auto;
animation: bg-roll 150s cubic-bezier(0.21, 0.07, 0.88, 1.02) infinite; animation: bg-roll 150s cubic-bezier(0.21, 0.07, 0.88, 1.02) infinite;
.main { .main {
......
...@@ -16,6 +16,10 @@ module.exports = defineConfig({ ...@@ -16,6 +16,10 @@ module.exports = defineConfig({
"^/api": "", "^/api": "",
}, },
}, },
"/file": {
target: process.env.VUE_APP_API_BASE_URL,
changeOrigin: true,
},
}, },
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment