暂时没有办法,只能判断是否在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;
} 网友回复
python能写一个检测nginx rewrite高危漏洞的工具代码?
css如何给video视频进行mask遮罩?
windows如何同时允许两个用户远程桌面连接同一个电脑?
nginx升级到1.30.1导致无法启动 [emerg] SSL_CTX_new() failed怎么办?
什么是ASLR(地址随机化)?
有没有不依赖embedding向量的RAG技术?
有没有支持实时打断语音通话并后台帮你执行任何的ai模型?
开源ai大模型文件格式GGUF、MLX、Safetensors、 ONNX 有什么区别?
出海挣钱支付收款PayPal、Wise 、PingPong、Stripe如何选择?
如何实现类似google的图片隐形水印添加和识别技术?


