Authored by 沈志敏

增加app判断

{
"name": "yas-jssdk",
"version": "2.1.3",
"version": "2.2.1",
"description": "YOHO!采集系统的前端js的开发包",
"keywords": ["YOHO!", "Acquisition", "System", "JS-SDK"],
"homepage": "",
... ...
... ... @@ -243,7 +243,7 @@ exports.getDownloadStr = function(isWechat, mktc) {
str += '<a class="download-go-wechat" id="download-go" href="http://union.yoho.cn/union/downapp.html' + (mktc ? '?union_type=' + mktc : '') +'">立即打开</a>';
str += '<a class="download-wechat" id="download-wechat" href="https://mp.weixin.qq.com/mp/profile_ext?action=home&__biz=MjM5MzI3MDkwNg==&scene=110#wechat_redirect">加关注</a></div>';
} else {
str += '<a class="download-go" id="download-go" href="http://union.yoho.cn/union/downapp.html' + (mktc ? '?union_type=' + mktc : '') +'">立即打开</a></div>';
str += '<a class="download-go" id="download-go" href="//m.yohobuy.com/activity/app-downloads">立即打开</a></div>';
}
return str;
}
\ No newline at end of file
... ...
... ... @@ -39,7 +39,7 @@ var appInfo = {
apf: window.location.search.indexOf('app_version=') >= 0 ? 'Y' : 'N'
};
var isApp = navigator.userAgent.indexOf('app_version=') > -1;
var isApp = navigator.userAgent.indexOf('app_version=') > -1 || window.location.search.indexOf('app_version=') > -1 || !!window.yohoInterface;
var isMobile = /(iPhone|Android|iPod|iOS)/i.test(navigator.userAgent);
var isWechat = /micromessenger/i.test(navigator.userAgent);
var ismyhbuy = /m\.yohobuy\.com/i.test(document.domain);
... ...