wakeApp:function(schem, type) {
var urlStr = \'\';
if (type === \'cate\') {
urlStr = schem;
} else {
urlStr = \'tticarstorecall://\' + schem;
}
// 判断机型
var u = navigator.userAgent;
var isAndroid = u.indexOf(\'Android\') > -1 || u.indexOf(\'Adr\') > -1 || u.indexOf(\'Linux\') > -1; // android终端或者uc浏览器
var isiOS = !!u.match(/\\(i[^;]+;( U;)? CPU.+Mac OS X/); // ios终端
// 判断是否在微信或者qq内
var flagqqweixin = false;
var ua = window.navigator.userAgent.toLowerCase();
if (ua.match(/MicroMessenger/i) !== null) {
flagqqweixin = true;
}
if (isAndroid && ua.match(/mobile mqqbrowser/i) !== null) {
// 在QQ空间打开
flagqqweixin = true;
} else if (isiOS && ua.match(/qq/i) !== null) {
flagqqweixin = true;
}
if (!flagqqweixin) {
window.location.href = urlStr;
setTimeout(function () {
window.location.href = window.location.protocol + \'//\' + \'test.h5-share.tticar.com/share\'
// window.location.href = window.location.protocol + \'//\' + window.location.host + \'/share\';
}, 2000);
} else {
return true;
}
},
openApp:function(urlStr) {
var flag = this.wakeApp(urlStr);
if (flag) {
$(\'.page_mask\').css(\'display\', \'block\');
}
},
that.$clickGoodDetails.on(\'click\', function() {
var goodsId = $(this).attr(\'id\');
var urlStr = \'100/\' + goodsId;
that.openApp(urlStr);
});
继续阅读与本文标签相同的文章
上一篇 :
数据缺失的坑,无监督学习这样帮你补了
-
数据结构与算法之约瑟夫问题
2026-05-18栏目: 教程
-
Spring Batch 4.2 新特性
2026-05-18栏目: 教程
-
windows(ECS)网卡信息不一致
2026-05-18栏目: 教程
-
ECS服务器重置密码
2026-05-18栏目: 教程
-
基于宜搭的“企业进销存”实践案例
2026-05-18栏目: 教程
