Authored by ccbikai

修改地址添加 loading

... ... @@ -5,7 +5,8 @@
*/
var $ = require('jquery'),
tip = require('../plugin/tip');
tip = require('../plugin/tip'),
loading = require('../plugin/loading');
var $action = $('.action'),
$addressForm = $('.edit-address'),
... ... @@ -67,6 +68,7 @@ $confim.on('touchend', '.cancel', function() {
deleteId = null;
$confim.hide();
}).on('touchend', '.confim', function() {
loading.showLoadingMask();
$.ajax({
method: 'POST',
url: '/home/deladdress',
... ... @@ -87,6 +89,7 @@ $confim.on('touchend', '.cancel', function() {
}).always(function() {
deleteId = null;
$confim.hide();
loading.hideLoadingMask();
});
});
... ... @@ -137,6 +140,7 @@ $addressForm.on('submit', function() {
}
isSubmiting = true;
loading.showLoadingMask();
$.ajax({
method: 'POST',
url: '/home/saveaddress',
... ... @@ -154,6 +158,7 @@ $addressForm.on('submit', function() {
tip.show('网络出了点问题~');
}).always(function() {
isSubmiting = false;
loading.hideLoadingMask();
});
return false;
});
... ...