Authored by 杨延青

Merge branch 'feature/yoluckShare' into 'release/0110'

fix copy



See merge request !1657
... ... @@ -190,12 +190,20 @@ if (+fellowInfo.type === 2) {
});
}
(function() {
let lotteryInfo = $('.js-lottery').data('lottery');
let clickFn = function() {
$('.js-fellow').trigger('click');
};
let lotteryInfo = $('.js-lottery').data('lottery') || {};
let clipboardLottery = new Clipboard('.js-lottery', {
text: function() {
return lotteryInfo.h5Copy || '潮流有货';
}
});
clipboardLottery.on('success', function(e) {
fellow(lotteryInfo.h5Tip);
e.clearSelection();
});
let clickFn;
if (lotteryInfo) {
if (yoSdk.env === 'app' && lotteryInfo.app) {
... ... @@ -204,14 +212,19 @@ if (+fellowInfo.type === 2) {
content: `<div>本期中奖号码: <span style="font-weight: bolder;">${lotteryInfo.app}</span></div>` // eslint-disable-line
});
};
} else if (yoSdk.env === 'h5' && lotteryInfo.h5) {
clickFn = function() {
window.location.href = lotteryInfo.h5;
};
} else if (yoSdk.env === 'h5' && +lotteryInfo.h5Type) {
if (+lotteryInfo.h5Type === 2 && lotteryInfo.h5Link) {
clickFn = function() {
window.location.href = lotteryInfo.h5Link;
};
}
}
}
$('.js-lottery').on('click', clickFn);
if (clickFn) {
clipboardLottery.destroy();
$('.js-lottery').on('click', clickFn);
}
}());
let clipboardShare = new Clipboard('.js-clipbroad', {
... ...