Authored by ccbikai

添加地址修改

@@ -61,10 +61,11 @@ $addressForm.on('submit', function() { @@ -61,10 +61,11 @@ $addressForm.on('submit', function() {
61 url: '/home/saveaddress', 61 url: '/home/saveaddress',
62 data: $(this).serialize() 62 data: $(this).serialize()
63 }).then(function(res) { 63 }).then(function(res) {
64 - res = res || {};  
65 - console.log(res); 64 + if ($.type(res) !== 'object') {
  65 + res = {};
  66 + }
66 if (res.code !== 200) { 67 if (res.code !== 200) {
67 - tip.show(res.message); 68 + tip.show(res.message || '网络出了点问题~');
68 } else { 69 } else {
69 window.location.reload(); 70 window.location.reload();
70 } 71 }