Browse Source

更新 接口调用逻辑

wangzhihui 4 năm trước cách đây
mục cha
commit
db21fa192e
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  1. 2 1
      miniprogram/apis/apiConfig.js

+ 2 - 1
miniprogram/apis/apiConfig.js

@@ -1,4 +1,5 @@
-let apiUrl = "https://interface.huihenduo.com.cn/hhd-pat/"
+let v = wx.getAccountInfoSync()
+let apiUrl = `${v.miniProgram.version?'https://interface.huihenduo.com.cn/hhd-pat/':'https://interface.huihenduo.com.cn/hhd-pat-dev/'}`
 
 function api(url, data, method) {
   return new Promise((resolve, reject) => {