Authored by 陈轩

fix 秒杀 ajax cache

@@ -230,6 +230,7 @@ seckillObj = { @@ -230,6 +230,7 @@ seckillObj = {
230 '/product/seckill/get-product-list'; 230 '/product/seckill/get-product-list';
231 231
232 loading.show(); 232 loading.show();
  233 + self.el.$navList.toggleClass('fix-top', false);
233 $.ajax({ 234 $.ajax({
234 url: url, 235 url: url,
235 data: { 236 data: {
@@ -299,7 +300,10 @@ seckillObj = { @@ -299,7 +300,10 @@ seckillObj = {
299 bindEvents: function() { 300 bindEvents: function() {
300 var self = this; 301 var self = this;
301 var $nav = self.el.$navList; 302 var $nav = self.el.$navList;
302 - var top = $nav.position().top + $nav.height(); 303 + var h = $nav.height();
  304 + var top = $nav.position().top + h;
  305 +
  306 + $nav.wrap('<div style="height:' + h + 'px;"></div>');
303 307
304 if (yoho.isApp) { 308 if (yoho.isApp) {
305 this.$productList.on('click', '[data-remind]', $.proxy(this.toggleRemind, this)); 309 this.$productList.on('click', '[data-remind]', $.proxy(this.toggleRemind, this));
@@ -392,7 +396,10 @@ seckillObj = { @@ -392,7 +396,10 @@ seckillObj = {
392 var $xhr; 396 var $xhr;
393 397
394 loading.show(); 398 loading.show();
395 - $xhr = $.get(location.href) 399 + $xhr = $.ajax({
  400 + url: location.href,
  401 + cache: false
  402 + })
396 .done(function(result) { 403 .done(function(result) {
397 self.$container.replaceWith( 404 self.$container.replaceWith(
398 self.pageTemplate($.extend(result, { 405 self.pageTemplate($.extend(result, {