当前位置:网站首页>获取扫码的客户端是微信还是支付宝
获取扫码的客户端是微信还是支付宝
2022-06-25 07:37:00 【youliroam】
获取扫码的客户端是微信还是支付宝
制作的二维码:

1) 支付宝扫码进来是这样滴

2)微信扫码进来是这样滴

3)手机自带浏览器扫码进来是这样滴

4)手机谷歌浏览器打开是这样滴

5)电脑谷歌浏览器打开是这样滴

代码如下:
$(function(){
let client = getClient();
alert(client);
})
function getClient(){
let userAgent = navigator.userAgent.toLowerCase();
alert(userAgent);
if(userAgent.indexOf('micromessenger') != -1){
return 'wechat';
}else if(userAgent.indexOf('alipayclient') != -1){
return 'alipay';
}
if (/ipad|iphone|midp|rv:1.2.3.4|ucweb|android|windows ce|windows mobile/.test(userAgent)) {
return 'mobile';
} else {
return 'computer';
}
}
边栏推荐
- C language "recursive series": recursive implementation of 1+2+3++ n
- Home server portal easy gate
- How to calculate the characteristic vector, weight value, CI value and other indicators in AHP?
- LVS-DR模式多网段案例
- 第五天 脚本与UI系统
- [reinforcement learning notes] common symbols in reinforcement learning
- Word2vec, phrases, phraser, keyedvectors commonly used in gensim
- 在网上股票开户安全吗?证券账户可以给别人用吗?
- leetcode.13 --- 罗马数字转整数
- EasyPlayer流媒体播放器播放HLS视频,起播速度慢的技术优化
猜你喜欢

第五天 脚本与UI系统
How to calculate the characteristic vector, weight value, CI value and other indicators in AHP?

atguigu----17-生命周期

如何设计测试用例

leetcode. 13 --- Roman numeral to integer

【515. 在每个树行中找最大值】

Index analysis of DEMATEL model

Word2vec, phrases, phraser, keyedvectors commonly used in gensim

With the beauty of technology enabled design, vivo cooperates with well-known art institutes to create the "industry university research" plan

leetcode.13 --- 罗马数字转整数
随机推荐
[summary] 1361- package JSON and package lock JSON relationship
Fault: 0x800ccc1a error when outlook sends and receives mail
初识生成对抗网络(11)——利用Pytorch搭建WGAN生成手写数字
To achieve good software testing results, it is a prerequisite to build a good testing environment
Scanpy (VII) spatial data analysis based on scanorama integrated scrna seq
【515. 在每个树行中找最大值】
【强化学习笔记】强化学习中的常见符号
Hyper-v:Hyper-v 第 1 代或第 2 代虚拟机
Is there any risk in the security of new bonds
【操作教程】TSINGSEE青犀视频平台如何将旧数据库导入到新数据库?
How to calculate the characteristic vector, weight value, CI value and other indicators in AHP?
leetcode.13 --- 罗马数字转整数
UEFI: repair efi/gpt bootloader
Wechat applet_ 7. Project practice, local life
4 reasons for adopting "safe left shift"
声纹技术(一):声纹技术的前世今生
Swiperefreshlayout+recyclerview failed to pull down troubleshooting
4 raisons inconnues d'utiliser le "déplacement sûr à gauche"
The city chain technology platform is realizing the real value Internet reconstruction!
What is the file that tp6 automatically executes? What does the tp6 core class library do?