Showing
1 changed file
with
4 additions
and
0 deletions
@@ -8,6 +8,7 @@ var $ = require('jquery'), | @@ -8,6 +8,7 @@ var $ = require('jquery'), | ||
8 | lazyLoad = require('yoho.lazyload'), | 8 | lazyLoad = require('yoho.lazyload'), |
9 | Handlebars = require('yoho.handlebars'), | 9 | Handlebars = require('yoho.handlebars'), |
10 | tip = require('../plugin/tip'), | 10 | tip = require('../plugin/tip'), |
11 | + loading = require('../plugin/loading'), | ||
11 | chosePanel = require('./chose-panel'); | 12 | chosePanel = require('./chose-panel'); |
12 | 13 | ||
13 | var panelTmpl, | 14 | var panelTmpl, |
@@ -27,6 +28,7 @@ $.get('/cart/index/giftinfoTpl', function(html) { | @@ -27,6 +28,7 @@ $.get('/cart/index/giftinfoTpl', function(html) { | ||
27 | }); | 28 | }); |
28 | 29 | ||
29 | function getProductInfo(skn, promotionId) { | 30 | function getProductInfo(skn, promotionId) { |
31 | + loading.showLoadingMask(); | ||
30 | $.get('/cart/index/giftinfo', { | 32 | $.get('/cart/index/giftinfo', { |
31 | skn: skn, | 33 | skn: skn, |
32 | promotionId: promotionId | 34 | promotionId: promotionId |
@@ -48,6 +50,8 @@ function getProductInfo(skn, promotionId) { | @@ -48,6 +50,8 @@ function getProductInfo(skn, promotionId) { | ||
48 | } | 50 | } |
49 | }).fail(function() { | 51 | }).fail(function() { |
50 | tip.show('网络错误'); | 52 | tip.show('网络错误'); |
53 | + }).always(function() { | ||
54 | + loading.hideLoadingMask(); | ||
51 | }); | 55 | }); |
52 | } | 56 | } |
53 | 57 |
-
Please register or login to post a comment