51 lines
1.8 KiB
JavaScript
51 lines
1.8 KiB
JavaScript
|
|
function hostConfig(){
|
|
const Hosts = {
|
|
host_dev:'https://dev.hospital.applets.igandanyiyuan.com',
|
|
img_dev: 'https://img.applets.igandanyiyuan.com/applet/patient/static', //开发环境
|
|
agree_dev:'https://img.applets.igandanyiyuan.com',
|
|
host_prod:'https://prod.hospital.applets.igandanyiyuan.com',
|
|
img_prod: 'https://oss.prod.applets.igandanyiyuan.com/applet/patient/static', //线上环境
|
|
agree_prod:'https://oss.prod.applets.igandanyiyuan.com',
|
|
};
|
|
const { envVersion } = wx.getAccountInfoSync().miniProgram;
|
|
let imghost="";
|
|
let host='';
|
|
let agreehost='';
|
|
let SECRETKEY='';
|
|
let SDKAPPID='';
|
|
switch (envVersion) {
|
|
case 'develop': //开发环境
|
|
// host =`${Hosts.host_prod}`;
|
|
// imghost=`${Hosts.img_prod}`;
|
|
// agreehost=`${Hosts.agree_prod}`
|
|
host = `${Hosts.host_dev}`;
|
|
imghost= `${Hosts.img_dev}`;
|
|
agreehost= `${Hosts.agree_dev}`;
|
|
SECRETKEY='fc45ab469ca632a700166973d87b3a6f56a855cb92d7cffb54e4d37135c097da';
|
|
SDKAPPID='1400798221';
|
|
break;
|
|
case 'trial': //体验版环境
|
|
// host =`${Hosts.host_prod}`;
|
|
// imghost=`${Hosts.img_prod}`;
|
|
// agreehost=`${Hosts.agree_prod}`
|
|
host = `${Hosts.host_dev}`;
|
|
imghost=`${Hosts.img_dev}`;
|
|
agreehost=`${Hosts.agree_dev}`;
|
|
SECRETKEY='fc45ab469ca632a700166973d87b3a6f56a855cb92d7cffb54e4d37135c097da';
|
|
SDKAPPID='1400798221';
|
|
break;
|
|
case 'release':
|
|
host =`${Hosts.host_prod}`;
|
|
imghost=`${Hosts.img_prod}`;
|
|
agreehost=`${Hosts.agree_prod}`;
|
|
SECRETKEY='a5bcd8c583181cf004e9d91a47687d719d4b5d2a10ce33fbee95d587889447d8';
|
|
SDKAPPID='1400796919';
|
|
break;
|
|
};
|
|
return { host, imghost,agreehost,SECRETKEY,SDKAPPID};
|
|
|
|
}
|
|
module.exports={
|
|
hostConfig
|
|
} |