修改兼容h5调试

This commit is contained in:
2025-12-16 17:32:54 +08:00
parent 08eaa9f438
commit 9be7e49229
8 changed files with 30 additions and 42 deletions

View File

@@ -1,34 +0,0 @@
// const debug = process.env.NODE_ENV == 'development' ? true : false;
const debug = false
// #ifdef H5
const proxyApi = "/api"
// #endif
// #ifdef MP-WEIXIN || APP || MP-ALIPAY
const proxyApi = 'http://192.168.1.42' // 调试地址
const proxyApiwws = 'ws://192.168.1.42:2348' // 调试地址
// #endif
// #ifdef H5
const baseUrl = debug ? proxyApi : "http://192.168.1.42"
const baseUrlwws = 'ws://192.168.1.42:2348'
// #endif
// #ifdef APP || MP-WEIXIN || MP-ALIPAY
const baseUrl = debug ? proxyApi : 'https://cashier.sxczgkj.com' // 线上
const baseUrlwws = debug ? proxyApiwws : 'wss://czgeatws.sxczgkj.com/wss' // 线上
// #endif
const version = '100'
const autoRemoveCache = {
count: 100000,
size: 100000
}
uni.conf = {
debug,
baseUrl,
version,
autoRemoveCache,
baseUrlwws
}

View File

@@ -11,7 +11,9 @@ function get(key) {
return ''
}
// #ifdef H5
return res.value
// #endif
if (res.expiretime && res.expiretime < Date.now()) {
remove(key)

View File

@@ -1,4 +1,3 @@
import './0-conf'
import './1-utils'
import './2-url'
import './3-pro'