if (my.env.platform === 'harmony') {
// 适配鸿蒙
console.log('当前运行在鸿蒙环境');
}
my.getsysteminfo({
success(res) {
if (res.platform === 'harmony') {
// 适配鸿蒙
console.log('当前运行在鸿蒙环境');
}
}
});
if (my.getdevicebaseinfo().platform === 'harmony') {
// 适配鸿蒙
console.log('当前运行在鸿蒙环境');
}