Skip to content
New issue

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

// #ifdef, 如何加入or的条件 #23

Closed
liuyingqq123 opened this issue Nov 17, 2019 · 1 comment
Closed

// #ifdef, 如何加入or的条件 #23

liuyingqq123 opened this issue Nov 17, 2019 · 1 comment

Comments

@liuyingqq123
Copy link

package.json中

"uni-app": {
"scripts": {
"mp-doctor": {
"title": "医生",
"env": {
"UNI_PLATFORM": "mp-weixin"
},
"define": {
"MP-DOCTOR": true
}
},
"mp-patient": {
"title": "患者",
"env": {
"UNI_PLATFORM": "mp-weixin"
},
"define": {
"MP-PATIENT": true
}
},

在js中区分这两个环境, 想添加OR的条件, 但是下面的用法不好使, 应该如何使用?
// #ifdef MP-DOCTOR || MP-PATIENT
// #endif

@StrivingRabbit
Copy link
Contributor

你好,可以详细的描述一下你的使用场景吗?两个条件都是mp-weixin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants