Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
X
Xindu Citizen Applet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
xindu
Xindu Citizen Applet
Commits
6b02f2a6
Commit
6b02f2a6
authored
7 months ago
by
mhy
Browse files
Options
Downloads
Patches
Plain Diff
fix: 新增环境变量配置
parent
d5c330de
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/services/core/api.ts
+38
-22
38 additions, 22 deletions
src/services/core/api.ts
with
38 additions
and
22 deletions
src/services/core/api.ts
+
38
−
22
View file @
6b02f2a6
// 测试/本地
import
Taro
from
"
@tarojs/taro
"
;
export
default
{
dev
:
"
http://171.217.92.33:33011
"
,
uploadUrl
:
"
http://171.217.92.33:33011/oss/upload?bucketName=cgtf
"
,
loginDev
:
"
http://171.217.92.33:21601
"
,
authenticationUrl
:
"
http://171.217.92.33:21601/violating-subject/
"
,
reportUrl
:
"
https://xct.cdhncy.cn/citizen-voice
"
,
assetsUrl
:
"
https://xct.cdhncy.cn/file
"
,
kitchenWasteUrl
:
"
http://171.217.92.33:21601/waste
"
,
eventUrl
:
"
https://xct.cdhncy.cn
"
,
};
const
{
miniProgram
:
{
envVersion
}
}
=
Taro
.
getAccountInfoSync
();
let
urls
=
{}
if
(
envVersion
===
'
develop
'
)
{
// 开发版(开发者工具、预览码、提审时审查人员看到的)
urls
=
{
dev
:
"
https://xct.cdhncy.cn
"
,
uploadUrl
:
"
https://xct.cdhncy.cn/oss/upload?bucketName=cgtf
"
,
loginDev
:
"
https://xct.cdhncy.cn
"
,
authenticationUrl
:
"
https://xct.cdhncy.cn/violating-subject/
"
,
reportUrl
:
"
https://xct.cdhncy.cn/citizen-voice
"
,
assetsUrl
:
"
https://xct.cdhncy.cn/file
"
,
kitchenWasteUrl
:
"
https://xct.cdhncy.cn/waste
"
,
eventUrl
:
"
https://xct.cdhncy.cn
"
,
}
}
else
if
(
envVersion
===
'
trial
'
)
{
// 体验版(体验码)
urls
=
{
dev
:
"
https://xct.cdhncy.cn
"
,
uploadUrl
:
"
https://xct.cdhncy.cn/oss/upload?bucketName=cgtf
"
,
loginDev
:
"
https://xct.cdhncy.cn
"
,
authenticationUrl
:
"
https://xct.cdhncy.cn/violating-subject/
"
,
reportUrl
:
"
https://xct.cdhncy.cn/citizen-voice
"
,
assetsUrl
:
"
https://xct.cdhncy.cn/file
"
,
kitchenWasteUrl
:
"
https://xct.cdhncy.cn/waste
"
,
eventUrl
:
"
https://xct.cdhncy.cn
"
,
}
}
else
{
// 正式版(发布后) 新都正式服务
urls
=
{
dev
:
"
https://api.xinducg.cn
"
,
uploadUrl
:
"
https://xinducg.cn/citizen-voice/oss/upload
"
,
loginDev
:
"
https://api.xinducg.cn
"
,
authenticationUrl
:
"
https://api.xinducg.cn/violating-subject
"
,
reportUrl
:
"
https://api.xinducg.cn/citizen-voice
"
,
assetsUrl
:
"
https://xinducg.cn/file
"
,
kitchenWasteUrl
:
"
https://api.xinducg.cn/waste
"
,
eventUrl
:
"
https://api.xinducg.cn
"
,
}
}
// 新都正式
export
default
urls
// export default {
\ No newline at end of file
// dev: "https://api.xinducg.cn",
// uploadUrl: "https://xinducg.cn/citizen-voice/oss/upload",
// loginDev: "https://api.xinducg.cn",
// authenticationUrl: "https://api.xinducg.cn/violating-subject",
// reportUrl: "https://api.xinducg.cn/citizen-voice",
// assetsUrl: "https://xinducg.cn/file",
// kitchenWasteUrl: "https://api.xinducg.cn/waste",
// eventUrl: "https://api.xinducg.cn",
// };
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment