Commit 17102bab by chenwq

mock环境配置

1 parent 814c2719
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,
......
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
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!