Authored by htoooth

fix go app url

... ... @@ -10,6 +10,7 @@ let yoSdk = require('yoho-activity-sdk');
let yoho = require('js/yoho-app');
const tip = require('js/plugin/tip');
const makeShareData = require('./yoluck/share');
const DETAIL_URI = location.protocol + '//m.yohobuy.com/activity/yoluck';
require('js/plugin/modal.alert');
... ... @@ -220,8 +221,26 @@ $tabpanel.on('click', '.js-tab', function() {
$tabpanel
.on('click', '.js-prizeitem', function() {
let id = $(this).data('id');
let href = DETAIL_URI + '/' + id + '.html';
if (yoho && yoho.isApp) {
let link = yoho.parseUrl(href);
yoho.goH5(href, JSON.stringify({
action: 'go.h5',
params: {
islogin: 'N',
type: 0,
updateflag: Date.now() + '',
url: link.path,
param: link.query
}
}));
} else {
window.location.href = href;
}
yoho.goH5(`/activity/yoluck/${id}.html`);
return false;
})
.on('click', '.js-share', function() {
... ...