fix: 修改环境判断函数
This commit is contained in:
parent
3b14ae373a
commit
4c999ca9bd
|
@ -222,7 +222,7 @@
|
|||
// debugger
|
||||
// xw 模块
|
||||
if (data.is_voucher_auto) {
|
||||
let goto_url = "/xw-pages/homepage.html";
|
||||
const goto_url = "/xw-pages/homepage.html";
|
||||
setTimeout(() => {
|
||||
if (type) {
|
||||
window.location.replace(goto_url);
|
||||
|
|
|
@ -605,11 +605,9 @@
|
|||
* receive_mode: 1 支付宝 2 H5
|
||||
* recharge_type 2 组合立减金 1立减金
|
||||
*/
|
||||
// mozilla/5.0 (iphone; cpu iphone os 11_0 like mac os x) applewebkit/604.1.38 (khtml, like gecko) version/11.0 mobile/15a372 safari/604.1 wechatdevtools/1.06.2308310 micromessenger/8.0.5 language/zh_cn webview/17140096225665648 webdebugger port/60203 token/b278ea8cbbdfa79d02f5eab56caf3a7f
|
||||
if (type == 2) {
|
||||
// 微信公众号授权
|
||||
const ua = navigator.userAgent.toLowerCase();
|
||||
if (ua.match(/MicroMessenger/i) === "micromessenger") {
|
||||
if (navigator.userAgent.toLowerCase().indexOf('micromessenger') !== -1) {
|
||||
// this.publicCollection(res.data.order_number);
|
||||
let wxauth_url = "https://openapi.1688sup.com/wechat/oauth";
|
||||
wxauth_url = `${wxauth_url}?jump=${location.origin}/xw-pages/reduce.html`;
|
||||
|
|
|
@ -256,7 +256,7 @@
|
|||
this.orderId = res.data.order_number;
|
||||
const ua = navigator.userAgent.toLowerCase();
|
||||
// 第一步:是否是微信环境 -> 公众号授权
|
||||
if (ua.match(/MicroMessenger/i) === "micromessenger") {
|
||||
if (navigator.userAgent.toLowerCase().indexOf('micromessenger') !== -1) {
|
||||
this.publicCollection(res.data.order_number);
|
||||
} else {
|
||||
// 第二步:其它环境 微信小程序
|
||||
|
|
Loading…
Reference in New Issue