|
|
@@ -1,18 +1,18 @@
|
|
|
let apis;
|
|
|
-if(process.env.UNI_PLATFORM==="h5"){
|
|
|
- if(window.location.host==="shop-api.haocha13.cn") apis=1
|
|
|
- else apis=0
|
|
|
-}else if(process.env.UNI_PLATFORM==="mp-weixin"){
|
|
|
+if (process.env.UNI_PLATFORM === "h5") {
|
|
|
+ if (window.location.host === "shop-api.haocha13.cn") apis = 1
|
|
|
+ else apis = 0
|
|
|
+} else if (process.env.UNI_PLATFORM === "mp-weixin") {
|
|
|
//develop/开发版 trial/体验版 release/正式版
|
|
|
const accountInfo = wx.getAccountInfoSync();
|
|
|
let envV = accountInfo.miniProgram.envVersion;
|
|
|
- if(envV==="develop") apis=0
|
|
|
- else apis=1
|
|
|
+ if (envV === "release") apis = 1
|
|
|
+ else apis = 0
|
|
|
}
|
|
|
|
|
|
-export default apis==1?{
|
|
|
+export default apis == 1 ? {
|
|
|
Hhost: "https://shop-api.haocha13.cn/v1/",
|
|
|
-}:{
|
|
|
+} : {
|
|
|
// Hhost: "https://shop-api.haocha13.cn/v1/", //正式接口
|
|
|
Hhost: "https://test-api.haocha13.cn/v1/",
|
|
|
// Hhost: "https://tea-api.otcpay12.top/v1/",
|