Skip to content
Snippets Groups Projects
Commit 6b02f2a6 authored by mhy's avatar mhy
Browse files

fix: 新增环境变量配置

parent d5c330de
Branches
No related tags found
No related merge requests found
// 测试/本地 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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment