Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
scrm-wx-merchant-activity
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 3fbaf70b
authored
Jul 04, 2023
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
替换腾讯地图SDK&切换配置服务
1 parent
778c4184
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
7 deletions
package.json
src/api/mapApi.js
src/config/index.js
package.json
View file @
3fbaf70
...
@@ -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"
,
...
...
src/api/mapApi.js
View file @
3fbaf70
import
GlMap
from
'gl
map-js
sdk'
import
GlMap
from
'gl
sx-map-
sdk'
export
default
new
GlMap
()
export
default
new
GlMap
()
\ No newline at end of file
\ No newline at end of file
src/config/index.js
View file @
3fbaf70
...
@@ -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
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment