mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-22 05:56:45 +08:00
【随机密钥加密解密】获取获取浏览器信息(类型及系统)navigator.userAgent,截取字符串获取版本v2,v3
This commit is contained in:
@@ -14,12 +14,17 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
let apiDomain, imgDomain, assetsUrl, mainUrl, payUrl, zssqUrl, REQ_PWD, CACHE_ENCRYP, API_VERSION, assetsUpUrl // 保融支付的收银台服务地址
|
let apiDomain, imgDomain, assetsUrl, mainUrl, payUrl, zssqUrl, REQ_PWD, CACHE_ENCRYP, API_VERSION, assetsUpUrl // 保融支付的收银台服务地址
|
||||||
|
let apiVersion = 'v2'
|
||||||
|
if(navigator.userAgent.indexOf('JZG_') > 0){
|
||||||
|
// console.log(navigator.userAgent,'navigator.userAgent')
|
||||||
|
apiVersion = navigator.userAgent.split('JZG_')[1].split('/')[0].split('_')[1] == 'V3'?'v3':'v2'
|
||||||
|
}
|
||||||
|
|
||||||
// 可以多个接口域名,按需添加
|
// 可以多个接口域名,按需添加
|
||||||
console.log('环境:', process.env.VUE_APP_FLAG)
|
console.log('环境:', process.env.VUE_APP_FLAG)
|
||||||
switch (process.env.VUE_APP_FLAG) {
|
switch (process.env.VUE_APP_FLAG) {
|
||||||
case 'dev':
|
case 'dev':
|
||||||
apiDomain = 'https://iagentsales-test2.e-guofu.com:5200/api/v3' // 国富api ///api/v1
|
apiDomain = 'https://iagentsales-test2.e-guofu.com:5200/api/'+apiVersion // 国富api ///api/v1
|
||||||
imgDomain = 'https://iagentsales-test3.e-guofu.com:5443/updown' // dev
|
imgDomain = 'https://iagentsales-test3.e-guofu.com:5443/updown' // dev
|
||||||
// 静态服务资源
|
// 静态服务资源
|
||||||
assetsUrl = 'https://iagentsales-test2.e-guofu.com:443/app/'
|
assetsUrl = 'https://iagentsales-test2.e-guofu.com:443/app/'
|
||||||
@@ -30,10 +35,10 @@ switch (process.env.VUE_APP_FLAG) {
|
|||||||
zssqUrl = 'https://iagentsales-test2.e-guofu.com:5100/html/test/index.html#/'
|
zssqUrl = 'https://iagentsales-test2.e-guofu.com:5100/html/test/index.html#/'
|
||||||
REQ_PWD = '41424344454631323334353637383930'
|
REQ_PWD = '41424344454631323334353637383930'
|
||||||
CACHE_ENCRYP = '41424344454631323334353637383930'
|
CACHE_ENCRYP = '41424344454631323334353637383930'
|
||||||
API_VERSION = 'v3'
|
API_VERSION = apiVersion
|
||||||
break
|
break
|
||||||
case 'uat':
|
case 'uat':
|
||||||
apiDomain = 'https://iagentsales-test2.e-guofu.com:5200/api/v1' // 国富api
|
apiDomain = 'https://iagentsales-test2.e-guofu.com:5200/api/'+apiVersion // 国富api
|
||||||
imgDomain = 'http://139.199.50.145:7012/updown'
|
imgDomain = 'http://139.199.50.145:7012/updown'
|
||||||
// 静态服务资源
|
// 静态服务资源
|
||||||
assetsUrl = 'https://iagentsales-test2.e-guofu.com:443/app/'
|
assetsUrl = 'https://iagentsales-test2.e-guofu.com:443/app/'
|
||||||
@@ -44,10 +49,10 @@ switch (process.env.VUE_APP_FLAG) {
|
|||||||
zssqUrl = ''
|
zssqUrl = ''
|
||||||
REQ_PWD = '41424344454631323334353637383930'
|
REQ_PWD = '41424344454631323334353637383930'
|
||||||
CACHE_ENCRYP = '41424344454631323334353637383930'
|
CACHE_ENCRYP = '41424344454631323334353637383930'
|
||||||
API_VERSION = 'v2'
|
API_VERSION = apiVersion
|
||||||
break
|
break
|
||||||
case 'prd':
|
case 'prd':
|
||||||
apiDomain = 'https://iagentsales.e-guofu.com/api/v3'
|
apiDomain = 'https://iagentsales.e-guofu.com/api/'+apiVersion
|
||||||
imgDomain = 'https://iagentsales-ud.e-guofu.com:8553/updown'
|
imgDomain = 'https://iagentsales-ud.e-guofu.com:8553/updown'
|
||||||
assetsUrl = 'https://iagentsales-sr.e-guofu.com:8443/'
|
assetsUrl = 'https://iagentsales-sr.e-guofu.com:8443/'
|
||||||
// 上传影像地址 挂载共享盘 地址
|
// 上传影像地址 挂载共享盘 地址
|
||||||
@@ -57,7 +62,7 @@ switch (process.env.VUE_APP_FLAG) {
|
|||||||
zssqUrl = ''
|
zssqUrl = ''
|
||||||
REQ_PWD = '41424344454631323334353637383930'
|
REQ_PWD = '41424344454631323334353637383930'
|
||||||
CACHE_ENCRYP = '41424344454631323334353637383930'
|
CACHE_ENCRYP = '41424344454631323334353637383930'
|
||||||
API_VERSION = 'v3'
|
API_VERSION = apiVersion
|
||||||
break
|
break
|
||||||
case 'dat':
|
case 'dat':
|
||||||
apiDomain = ''
|
apiDomain = ''
|
||||||
@@ -71,7 +76,7 @@ switch (process.env.VUE_APP_FLAG) {
|
|||||||
zssqUrl = ''
|
zssqUrl = ''
|
||||||
REQ_PWD = '41424344454631323334353637383930'
|
REQ_PWD = '41424344454631323334353637383930'
|
||||||
CACHE_ENCRYP = '41424344454631323334353637383930'
|
CACHE_ENCRYP = '41424344454631323334353637383930'
|
||||||
API_VERSION = 'v2'
|
API_VERSION = apiVersion
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user