diff --git a/src/components/bg-menu.vue b/src/components/bg-menu.vue index 59e0012b3fc639c42bfc2545de6ff56178460732..4cd690f1cd5ef9fd9a45064802b35a05e380032a 100644 --- a/src/components/bg-menu.vue +++ b/src/components/bg-menu.vue @@ -7,6 +7,9 @@ }"> @@ -82,6 +85,7 @@ import { mapState, mapMutations } from "vuex"; import { clearCookie } from "../services/cookie.js"; import { resetRouter } from "../router/index"; +import { getImageUrl } from "@/services/helper.js"; import { normalizeProps } from "vue-demi"; export default { @@ -95,6 +99,7 @@ export default { }, data() { return { + getImageUrl, documentScrollTop: 0, cartList: [], showCart: true, @@ -158,6 +163,9 @@ export default { return temp; }, }), + systemLogo() { + return this.$store.state.systemLogo; + }, }, watch: { nameFlag(n, o) { @@ -202,6 +210,7 @@ export default { if (res.data.code == "200") { window.location.href = "/so/manage/ui/#/login"; this.$store.commit("setUserInfo", null); + this.$store.commit("setMenu", null); clearCookie("bgToken"); this.$message.success("退出成功"); resetRouter(); diff --git a/src/components/login-by-account.vue b/src/components/login-by-account.vue index b760459f2ecd21c4069b41f76ad534a3a06a50e7..857f244cee74f9b32b4adaf5b6c5386ab233497b 100644 --- a/src/components/login-by-account.vue +++ b/src/components/login-by-account.vue @@ -129,7 +129,6 @@ const getMenu = (search) => { }; const getUser = () => { Promise.all([getUserInfo(), getMenu("1e99371c-187f-4966-94cf-32f116f42ce6")]).then((res) => { - console.log("res", res); if (res[0].data.code == 200 && res[1].data.code == 200) { let data = (res[1].data.data && res[1].data.data[0].children) || []; store.commit("setUserInfo", res[0].data.data); diff --git a/src/page/login/index.vue b/src/page/login/index.vue index b984ef2dac044233463ea734d2443c98df4e25a9..288a0ae71e7d69e8b1dfce857b42391a3c4344aa 100644 --- a/src/page/login/index.vue +++ b/src/page/login/index.vue @@ -3,7 +3,7 @@ class="login-container" :style="{ 'background-image': `url(${ - configOptions.backgroundUrl ? JSON.parse(configOptions.backgroundUrl)[0].url : getImageUrl('bg.png') + configOptions.bg_image ? JSON.parse(configOptions.bg_image)[0].url : getImageUrl('bg.png') })`, }"> @@ -27,15 +27,15 @@

{{ configOptions.patent }}

- {{ configOptions.icpFiling }} | - - {{ configOptions.publicSecurityFiling }} + {{ configOptions.icp }} | + + {{ configOptions.police }}

- 法律声明 + 法律声明 | - 隐私政策 + 隐私政策

@@ -73,7 +73,6 @@ const validityTips = ref(""); const showValidityDays = ref(false); onBeforeMount(() => { - getLoginPageConfig(); getSysOptions(); }); @@ -84,21 +83,14 @@ const switchPageType = (type) => { const password = () => { router.push("/password"); }; -const getLoginPageConfig = () => { - axios.get(`/apaas/system/v5/login/loginDetail`).then((res) => { - if (res.data.code == 200) { - configOptions.value = res.data.data || null; - store.commit("setSystemLogo", configOptions.value.logoUrl); - } else { - ElMessage.error(res.data.data); - } - }); -}; + //获取首选项配置 const getSysOptions = () => { axios.get(`/v1/api/sysOptions`).then((res) => { if (res.data.code == 200) { - const result = res.data.data || {}; + const result = res.data.data; + configOptions.value = result; + store.commit("setSystemLogo", configOptions.value.logo); if (result.license_dead_date && result.license_inform_day) { calculateValidityDays( new Date().getTime(), diff --git a/src/page/main/authority/user/add/system-form.vue b/src/page/main/authority/user/add/system-form.vue index 28fd0aa6af528b6e79dadc29544a8fe5b8e872f1..1432472fe1c49df92437e68426daebf853b62882 100644 --- a/src/page/main/authority/user/add/system-form.vue +++ b/src/page/main/authority/user/add/system-form.vue @@ -131,7 +131,6 @@ watch( const setForm = (data) => { Object.assign(systemForm, data); - console.log("systemForm", systemForm); }; const orgData = ref([]); diff --git a/src/request/http.js b/src/request/http.js index 5be5a78def497e6299489c3cfdb1e3fd33303715..32ff985b2ac965b3d8d4574b41309c8d28db36b3 100644 --- a/src/request/http.js +++ b/src/request/http.js @@ -28,6 +28,8 @@ const toLogin = () => { let path = router.currentRoute.value.path; //白名单中的401不做跳转 if (!store.state.whiteList.includes(path)) { + store.commit("setUserInfo", null); + store.commit("setMenu", null); window.location.href = `/so/manage/ui/#/login`; } // router.replace({