This commit is contained in:
gyq 2025-05-24 10:27:42 +08:00
parent a38c068db0
commit 64f8618802
1 changed files with 15 additions and 16 deletions

View File

@ -1,10 +1,9 @@
//打包时修改env的值即可 //打包时修改env的值即可
const env='production' //test , production,local const env = 'production' //test , production,local
export const encryptKey='1234567890123456' // http数据加解密的key export const encryptKey = '1234567890123456' // http数据加解密的key
export const apiUrl='/czg/' export const apiUrl = '/czg/'
export const h5Config = { export const h5Config = {
production: 'https://web.hnsiyao.cn', production: 'https://web.hnsiyao.cn',
test: 'https://web-api.hnsiyao.cn', test: 'https://web-api.hnsiyao.cn',
@ -17,30 +16,30 @@ export const AppConfig = {
local: 'http://192.168.1.41:8100' local: 'http://192.168.1.41:8100'
} }
export function returnShareUrl(){ export function returnShareUrl() {
if(env==='test'){ if (env === 'test') {
return 'https://video-h5.hnsiyao.cn' return 'https://video-h5.hnsiyao.cn'
} }
if(env==='production'){ if (env === 'production') {
return 'https://dj-h5.hnsiyao.cn' return 'https://dj-h5.hnsiyao.cn'
} }
if(env==='local'){ if (env === 'local') {
return AppConfig[env] return AppConfig[env]
} }
} }
// #ifdef H5 // #ifdef H5
export default{ export default {
baseUrl:h5Config[env], baseUrl: h5Config[env],
baseApiUrl:h5Config[env]+apiUrl, baseApiUrl: h5Config[env] + apiUrl,
shareUrl:returnShareUrl() shareUrl: returnShareUrl()
} }
// #endif // #endif
// #ifdef APP // #ifdef APP
export default{ export default {
baseUrl:AppConfig[env], baseUrl: AppConfig[env],
baseApiUrl:AppConfig[env]+apiUrl, baseApiUrl: AppConfig[env] + apiUrl,
shareUrl:returnShareUrl() shareUrl: returnShareUrl()
} }
// #endif // #endif