We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
各个api的env判断中web环境判断条件都是最前置的。 但是在支付宝小程序开发过程中,IDE调试时,env.isWeb = true,导致后续逻辑都不正确。 同时env.isMiniApp = true,建议web环境判断更严谨些。
import uni from '@uni/apis'; console.log(uni.application.getApp(), uni.env.isWeb);
打印结果:
正确应该是返回 getApp()
运行环境:支付宝小程序
// mini.project.json { "format": 2, "miniprogramRoot": "src", "compileOptions": { "component2": true, "typescript": true, "less": true, "enableNodeModuleBabelTransform": true } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
各个api的env判断中web环境判断条件都是最前置的。
但是在支付宝小程序开发过程中,IDE调试时,env.isWeb = true,导致后续逻辑都不正确。
同时env.isMiniApp = true,建议web环境判断更严谨些。
打印结果:
正确应该是返回 getApp()
运行环境:支付宝小程序
The text was updated successfully, but these errors were encountered: