Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-boutique-work-wechat
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
1
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit ab885f72
authored
Jul 12, 2023
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
新增环境配置
1 parent
8abdf513
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
22 deletions
config.js
project.config.json
utils/request/environment.js
config.js
View file @
ab885f7
...
@@ -3,6 +3,12 @@
...
@@ -3,6 +3,12 @@
* 统一管理
* 统一管理
*/
*/
// 配置预发布的小程序aapId
export
const
preReleaseAppId
=
'wxdb25dd43c3e1fc03'
// 小程序id
export
const
appId
=
'wx570d9331f9ace0bd'
/**
/**
* 环境指定
* 环境指定
* 0本地
* 0本地
...
@@ -10,8 +16,9 @@
...
@@ -10,8 +16,9 @@
* 2测试
* 2测试
* 3生产环境
* 3生产环境
* 4预发布
* 4预发布
* 5cdptest
*/
*/
let
index
=
2
let
index
=
5
const
accountInfo
=
wx
.
getAccountInfoSync
()
const
accountInfo
=
wx
.
getAccountInfoSync
()
const
systemInfo
=
wx
.
getSystemInfoSync
()
const
systemInfo
=
wx
.
getSystemInfoSync
()
...
@@ -23,19 +30,24 @@ const release = false
...
@@ -23,19 +30,24 @@ const release = false
// 判断小程序环境
// 判断小程序环境
// develop:开发版 trial:体验版 release:正式版
// develop:开发版 trial:体验版 release:正式版
if
(
systemInfo
.
platform
!=
'devtools'
)
{
if
(
systemInfo
.
platform
!=
'devtools'
)
{
switch
(
envName
)
{
if
(
accountInfo
.
miniProgram
.
appId
==
preReleaseAppId
)
{
case
'develop'
:
index
=
5
break
}
else
{
case
'trial'
:
switch
(
envName
)
{
index
=
manual
?
index
:
2
case
'develop'
:
break
break
case
'release'
:
case
'trial'
:
index
=
release
?
index
:
3
index
=
manual
?
index
:
2
break
break
default
:
case
'release'
:
index
=
3
index
=
release
?
index
:
3
break
break
default
:
index
=
3
break
}
}
}
}
}
export
const
env
=
envName
export
const
env
=
envName
...
@@ -50,11 +62,7 @@ const target = ['ip', 'develop', 'trial', 'release', 'preRelease']
...
@@ -50,11 +62,7 @@ const target = ['ip', 'develop', 'trial', 'release', 'preRelease']
// 报价单图片地址
// 报价单图片地址
export
const
quotedImgUrl
=
createQuotedUrl
[
target
[
envIndex
]]
export
const
quotedImgUrl
=
createQuotedUrl
[
target
[
envIndex
]]
// 配置预发布的小程序aapId
// export const preReleaseAppId = 'wx24ebae5768e74138'
// 小程序id
export
const
appId
=
'wx570d9331f9ace0bd'
// sentry Dsn 地址
// sentry Dsn 地址
export
const
dsnUrl
=
'https://ddaadc52bf8d4ecc92eca632683d456a@sentry.glsx.com.cn/23'
export
const
dsnUrl
=
'https://ddaadc52bf8d4ecc92eca632683d456a@sentry.glsx.com.cn/23'
...
...
project.config.json
View file @
ab885f7
{
{
"appid"
:
"wx
570d9331f9ace0bd
"
,
"appid"
:
"wx
db25dd43c3e1fc03
"
,
"projectname"
:
"%E7%B2%BE%E5%93%81%E5%8D%87%E7%BA%A7"
,
"projectname"
:
"%E7%B2%BE%E5%93%81%E5%8D%87%E7%BA%A7"
,
"compileType"
:
"miniprogram"
,
"compileType"
:
"miniprogram"
,
"libVersion"
:
"2.29.2"
,
"libVersion"
:
"2.29.2"
,
...
...
utils/request/environment.js
View file @
ab885f7
...
@@ -22,6 +22,10 @@ const secretKey_items = {
...
@@ -22,6 +22,10 @@ const secretKey_items = {
preRelease
:
{
preRelease
:
{
appKey
:
'48e5e13229b82c1b4e6e8c96151f0637'
,
appKey
:
'48e5e13229b82c1b4e6e8c96151f0637'
,
secret
:
'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b'
secret
:
'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b'
},
cdptest
:{
appKey
:
'48e5e13229b82c1b4e6e8c96151f0637'
,
secret
:
'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b'
}
}
}
}
const
scrmSecretKey_items
=
{
const
scrmSecretKey_items
=
{
...
@@ -44,15 +48,19 @@ const scrmSecretKey_items = {
...
@@ -44,15 +48,19 @@ const scrmSecretKey_items = {
preRelease
:
{
preRelease
:
{
appKey
:
'd7ffc3346fc9a45bccaaa35300d59022'
,
appKey
:
'd7ffc3346fc9a45bccaaa35300d59022'
,
secret
:
'4bc07f8868374c49a4661d603377e3106fc9a45bccaaa353'
secret
:
'4bc07f8868374c49a4661d603377e3106fc9a45bccaaa353'
},
cdptest
:{
appKey
:
'48e5e13229b82c1b4e6e8c96151f0637'
,
secret
:
'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b'
}
}
}
}
const
domain_items
=
{
const
domain_items
=
{
ip
:
{
ip
:
{
// dj: 'http://192.168.1.165:8292',
// dj: 'http://192.168.1.165:8292',
dj
:
'http://192.168.1.170:8292'
,
//叶立庆
//
dj: 'http://192.168.1.170:8292', //叶立庆
// dj: 'http://192.168.1.169:8292',//蔡远明
// dj: 'http://192.168.1.169:8292',//蔡远明
// dj: 'http://192.168.1.174:8292',//范富荣
// dj: 'http://192.168.1.174:8292',//范富荣
//
dj: 'http://192.168.1.203:8292',//周杭
dj
:
'http://192.168.1.203:8292'
,
//周杭
// dj: 'http://192.168.1.53:8292',//陈希
// dj: 'http://192.168.1.53:8292',//陈希
// dj:'http://192.168.2.59:8292/',//周立明
// dj:'http://192.168.2.59:8292/',//周立明
// scrm: 'http://192.168.1.165:8292'
// scrm: 'http://192.168.1.165:8292'
...
@@ -73,10 +81,15 @@ const domain_items = {
...
@@ -73,10 +81,15 @@ const domain_items = {
preRelease
:
{
preRelease
:
{
dj
:
'https://dj.beta.glsx.com.cn'
,
dj
:
'https://dj.beta.glsx.com.cn'
,
scrm
:
'https://scrm.beta.glsx.com.cn'
scrm
:
'https://scrm.beta.glsx.com.cn'
}
},
cdptest
:
{
dj
:
'https://cdptest.glsx.com.cn'
,
scrm
:
'https://cdptest.glsx.com.cn'
},
}
}
const
target
=
[
'ip'
,
'dev'
,
'uat'
,
'prod'
,
'preRelease'
]
const
target
=
[
'ip'
,
'dev'
,
'uat'
,
'prod'
,
'preRelease'
,
'cdptest'
]
module
.
exports
=
{
module
.
exports
=
{
domain
:
domain_items
[
target
[
envIndex
]],
domain
:
domain_items
[
target
[
envIndex
]],
...
...
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