|
|
import 'scss/activity/yoluck/yoluck-detail.page.scss';
|
|
|
|
|
|
const cookie = require('yoho-cookie');
|
|
|
let Swiper = require('yoho-swiper');
|
|
|
const loading = require('js/plugin/loading');
|
|
|
let timeCountDownTpl = require('hbs/activity/yoluck/time-countdown.hbs');
|
|
|
let luckAlertTpl = require('hbs/activity/yoluck/luck-alert.hbs');
|
|
|
let formatCountDown = require('./yoluck/formatCountDown');
|
...
|
...
|
@@ -23,7 +25,7 @@ require('js/plugin/modal.alert'); |
|
|
let store = {
|
|
|
running: false,
|
|
|
shareUid: window.queryString.shareUid || '',
|
|
|
currentVersion: window.queryString.app_version,
|
|
|
currentVersion: cookie.get('app_version'),
|
|
|
targetVersion: '6.8.3',
|
|
|
};
|
|
|
|
...
|
...
|
@@ -35,6 +37,7 @@ let id = $product.data('id'); |
|
|
let user;
|
|
|
let shareData;
|
|
|
|
|
|
loading.init($(document.body));
|
|
|
new Swiper('.swiper-container', {
|
|
|
direction: 'vertical',
|
|
|
lazyLoading: true,
|
...
|
...
|
@@ -86,7 +89,14 @@ function share() { |
|
|
return;
|
|
|
}
|
|
|
|
|
|
yoho.invokeMethod('go.showshareaction', shareData && shareData.app);
|
|
|
loading.showLoading();
|
|
|
getUser().then(() => {
|
|
|
yoho.invokeMethod('go.showshareaction', shareData && shareData.app);
|
|
|
loading.hideLoading();
|
|
|
});
|
|
|
setTimeout(() => {
|
|
|
loading.hideLoading();
|
|
|
}, 4000);
|
|
|
} else if (yoSdk.env === 'h5') {
|
|
|
$('.js-clipbroad').trigger('click');
|
|
|
}
|
...
|
...
|
@@ -117,9 +127,7 @@ let luckAlert = { |
|
|
});
|
|
|
|
|
|
this.$el.on('click', '.share', function() {
|
|
|
getUser().then(() => {
|
|
|
share();
|
|
|
});
|
|
|
share();
|
|
|
});
|
|
|
}
|
|
|
};
|
...
|
...
|
@@ -187,8 +195,6 @@ $('.action-bar-comp').on('click', '.js-join', function() { |
|
|
|
|
|
// 分享
|
|
|
$('.action-bar-comp').on('click', '.js-share', function() {
|
|
|
getUser().then(() => {
|
|
|
share();
|
|
|
});
|
|
|
share();
|
|
|
});
|
|
|
|
...
|
...
|
|