diff --git a/manager/src/api/common.js b/manager/src/api/common.js index 1fbe6886..f7ec91d7 100644 --- a/manager/src/api/common.js +++ b/manager/src/api/common.js @@ -21,9 +21,9 @@ export const postVerifyImg = (params) => { }; -// 获取系统基础信息 +// 获取系统基础信息(登录页等场景无需 token) export const getBaseSite = () => { - return getRequest(`${commonUrl}/common/common/site`); + return getRequestWithNoToken(`${commonUrl}/common/common/site`); }; // 上传文件 diff --git a/manager/src/views/login.vue b/manager/src/views/login.vue index d60a2092..592ad6d3 100644 --- a/manager/src/views/login.vue +++ b/manager/src/views/login.vue @@ -1,58 +1,74 @@ - - - - - - - - - - - - - - - - - - - - + + + LILISHOP + 企业级电商运营管理平台 + 为平台运营团队提供稳定、高效、可扩展的管理能力 + + 全渠道订单与售后协同处理 + 商品、营销、会员一体化运营 + 多店铺管理与经营数据分析 + + + Copyright © {{ year }} Lilishop + - - + + + + + 账号登录 + 请使用管理员账号登录运营后台 + + + + + - {{ $t("login") }} - {{ $t("logining") }} - - - + + + + + + + + + + + + + + + + {{ $t("login") }} + {{ $t("logining") }} + + - - + + @@ -84,6 +100,7 @@ export default { }, data() { return { + year: new Date().getFullYear(), loading: false, form: { username: "", @@ -152,62 +169,269 @@ export default { diff --git a/manager/src/views/main-parts/header.vue b/manager/src/views/main-parts/header.vue index 2f64c661..71204322 100644 --- a/manager/src/views/main-parts/header.vue +++ b/manager/src/views/main-parts/header.vue @@ -1,7 +1,7 @@ - + @@ -12,26 +12,12 @@ import { getBaseSite } from "@/api/common.js"; export default { data() { return { - domainLogo: require("@/assets/logo.png"), + domainLogo: "", }; }, methods: { - init() { - if ( - !localStorage.getItem("icon") || - !localStorage.getItem("title") || - !localStorage.getItem("icontitle_expiration_time") - ) { - this.getSite(); - } else if (new Date() > localStorage.getItem("icontitle_expiration_time")) { - this.getSite(); - } else { - this.domainLogo = localStorage.getItem("icon"); - this.applyFavicon(localStorage.getItem("icon")); - window.document.title = localStorage.getItem("title") + " - 运营后台"; - } - }, applyFavicon(href) { + if (!href) return; let link = document.querySelector("link[rel*='icon']") || document.createElement("link"); @@ -46,20 +32,22 @@ export default { const { domainLogo, domainIcon, siteName } = JSON.parse( res.result.settingValue ); - this.domainLogo = domainLogo; + this.domainLogo = domainLogo || ""; const expirationTime = new Date().setHours(new Date().getHours() + 1); localStorage.setItem("icontitle_expiration_time", expirationTime); - localStorage.setItem("icon", domainLogo); - localStorage.setItem("domainIcon", domainIcon); - localStorage.setItem("title", siteName); + localStorage.setItem("icon", domainLogo || ""); + localStorage.setItem("domainIcon", domainIcon || ""); + localStorage.setItem("title", siteName || ""); this.applyFavicon(domainIcon || domainLogo); - window.document.title = siteName + " - 运营后台"; + if (siteName) { + window.document.title = siteName + " - 运营后台"; + } } }); }, }, mounted() { - this.init(); + this.getSite(); }, };
LILISHOP
为平台运营团队提供稳定、高效、可扩展的管理能力
Copyright © {{ year }} Lilishop
请使用管理员账号登录运营后台