|
|
@@ -1,5 +1,17 @@
|
|
|
let v = wx.getAccountInfoSync()
|
|
|
-let apiUrl = `${v.miniProgram.envVersion == 'release'?'https://interface.huihenduo.com.cn/hhd-pat/':'https://interface.huihenduo.com.cn/hhd-pat-dev/'}`
|
|
|
+let appVersion = wx.getStorageSync('appVersion')
|
|
|
+let {
|
|
|
+ envVersion
|
|
|
+} = v.miniProgram
|
|
|
+if (appVersion != envVersion) {
|
|
|
+ wx.clearStorage({
|
|
|
+ success: (res) => {
|
|
|
+ wx.setStorageSync('appVersion', envVersion)
|
|
|
+ },
|
|
|
+ })
|
|
|
+
|
|
|
+}
|
|
|
+let apiUrl = `${envVersion == 'release'?'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) => {
|