Authored by 郝肖肖

'进入小程序按钮'

... ... @@ -79,11 +79,12 @@
}
.top-downloadbar .download-go-wechat {
right: 3.425rem;
right: 4.7rem;
background: #000;
}
.top-downloadbar .download-wechat {
.top-downloadbar .download-wechat,
.top-downloadbar .mini-app-open {
position: absolute;
top: 50%;
-webkit-transform: translateY(-50%);
... ... @@ -97,4 +98,4 @@
background: red;
color: #fff;
text-decoration: none;
}
\ No newline at end of file
}
... ...
{
"name": "yas-jssdk",
"version": "2.4.9",
"version": "2.4.10",
"description": "YOHO!采集系统的前端js的开发包",
"keywords": [
"YOHO!",
... ...
... ... @@ -266,18 +266,22 @@ exports.setFontSize = function() {
exports.getDownloadStr = function(isWechat) {
var str = '<div class="top-downloadbar';
if (isWechat) {
str += ' top-downloadbar-wechat';
}
str += '" id="top-downloadbar"><a href="javascript:void(0);" class="download-close" id="download-close"></a>\
<span class="download-icon"></span><span class="download-text">Yoho!Buy有货</span>';
if (isWechat) {
str += '<a class="download-go-wechat" id="download-go" href="https://union.yoho.cn/union/app-downloads.html">立即打开</a>';
str += '<a class="download-wechat" id="download-wechat" href="https://mp.weixin.qq.com/mp/profile_ext?action=home&__biz=MjM5ODI5MDA4MA==&scene=110#wechat_redirect">加关注</a></div>';
str += '<a class="mini-app-open" id="mini-app-open" href="javascript:;">进入小程序</a>';
// str += '<a class="download-wechat" id="download-wechat" href="https://mp.weixin.qq.com/mp/profile_ext?action=home&__biz=MjM5ODI5MDA4MA==&scene=110#wechat_redirect">加关注</a></div>';
} else {
str += '<p class="download-text-desc">新用户送惊喜礼包</p>';
str += '<a class="download-go" id="download-go" href="https://union.yoho.cn/union/app-downloads.html">立即打开</a></div>';
}
return str;
}
... ...
... ... @@ -484,6 +484,21 @@ function setDownloadBar() {
_hmt.push(['_trackEvent', '顶部下载条目', '微信里面关注']);
}
});
var miniAppOpen = document.getElementById('mini-app-open');
ev.addEventHandler(miniAppOpen, 'click', function(){
if (_hmt && _hmt.push) {
_hmt.push(['_trackEvent', '打开小程序按钮', '打开']);
}
});
var miniAppClose = document.getElementById('mini-app-close');
ev.addEventHandler(miniAppClose, 'click', function(){
if (_hmt && _hmt.push) {
_hmt.push(['_trackEvent', '打开小程序按钮', '关闭']);
}
});
}
}
... ... @@ -766,4 +781,4 @@ if (navigator.userAgent.indexOf('YohoBuy-android-yas') > -1) {
});
}
module.exports = _yas;
\ No newline at end of file
module.exports = _yas;
... ...