当前位置:网站首页>Is the client that gets the scanning code wechat or Alipay
Is the client that gets the scanning code wechat or Alipay
2022-06-25 09:04:00 【youliroam】
Whether the client to scan the code is wechat or Alipay
Produced QR code :
1) This is how Alipay scans the code
2) Wechat scanning code comes in like this
3) The mobile phone comes with a browser to scan the code
4) The mobile Google browser opens like this
5) The computer Google browser opens like this
The code is as follows :
$(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';
}
}
边栏推荐
- Mapping mode of cache
- Matplotlib simple logistic regression visualization
- 【期末复习笔记】数字逻辑
- How to design test cases
- 在华泰证券上面开户好不好,安不安全?
- 证券开户风险大吗,安全靠谱吗?
- Benefits and types of cloud network technology
- Notes on key words in the original English work biography of jobs (II) [chapter one]
- How to solve the 10061 error of MySQL in Linux
- 【MYSQL】索引的理解和使用
猜你喜欢
Benefits and types of cloud network technology
Oracle-单行函数大全
RMB 3000 | record "tbtools" video, make a friend and get a cash prize!
首期Techo Day腾讯技术开放日,628等你!
CSV parameterization in JMeter
Explanation of assertions in JMeter
compiling stm32f4xx_ it. c... “.\Objects\BH-F407.axf“ - 42 Error(s), 1 Warning(s).
When unity released webgl, jsonconvert Serializeobject() conversion failed
Matplotlib plt Axis() usage
[operation tutorial] how does the tsingsee Qingxi video platform import the old database into the new database?
随机推荐
Jmeter接口测试,关联接口实现步骤(token)
高速缓冲存储器Cache的映射方式
matplotlib matplotlib中axvline()和axhline()函数
socket编程——poll模型
Make a skylearn high-dimensional dataset_ Circles and make_ moons
Where are the hotel enterprises that have been under pressure since the industry has warmed up in spring?
Easyplayer streaming media player plays HLS video. Technical optimization of slow starting speed
Notes on key words in the original English work biography of jobs (II) [chapter one]
声纹技术(六):声纹技术的其他应用
Object. Can defineproperty also listen for array changes?
The city chain technology platform is realizing the real value Internet reconstruction!
Unity--configurable joint -- a simple tutorial to get you started with configurable joints
LVS-DR模式单网段案例
Specific usage of sklearn polynomialfeatures
《乔布斯传》英文原著重点词汇笔记(五)【 chapter three 】
How to solve the 10061 error of MySQL in Linux
socket编程——epoll模型
【MYSQL】事务的理解
On which platform is it safe to buy shares and open an account? Ask for sharing
Matplotlib plt grid()