iOS和Android手机浏览器链接打开app store或应用市场下载软件 1.Android主流手机跳转链接 // androidId 如:com.xxx.app// oppooppomarket
// androidId 如:com.xxx.app// oppooppomarket://details?packagename=' + androidId// huawei'appmarket://details?id' + androidId// xiaomi'mimarket://details?id=' + androidId// vivo'vivomarket://details?id=' + androidId// samsung'samsungapps://ProductDetail/' + androidId// other'market://details?id=' + androidId;
function initMobileType() { let userAgent = navigator.userAgent if (userAgent.includes('iphone')) { return 'iphone'; } else if (userAgent.includes('huawei') || userAgent.includes('honor')) { return 'huawei'; } else if (userAgent.includes('mi') || userAgent.includes('mix') || userAgent.includes('redmi')) { return 'xiaomi'; } else if (userAgent.includes('vivo')) { return 'vivo'; } else if (userAgent.includes('sm')) { return 'samsung'; } else if (userAgent.includes('pacm00') || userAgent.includes('oppo')) { return 'oppo'; } else { return 'default' }}
// iosId 如:id1640184175window.location.href='https://apps.apple.com/cn/app/dsoon/' + iosId
来源地址:https://blog.csdn.net/Berlin_Rome/article/details/129159910
--结束END--
本文标题: iOS和Android手机浏览器链接打开app store或应用市场下载软件
本文链接: https://www.lsjlt.com/news/387563.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-01-21
2023-10-28
2023-10-28
2023-10-27
2023-10-27
2023-10-27
2023-10-27
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0