l***@dingtalk.com
l***@dingtalk.com
  • 发布:2025-04-11 09:49
  • 更新:2025-04-11 11:26
  • 阅读:124

【报Bug】HBuilderX 使用ifdef APP-IOS不生效

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Mac

PC开发环境操作系统版本号: macos 14.71

HBuilderX类型: 正式

HBuilderX版本号: 4.57

手机系统: iOS

手机系统版本号: iOS 15

手机厂商: 模拟器

手机机型: Iphone 15 pro

页面类型: vue

vue版本: vue2

打包方式: 云端

项目创建方式: HBuilderX

示例代码:

// #ifdef APP-IOS
console.log("123344444");
const data = await getConfigMsg("APP_PAY_HIDE_VERSION");
console.log("data", data);
plus.runtime.getProperty(plus.runtime.appid, (info) => {
console.log(info.version);
if (data.value.includes(info.version)) {
this.showPay = false;
} else {
this.showPay = true;
this.radiovalue = "airwallex";
}
});
// #endif

操作步骤:

// #ifdef APP-IOS
console.log("123344444");
const data = await getConfigMsg("APP_PAY_HIDE_VERSION");
console.log("data", data);
plus.runtime.getProperty(plus.runtime.appid, (info) => {
console.log(info.version);
if (data.value.includes(info.version)) {
this.showPay = false;
} else {
this.showPay = true;
this.radiovalue = "airwallex";
}
});
// #endif

预期结果:

// #ifdef APP-IOS
console.log("123344444");
const data = await getConfigMsg("APP_PAY_HIDE_VERSION");
console.log("data", data);
plus.runtime.getProperty(plus.runtime.appid, (info) => {
console.log(info.version);
if (data.value.includes(info.version)) {
this.showPay = false;
} else {
this.showPay = true;
this.radiovalue = "airwallex";
}
});
// #endif

实际结果:

// #ifdef APP-IOS
console.log("123344444");
const data = await getConfigMsg("APP_PAY_HIDE_VERSION");
console.log("data", data);
plus.runtime.getProperty(plus.runtime.appid, (info) => {
console.log(info.version);
if (data.value.includes(info.version)) {
this.showPay = false;
} else {
this.showPay = true;
this.radiovalue = "airwallex";
}
});
// #endif

bug描述:

使用ifdef APP-IOS不生效 , 不管是在模拟器还是打包成app都一样不生效 , 以前是没问题的

2025-04-11 09:49 负责人:无 分享
已邀请:
DCloud_UNI_yuhe

DCloud_UNI_yuhe

要回复问题请先登录注册