mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2025-12-17 16:35:53 +08:00
修改高德地图key更新此commit 之前请务必确认一下创建的高德key日期。修改部分方法名称
This commit is contained in:
@@ -19,12 +19,9 @@ export const getVerifyImg = (verificationEnums) => {
|
||||
export const postVerifyImg = (params) => {
|
||||
return postRequestWithNoToken(`${commonUrl}/common/common/slider/${params.verificationEnums}`, params);
|
||||
};
|
||||
//获取LOGO
|
||||
export const getLogo = ()=>{
|
||||
return getRequest (`${commonUrl}/common/common/logo`);
|
||||
};
|
||||
|
||||
|
||||
// 获取系统基础信息
|
||||
export const getSetsite = () => {
|
||||
export const getBaseSite = () => {
|
||||
return getRequest(`${commonUrl}/common/common/site`);
|
||||
};
|
||||
};
|
||||
|
||||
@@ -4,14 +4,10 @@ module.exports = {
|
||||
* 高德地图申请链接
|
||||
* https://lbs.amap.com/api/javascript-api/guide/abc/prepare
|
||||
* 添加成功后,可获取到key值和安全密钥jscode(自2021年12月02日升级,升级之后所申请的 key 必须配备安全密钥 jscode 一起使用)
|
||||
* 如果是2021年12月02日之后的需要在main.js中添加如下代码
|
||||
* window._AMapSecurityConfig = {
|
||||
* securityJsCode:'您申请的安全密钥',
|
||||
* }
|
||||
*
|
||||
* 如果2021年12月02日之前申请的无视上面代码
|
||||
*/
|
||||
aMapKey: "b440952723253aa9fe483e698057bf7d",
|
||||
//FIXME 请检查当前高德key创建的日期,如果2021年12月02日之前申请的 无需填写安全密钥
|
||||
aMapSecurityJsCode:"2bd0fbf621881f4c77be74f0e76495f3", // 高德web端js申请的安全密钥
|
||||
aMapKey: "7f11113750315d8543daaf5c3ba353ca", //高德web端js申请的api key
|
||||
website: "https://www.pickmall.cn", //官网地址
|
||||
enableCDN: true, //生产环境 是否启用cdn加载 vue等js
|
||||
port: 10003, //端口
|
||||
|
||||
@@ -24,6 +24,14 @@ import {md5} from '@/utils/md5.js';
|
||||
// 打印
|
||||
import Print from 'vue-print-nb';
|
||||
Vue.use(Print);
|
||||
const { aMapSecurityJsCode } = require("@/config");
|
||||
// 高德安全密钥
|
||||
if (aMapSecurityJsCode) {
|
||||
window._AMapSecurityConfig = {
|
||||
securityJsCode: aMapSecurityJsCode,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Vue.config.devtools = true;
|
||||
Vue.config.productionTip = false
|
||||
|
||||
@@ -84,7 +84,7 @@ import circleLoading from "@/views/my-components/lili/circle-loading.vue";
|
||||
import Cookies from "js-cookie";
|
||||
import util from "@/libs/util.js";
|
||||
import { getNoticePage, logout } from "@/api/index";
|
||||
import { getLogo, getSetsite } from "@/api/common";
|
||||
import { getBaseSite } from "@/api/common";
|
||||
|
||||
var client;
|
||||
export default {
|
||||
@@ -130,18 +130,15 @@ export default {
|
||||
this.sliceNum = 2;
|
||||
}
|
||||
//获取domainLogo
|
||||
getSetsite().then((res) => {
|
||||
getBaseSite().then((res) => {
|
||||
const { domainLogo, siteName } = JSON.parse(res.result.settingValue);
|
||||
// console.log(data, "ressss");
|
||||
|
||||
//list:res.result.settingValue.join(",")
|
||||
this.domainLogo = domainLogo;
|
||||
//动态获取icon
|
||||
this.setStore("icon", this.domainLogo);
|
||||
// this.domainLogo = this.domainLogo;
|
||||
let link =
|
||||
document.querySelector("link[rel*='icon']") ||
|
||||
document.ceateElement("link");
|
||||
document.createElement("link");
|
||||
link.type = "image/x-icon";
|
||||
link.href = this.domainLogo;
|
||||
link.rel = "shortcut icon";
|
||||
@@ -150,13 +147,7 @@ export default {
|
||||
this.setStore("title", siteName);
|
||||
window.document.title = siteName + " - 运营后台";
|
||||
}),
|
||||
getLogo().then((res) => {
|
||||
if (res.success && res.result.settingValue) {
|
||||
let data = JSON.parse(res.result.settingValue);
|
||||
|
||||
console.log(data);
|
||||
}
|
||||
});
|
||||
// 读取未读消息数
|
||||
getNoticePage({}).then((res) => {
|
||||
if (res.success) {
|
||||
|
||||
Reference in New Issue
Block a user