/* 点击事件 */
downApp() {
let sysInfo = uni.getSystemInfoSync()
if (sysInfo.osName == 'ios') { // ios
/* 跳转到ios商店 id后面接的就是苹果id */
window.location.replace(`itms-appss://apps.apple.com/cn/app/id6479005866`)
} else { // android
this.detectDeviceBrand(sysInfo.ua)
}
},
detectDeviceBrand(userAgent) {
/* 包名 com.leaf.game.edh*/
/*在微信h5 跳转到应用宝 */
if(/MicroMessenger|WeXin|WeChat/g.test(userAgent)){
window.location.replace("https://a.app.qq.com/o/simple.jsp?pkgname=com.leaf.game.edh")
return
}
/* 在其他浏览器跳到对应的应用商店 */
window.location.replace("market://details?id=com.leaf.game.edh")
}
uniapp H5打开应用商店
最新推荐文章于 2024-05-06 16:39:37 发布