iis服务器助手广告广告
返回顶部
首页 > 资讯 > 移动开发 >iOS和Android手机浏览器链接打开app store或应用市场下载软件
  • 501
分享到

iOS和Android手机浏览器链接打开app store或应用市场下载软件

javascript开发语言ecmascript 2023-09-01 06:09:21 501人浏览 八月长安
摘要

iOS和Android手机浏览器链接打开app store或应用市场下载软件 1.Android主流手机跳转链接 // androidId 如:com.xxx.app// oppooppomarket

iOSAndroid手机浏览器链接打开app store或应用市场下载软件

1.Android主流手机跳转链接

// 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;

2.判断手机类型

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'  }}

3.iOS跳转app store

// 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文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作