Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
business-assistant
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 17102bab
authored
Mar 01, 2023
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
mock环境配置
1 parent
814c2719
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
3 deletions
api/api.js
utils/request/environment.js
api/api.js
View file @
17102ba
import
api
from
'~/utils/request/request'
import
api
from
'~/utils/request/request'
const
common
=
'scrm.api.carlife.common.'
const
common
=
'scrm.api.carlife.common.'
import
{
mockUrl
}
from
'~/utils/request/http'
module
.
exports
=
{
module
.
exports
=
{
commonApi
:
{
commonApi
:
{
/**上传图片
/**上传图片
...
@@ -22,8 +23,7 @@ module.exports = {
...
@@ -22,8 +23,7 @@ module.exports = {
},
},
/** mock */
/** mock */
getMock
()
{
getMock
()
{
// let url = 'https://oss-config.dev.glsx.com.cn/mock/63fd6c2034c4d918e2f4df4d/config'
const
url
=
mockUrl
let
url
=
'https://oss-config.test.glsx.com.cn/mock/63ff0b507dc47c4edc786e82/config'
return
new
Promise
((
resolve
)
=>
{
return
new
Promise
((
resolve
)
=>
{
wx
.
request
({
wx
.
request
({
url
,
url
,
...
...
utils/request/environment.js
View file @
17102ba
import
{
preReleaseAppId
}
from
'~/config'
import
{
preReleaseAppId
}
from
'~/config'
const
target
=
[
'ip'
,
'dev'
,
'uat'
,
'prod'
,
'preRelease'
]
const
target
=
[
'ip'
,
'dev'
,
'uat'
,
'prod'
,
'preRelease'
]
const
mockObj
=
{
test
:
'https://oss-config.dev.glsx.com.cn/mock/63fd6c2034c4d918e2f4df4d/config'
,
product
:
'https://oss-config.test.glsx.com.cn/mock/63ff0b507dc47c4edc786e82/config'
}
/**
/**
*
*
...
@@ -112,10 +116,19 @@ const defaultMerchantId = {
...
@@ -112,10 +116,19 @@ const defaultMerchantId = {
preRelease
:
'44184606'
,
preRelease
:
'44184606'
,
prod
:
'44189923'
prod
:
'44189923'
}[
target
[
index
]]
}[
target
[
index
]]
let
mockUrl
=
{
ip
:
mockObj
.
test
,
dev
:
mockObj
.
test
,
uat
:
mockObj
.
test
,
preRelease
:
mockObj
.
product
,
prod
:
mockObj
.
product
}[
target
[
index
]]
module
.
exports
=
{
module
.
exports
=
{
index
,
index
,
domain
,
domain
,
pathEnum
,
pathEnum
,
secretKey
,
secretKey
,
defaultMerchantId
defaultMerchantId
,
mockUrl
}
}
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