fix(config): Correct environment determination logic and enable URL check

- Updated the environment determination logic in config.js to accurately return "development" or "production" based on the current environment.
- Enabled URL check in project.private.config.json to enhance security and validation of URLs.
This commit is contained in:
ethanfly 2026-02-08 08:37:11 +08:00
parent 1a530ebf02
commit a87b9758a3
2 changed files with 2 additions and 2 deletions

View File

@ -29,7 +29,7 @@ const getEnv = () => {
typeof __wxConfig !== "undefined" && __wxConfig && __wxConfig.envVersion typeof __wxConfig !== "undefined" && __wxConfig && __wxConfig.envVersion
? __wxConfig.envVersion ? __wxConfig.envVersion
: "develop"; : "develop";
return envVersion !== "develop" ? "production" : "development"; return envVersion == "develop" ? "development" : "production";
} catch (e) { } catch (e) {
return "development"; return "development";
} }

View File

@ -3,7 +3,7 @@
"projectname": "yingsa", "projectname": "yingsa",
"condition": {}, "condition": {},
"setting": { "setting": {
"urlCheck": false, "urlCheck": true,
"coverView": true, "coverView": true,
"lazyloadPlaceholderEnable": false, "lazyloadPlaceholderEnable": false,
"skylineRenderEnable": false, "skylineRenderEnable": false,