2021-05-13 10:56:04 +08:00
|
|
|
<template>
|
|
|
|
<div id="app">
|
|
|
|
<router-view/>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2021-12-30 11:16:08 +08:00
|
|
|
|
2022-05-17 09:19:36 +08:00
|
|
|
import storage from '@/plugins/storage';
|
|
|
|
import { getLogoImg} from '@/api/common.js';
|
2021-05-13 10:56:04 +08:00
|
|
|
export default {
|
|
|
|
name: 'App',
|
2021-12-30 11:16:08 +08:00
|
|
|
|
2022-05-17 09:19:36 +08:00
|
|
|
mounted(){
|
|
|
|
//获取LOGO图片
|
|
|
|
getLogoImg().then(res => {
|
|
|
|
if(res.success&&res.result.settingValue){
|
|
|
|
let data = JSON.parse(res.result.settingValue);
|
|
|
|
this.$store.commit("SET_LOGOIMG", data.buyerSideLogo);
|
|
|
|
this.$store.commit("SET_SITENAME", data.siteName);
|
|
|
|
storage.setItem("siteName", data.siteName);
|
|
|
|
window.document.title = data.siteName;
|
|
|
|
//动态获取icon
|
|
|
|
let link =
|
|
|
|
document.querySelector("link[rel*='icon']") ||
|
|
|
|
document.createElement("link");
|
|
|
|
link.type = "image/x-icon";
|
|
|
|
link.href = data.buyerSideLogo;
|
|
|
|
link.rel = "shortcut icon";
|
|
|
|
document.getElementsByTagName("head")[0].appendChild(link);
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
2021-05-13 10:56:04 +08:00
|
|
|
};
|
|
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
|
|
#app{
|
|
|
|
@include background_color($light_background_color);
|
|
|
|
}
|
|
|
|
</style>
|