Browse Source

no message

DaMowang 2 năm trước cách đây
mục cha
commit
6e2d791b81
1 tập tin đã thay đổi với 8 bổ sung8 xóa
  1. 8 8
      src/request/config.js

+ 8 - 8
src/request/config.js

@@ -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/",