mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2025-12-20 01:45:53 +08:00
修改高德地图key更新此commit 之前请务必确认一下创建的高德key日期。修改部分方法名称
This commit is contained in:
@@ -1,40 +1,39 @@
|
||||
<template>
|
||||
<div id="app">
|
||||
<router-view/>
|
||||
<router-view />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import storage from '@/plugins/storage';
|
||||
import { getLogoImg} from '@/api/common.js';
|
||||
import storage from "@/plugins/storage";
|
||||
import { getBaseSite } from "@/api/common.js";
|
||||
export default {
|
||||
name: 'App',
|
||||
name: "App",
|
||||
|
||||
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);
|
||||
}
|
||||
})
|
||||
}
|
||||
mounted() {
|
||||
//获取基本站点信息
|
||||
getBaseSite().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);
|
||||
}
|
||||
});
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
#app{
|
||||
#app {
|
||||
@include background_color($light_background_color);
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user