Commit 3fbaf70b by 李伟康

替换腾讯地图SDK&切换配置服务

1 parent 778c4184
...@@ -18,8 +18,8 @@ ...@@ -18,8 +18,8 @@
"build": "^0.1.4", "build": "^0.1.4",
"core-js": "^3.6.4", "core-js": "^3.6.4",
"dayjs": "^1.10.5", "dayjs": "^1.10.5",
"glmap-jssdk": "^1.0.1",
"glsx-common": "^2.1.0", "glsx-common": "^2.1.0",
"glsx-map-sdk": "0.0.5",
"lib-flexible": "^0.3.2", "lib-flexible": "^0.3.2",
"number-precision": "^1.6.0", "number-precision": "^1.6.0",
"postcss-loader": "^6.2.0", "postcss-loader": "^6.2.0",
......
import GlMap from 'glmap-jssdk' import GlMap from 'glsx-map-sdk'
export default new GlMap() export default new GlMap()
\ No newline at end of file \ No newline at end of file
...@@ -7,6 +7,8 @@ ...@@ -7,6 +7,8 @@
* @LastEditTime: 2023-01-14 17:31:13 * @LastEditTime: 2023-01-14 17:31:13
*/ */
// 根据环境引入不同配置 process.env.VUE_APP_ENV // 根据环境引入不同配置 process.env.VUE_APP_ENV
import { utils } from 'glsx-common'
let config = require('./conf.js') let config = require('./conf.js')
let timeout = 30000 //超时时间 let timeout = 30000 //超时时间
export const fetchConfig = function (isEnv = true) { export const fetchConfig = function (isEnv = true) {
...@@ -15,12 +17,11 @@ export const fetchConfig = function (isEnv = true) { ...@@ -15,12 +17,11 @@ export const fetchConfig = function (isEnv = true) {
Object.assign(request, { timeout }) Object.assign(request, { timeout })
return Promise.resolve(config) return Promise.resolve(config)
} }
return window.fetch('https://oss-config.glsx.com.cn/mock/618cb9331072f92988f05a23/wx/config', {}).then(res => res.json()) //生产 let params = { moduleName: 'crowdfunding-config', mockUrl: 'https://oss-config.glsx.com.cn/mock/618cb9331072f92988f05a23/wx/config', httpOptions: { Headers: { refererurl: location.href }, request: { timeout: 30000 } } }
return utils.getConfig(params)
// return window.fetch('https://oss-config.dev.glsx.com.cn/mock/618cb9331072f92988f05a23/wx/config', {}).then(res => res.json()) //测试
} }
export const cfg = { export const cfg = {
install(vue, config) { install (vue, config) {
vue.prototype.$config = config vue.prototype.$config = config
} }
} }
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!