__wxConfig判断环境导致真机关闭调试无法联网如何解决?
真机在开启调试下__wxConfig.envVersion可以正常判断开发版和体验版,但是关闭调试__wxConfig.envVersion虽然可以获取但是无法发送请求,求官方大佬帮忙看一下 const env = typeof __wxConfig !== "undefined" ? __wxConfig.envVersion || "release" : "release"; const isProd = env === "release"; const protocol = isProd ? "https://" : "http://"; const baseApi = { develop: "testapi.com", trial: 'readyapi.com', release: "api.com" }; export const api = protocol + baseApi[env];