...
|
...
|
@@ -2,6 +2,7 @@ |
|
|
* 移动端尝试打开 app
|
|
|
*/
|
|
|
const qs = require('yoho-qs');
|
|
|
const cookie = require('yoho-cookie');
|
|
|
|
|
|
const u = navigator.userAgent;
|
|
|
const isFromYOHO = /m\.yohobuy\.com/i.test(document.referrer);
|
...
|
...
|
@@ -57,11 +58,16 @@ const canOpenApp = () => { |
|
|
const getAppPath = () => {
|
|
|
let appPath = document.getElementById('main-wrap').dataset.apppath || 'yohobuy://yohobuy.com/goapp?openby:yohobuy={"action":"go.home","params":{"gender":"1","channel":"2"}}';
|
|
|
let ct = qs.mkt_code || qs.union_type || getMktcBySeo() || '100000000000349';
|
|
|
let clientId = cookie.get('_yasvd');
|
|
|
|
|
|
if (ct) {
|
|
|
appPath = appPath.replace('goapp?', 'goapp?ct=' + ct + '&');
|
|
|
}
|
|
|
|
|
|
if (clientId) {
|
|
|
appPath = appPath.replace('goapp?', 'goapp?client_id=' + clientId + '&');
|
|
|
}
|
|
|
|
|
|
return appPath;
|
|
|
};
|
|
|
|
...
|
...
|
|