暂时没有办法,只能判断是否在app或者h5、获取小程序中预编译,或者js动态获取,可能后期 后支持。
// #ifdef APP-PLUS
showClose:true //该代码仅在app中生效
// #endif
// #ifdef H5
showClose:true //该代码仅在h5中生效
// #endif
// #ifdef MP
showClose:true //该代码仅在小程序中生效
// #endif
// #ifdef MP-WEIXIN
showClose:true //该代码仅在微信小程序中生效
// #endif
// #ifdef MP-ALIPAY
showClose:true //该代码仅在支付宝小程序中生效
// #endif
// #ifdef MP-BAIDU
showClose:true //该代码仅在百度小程序中生效
// #endif
// #ifdef MP-TOUTIAO
showClose:true //该代码仅在抖音、头条小程序中生效
// #endif
//360、qq等小程序自己看图吧,就不意义列举了
js判断
let port = uni.getSystemInfoSync().platform
switch (port) {
case 'android':
console.log('Android');//android
break;
case 'ios':
console.log('iOS'); //ios
break;
default:
console.log('小程序');//devtools
break;
} 网友回复
如何写ai提示词让大模型根据主题生成视频脚本json,然后让Hyperframe渲染出mp4视频?
有哪些字体使用等宽编程代码展示?
如果让演唱会歌迷的上万手机屏幕和闪光灯一起被现场中控控制闪烁?
Midjourney为啥进军医疗领域了?
python如何跟踪足球比赛指定球员全场运动标注打聚光灯合成
如何将linux服务器的文件目录映射到windows电脑磁盘?
Docling 与 MarkItDown 两个库有啥不同?
豆包收费后国产其他ai软件也会跟进收费吗?
JPEG 与 HEIF图片格式区别?
centos7版本太旧无法安装python3.11,如何在docker中运行python3.11?


