|
@@ -22,7 +22,19 @@ var removedProsInfo = []; |
|
@@ -22,7 +22,19 @@ var removedProsInfo = []; |
22
|
var removedGoodsTpl = require('../../../tpl/shopping/removed-goods.hbs');
|
22
|
var removedGoodsTpl = require('../../../tpl/shopping/removed-goods.hbs');
|
23
|
var editTpl = require('../../../tpl/shopping/edit-color-size.hbs');
|
23
|
var editTpl = require('../../../tpl/shopping/edit-color-size.hbs');
|
24
|
|
24
|
|
25
|
-var Cart = {
|
25
|
+var Cart;
|
|
|
26
|
+
|
|
|
27
|
+require('yoho-jquery-dotdotdot');
|
|
|
28
|
+
|
|
|
29
|
+function dotName() {
|
|
|
30
|
+
|
|
|
31
|
+ // product name dotdotdot
|
|
|
32
|
+ $('.pro-name a').dotdotdot({
|
|
|
33
|
+ wrap: 'letter'
|
|
|
34
|
+ });
|
|
|
35
|
+}
|
|
|
36
|
+
|
|
|
37
|
+Cart = {
|
26
|
/*
|
38
|
/*
|
27
|
* 添加到购物车
|
39
|
* 添加到购物车
|
28
|
* @function [addToCart]
|
40
|
* @function [addToCart]
|
|
@@ -111,6 +123,8 @@ var Cart = { |
|
@@ -111,6 +123,8 @@ var Cart = { |
111
|
success: function(res) {
|
123
|
success: function(res) {
|
112
|
Util.refreshCart(res, function() {
|
124
|
Util.refreshCart(res, function() {
|
113
|
Stepper.init();
|
125
|
Stepper.init();
|
|
|
126
|
+
|
|
|
127
|
+ dotName();
|
114
|
if (callback) {
|
128
|
if (callback) {
|
115
|
return callback();
|
129
|
return callback();
|
116
|
}
|
130
|
}
|
|
@@ -134,6 +148,7 @@ var Cart = { |
|
@@ -134,6 +148,7 @@ var Cart = { |
134
|
if (res.code === 200) {
|
148
|
if (res.code === 200) {
|
135
|
Util.refreshCart(res, function() {
|
149
|
Util.refreshCart(res, function() {
|
136
|
Stepper.init();
|
150
|
Stepper.init();
|
|
|
151
|
+ dotName();
|
137
|
});
|
152
|
});
|
138
|
} else {
|
153
|
} else {
|
139
|
new _alert(res.message).show();
|
154
|
new _alert(res.message).show();
|
|
@@ -204,6 +219,7 @@ var Cart = { |
|
@@ -204,6 +219,7 @@ var Cart = { |
204
|
success: function(res) {
|
219
|
success: function(res) {
|
205
|
Util.refreshCart(res, function() {
|
220
|
Util.refreshCart(res, function() {
|
206
|
Stepper.init();
|
221
|
Stepper.init();
|
|
|
222
|
+ dotName();
|
207
|
|
223
|
|
208
|
// 显示或者更新删除商品模块
|
224
|
// 显示或者更新删除商品模块
|
209
|
Cart.showRemovedProducts(products, extraInfos);
|
225
|
Cart.showRemovedProducts(products, extraInfos);
|
|
@@ -298,6 +314,8 @@ var Cart = { |
|
@@ -298,6 +314,8 @@ var Cart = { |
298
|
success: function(res) {
|
314
|
success: function(res) {
|
299
|
Util.refreshCart(res, function() {
|
315
|
Util.refreshCart(res, function() {
|
300
|
Stepper.init();
|
316
|
Stepper.init();
|
|
|
317
|
+ dotName();
|
|
|
318
|
+
|
301
|
if (callback) {
|
319
|
if (callback) {
|
302
|
return callback();
|
320
|
return callback();
|
303
|
}
|
321
|
}
|
|
@@ -316,6 +334,7 @@ var Cart = { |
|
@@ -316,6 +334,7 @@ var Cart = { |
316
|
success: function(res) {
|
334
|
success: function(res) {
|
317
|
Util.refreshCart(res, function() {
|
335
|
Util.refreshCart(res, function() {
|
318
|
Stepper.init();
|
336
|
Stepper.init();
|
|
|
337
|
+ dotName();
|
319
|
});
|
338
|
});
|
320
|
}
|
339
|
}
|
321
|
});
|
340
|
});
|
|
@@ -474,11 +493,6 @@ var Cart = { |
|
@@ -474,11 +493,6 @@ var Cart = { |
474
|
}
|
493
|
}
|
475
|
};
|
494
|
};
|
476
|
|
495
|
|
477
|
-require('yoho-jquery-dotdotdot');
|
|
|
478
|
-
|
|
|
479
|
-// product name dotdotdot
|
|
|
480
|
-$('.pro-name a').dotdotdot({
|
|
|
481
|
- wrap: 'letter'
|
|
|
482
|
-});
|
496
|
+dotName();
|
483
|
|
497
|
|
484
|
module.exports = Cart; |
498
|
module.exports = Cart; |