JavaScript 判断当前设备是否是移动端还是PC
if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){
alert('移动端')
}else {
alert('PC端')
}
微信URL Scheme,URL唤起微信
微信URL Scheme
在外部浏览器中,可以通过<a href="weixin://">打开微信APP
也可以通过加一些参数,打开微信APP里的指定页面
<a href="weixin://dl/scan">扫一扫</a>
<a href="weixin://dl/feedback">反馈</a>
<a href="weixin://dl/moments">朋友圈</a>
<a href="weixin://dl/settings">设置</a>
<a href="weixin://dl/notifications">消息通知设置</a>
<a href="weixin://dl/general">通用设置</a>
<a href="weixin://dl/officialaccounts">公众号</a>
<a href="weixin://dl/games">游戏</a>
<a href="weixin://dl/help">反馈</a>
<a href="weixin://dl/profile">个人信息</a>
<a href="weixin://dl/features">功能</a>