...
|
...
|
@@ -6,7 +6,8 @@ |
|
|
var yoho = require('../yoho-app');
|
|
|
var $ = require('yoho-jquery'),
|
|
|
IScroll = require('yoho-iscroll'),
|
|
|
tip = require('../plugin/tip');
|
|
|
loading = require('plugin/loading'),
|
|
|
tip = require('plugin/tip');
|
|
|
|
|
|
var seckillObj = {};
|
|
|
|
...
|
...
|
@@ -191,7 +192,7 @@ seckillObj = { |
|
|
* [异步加载商品列表]
|
|
|
*/
|
|
|
refreshProductList: function(activityId) {
|
|
|
|
|
|
loading.show();
|
|
|
$.ajax({
|
|
|
url: '/product/seckill/get-product-list',
|
|
|
data: {
|
...
|
...
|
@@ -208,6 +209,9 @@ seckillObj = { |
|
|
error: function(data) {
|
|
|
tip.show('网络断开连接了~');
|
|
|
}
|
|
|
})
|
|
|
.always(function() {
|
|
|
loading.hide();
|
|
|
});
|
|
|
},
|
|
|
|
...
|
...
|
@@ -276,19 +280,19 @@ seckillObj = { |
|
|
failTip,
|
|
|
onsuccess;
|
|
|
|
|
|
if (!yoho.isLogin) {
|
|
|
if (!yoho.isLogin()) {
|
|
|
yoho.invokeMethod('go.login');
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
$remindBtn = $(event.currentTarget);
|
|
|
$product = $remindBtn.parent('.item');
|
|
|
$product = $remindBtn.closest('.item');
|
|
|
|
|
|
actionName = $remindBtn.data('data-action');
|
|
|
actionName = $remindBtn.data('action');
|
|
|
|
|
|
// default
|
|
|
on_off = true;
|
|
|
action = 'go.addSecKil';
|
|
|
action = 'go.addSecKill';
|
|
|
params = {
|
|
|
skn: $product.data('skn'),
|
|
|
startTime: $product.find('[data-start]').data('start'),
|
...
|
...
|
@@ -309,18 +313,15 @@ seckillObj = { |
|
|
|
|
|
onsuccess = function() {
|
|
|
$.post('/product/seckill/remind?app_version=1', {
|
|
|
type: actionName,
|
|
|
data: {
|
|
|
on_off: on_off,
|
|
|
activity_id: $product.data('activity'),
|
|
|
product_skn: $product.data('skn'),
|
|
|
uid: yoho.isLogin(),
|
|
|
sec_kill_id: 1,
|
|
|
app_type: 0
|
|
|
}
|
|
|
on_off: on_off,
|
|
|
activity_id: $product.data('activity'),
|
|
|
product_skn: $product.data('skn'),
|
|
|
uid: yoho.isLogin(),
|
|
|
sec_kill_id: 1,
|
|
|
app_type: 0
|
|
|
})
|
|
|
.done(function(res) {
|
|
|
if (res.code === 200 && res.success) {
|
|
|
if (res.code === 200 && res.data === 'success') {
|
|
|
$remindBtn.hide().siblings().show();
|
|
|
tip.show(okTip);
|
|
|
} else {
|
...
|
...
|
|