1
zjq426 2016-09-12 16:02:42 +08:00
支付宝: Mozilla/5.0 (Linux; U; Android 5.1.1; en-us; KIW-AL10 Build/HONORKIW-AL10) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 UCBrowser/1.0.0.100 U3/0.8.0 Mobile Safari/534.30 AlipayDefined(nt:WIFI,ws:360|592|3.0) AliApp(AP/9.5.3.030408) AlipayClient/9.5.3.030408 Language/zh-Hans
网上找的,不一定对 |
2
raycool 2016-09-12 16:07:23 +08:00
|
3
fakefish 2016-09-12 16:27:26 +08:00 3
confirm('您在使用支付宝么?');
|
4
laiqs2011 2016-09-12 16:47:59 +08:00
```
let payEnv; // 判断微信还是支付宝 if (/MicroMessenger/.test(window.navigator.userAgent)) { // 微信 payEnv = 'weixin'; } else if (/AlipayClient/.test(window.navigator.userAgent)) { // 支付宝 payEnv = 'alipay'; } else { payEnv = 'others'; } ``` |
5
mokeyjay 2016-09-12 17:55:40 +08:00
记得支付宝内置浏览器的 UA 里有个 AlipayClient
|