Authored by ccbikai(👎🏻🍜)

Merge branch 'feature/openapp' into gray

@@ -8,7 +8,7 @@ const getAppPath = () => { @@ -8,7 +8,7 @@ const getAppPath = () => {
8 let ct = qs.mkt_code || qs.union_type; 8 let ct = qs.mkt_code || qs.union_type;
9 9
10 if (ct) { 10 if (ct) {
11 - appPath = appPath.replace('goapp?', 'goapp?ct=' + ct + '&') 11 + appPath = appPath.replace('goapp?', 'goapp?ct=' + ct + '&');
12 } 12 }
13 13
14 return appPath; 14 return appPath;
@@ -16,9 +16,9 @@ const getAppPath = () => { @@ -16,9 +16,9 @@ const getAppPath = () => {
16 16
17 const u = navigator.userAgent; 17 const u = navigator.userAgent;
18 const isFromYOHO = /m\.yohobuy\.com/i.test(document.referrer); 18 const isFromYOHO = /m\.yohobuy\.com/i.test(document.referrer);
19 -const isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); // ios终端 19 +const isiOS = /(iPhone|iPad|iPod|iOS)/i.test(u); // ios终端
20 20
21 -// const isAndroid = u.indexOf('Android') > -1; // android终端 21 +// const isAndroid = /Android/i.test(u); // android终端
22 // const iOSVersion = parseInt(u.match(/OS (\d+)_(\d+)_?(\d+)?/i)[1], 10); 22 // const iOSVersion = parseInt(u.match(/OS (\d+)_(\d+)_?(\d+)?/i)[1], 10);
23 23
24 24