Merge branch 'feature/order' of http://git.dev.yoho.cn/web/yohobuy into feature/order
Showing
15 changed files
with
25 additions
and
25 deletions
@@ -22,7 +22,7 @@ | @@ -22,7 +22,7 @@ | ||
22 | }()); | 22 | }()); |
23 | })(document, window); | 23 | })(document, window); |
24 | </script> | 24 | </script> |
25 | -<link rel="stylesheet" href="http://cdn.yoho.cn/myohobuy/1.1.2/index.css"> | 25 | +<link rel="stylesheet" href="//cdn.yoho.cn/myohobuy/1.3.13/index.css"> |
26 | </head> | 26 | </head> |
27 | <body class=passport-body> | 27 | <body class=passport-body> |
28 | <div class="back-email-page passport-page yoho-page"> | 28 | <div class="back-email-page passport-page yoho-page"> |
@@ -37,8 +37,8 @@ | @@ -37,8 +37,8 @@ | ||
37 | <span id="btn-sure" class="btn btn-sure disable row">确定</span> | 37 | <span id="btn-sure" class="btn btn-sure disable row">确定</span> |
38 | </div> | 38 | </div> |
39 | </div> | 39 | </div> |
40 | -<script src="http://cdn.yoho.cn/myohobuy/1.1.2/lib.js"></script> | ||
41 | -<script src="http://cdn.yoho.cn/myohobuy/1.1.2/index.js"></script> | 40 | +<script src="//cdn.yoho.cn/myohobuy/1.3.13/index.css"></script> |
41 | +<script src="//cdn.yoho.cn/myohobuy/1.3.13/index.css"></script> | ||
42 | 42 | ||
43 | <script type="text/javascript"> | 43 | <script type="text/javascript"> |
44 | (function(w,d,s,j,f){ | 44 | (function(w,d,s,j,f){ |
@@ -26,7 +26,7 @@ | @@ -26,7 +26,7 @@ | ||
26 | <link rel="dns-prefetch" href="//static.yohobuy.com"> | 26 | <link rel="dns-prefetch" href="//static.yohobuy.com"> |
27 | <link rel="dns-prefetch" href="//img12.static.yhbimg.com"> | 27 | <link rel="dns-prefetch" href="//img12.static.yhbimg.com"> |
28 | <link rel="dns-prefetch" href="//img13.static.yhbimg.com"> | 28 | <link rel="dns-prefetch" href="//img13.static.yhbimg.com"> |
29 | -<link rel="stylesheet" href="http://static.dev.yohobuy.com/css/index.css"> | 29 | +<link rel="stylesheet" href="//cdn.yoho.cn/myohobuy/1.3.13/index.css"> |
30 | <link rel="apple-touch-icon-precomposed" href="http://static.yohobuy.com/m/v1/img/touch/apple-touch-icon-144x144-precomposed-new.png"> | 30 | <link rel="apple-touch-icon-precomposed" href="http://static.yohobuy.com/m/v1/img/touch/apple-touch-icon-144x144-precomposed-new.png"> |
31 | <link rel="apple-touch-startup-image" sizes="640x920" href="http://static.yohobuy.com/m/v1/img/startup/startup-retina.png" media="screen and (max-device-width: 480px) and (-webkit-min-device-pixel-ratio: 2)"> | 31 | <link rel="apple-touch-startup-image" sizes="640x920" href="http://static.yohobuy.com/m/v1/img/startup/startup-retina.png" media="screen and (max-device-width: 480px) and (-webkit-min-device-pixel-ratio: 2)"> |
32 | <link rel="apple-touch-startup-image" sizes="320x460" href="http://static.yohobuy.com/m/v1/img/startup/startup.png" media="screen and (max-device-width: 320)"> | 32 | <link rel="apple-touch-startup-image" sizes="320x460" href="http://static.yohobuy.com/m/v1/img/startup/startup.png" media="screen and (max-device-width: 320)"> |
@@ -22,7 +22,7 @@ | @@ -22,7 +22,7 @@ | ||
22 | }()); | 22 | }()); |
23 | })(document, window); | 23 | })(document, window); |
24 | </script> | 24 | </script> |
25 | -<link rel="stylesheet" href="http://cdn.yoho.cn/myohobuy/1.1.2/index.css"> | 25 | +<link rel="stylesheet" href="//cdn.yoho.cn/myohobuy/1.3.13/index.css"> |
26 | </head> | 26 | </head> |
27 | <body class=passport-body> | 27 | <body class=passport-body> |
28 | <div class="back-mobile-page passport-page yoho-page"> | 28 | <div class="back-mobile-page passport-page yoho-page"> |
@@ -26,7 +26,7 @@ | @@ -26,7 +26,7 @@ | ||
26 | <link rel="dns-prefetch" href="//static.yohobuy.com"> | 26 | <link rel="dns-prefetch" href="//static.yohobuy.com"> |
27 | <link rel="dns-prefetch" href="//img12.static.yhbimg.com"> | 27 | <link rel="dns-prefetch" href="//img12.static.yhbimg.com"> |
28 | <link rel="dns-prefetch" href="//img13.static.yhbimg.com"> | 28 | <link rel="dns-prefetch" href="//img13.static.yhbimg.com"> |
29 | -<link rel="stylesheet" href="http://static.dev.yohobuy.com/css/index.css"> | 29 | +<link rel="stylesheet" href="//cdn.yoho.cn/myohobuy/1.3.13/index.css"> |
30 | <link rel="apple-touch-icon-precomposed" href="http://static.yohobuy.com/m/v1/img/touch/apple-touch-icon-144x144-precomposed-new.png"> | 30 | <link rel="apple-touch-icon-precomposed" href="http://static.yohobuy.com/m/v1/img/touch/apple-touch-icon-144x144-precomposed-new.png"> |
31 | <link rel="apple-touch-startup-image" sizes="640x920" href="http://static.yohobuy.com/m/v1/img/startup/startup-retina.png" media="screen and (max-device-width: 480px) and (-webkit-min-device-pixel-ratio: 2)"> | 31 | <link rel="apple-touch-startup-image" sizes="640x920" href="http://static.yohobuy.com/m/v1/img/startup/startup-retina.png" media="screen and (max-device-width: 480px) and (-webkit-min-device-pixel-ratio: 2)"> |
32 | <link rel="apple-touch-startup-image" sizes="320x460" href="http://static.yohobuy.com/m/v1/img/startup/startup.png" media="screen and (max-device-width: 320)"> | 32 | <link rel="apple-touch-startup-image" sizes="320x460" href="http://static.yohobuy.com/m/v1/img/startup/startup.png" media="screen and (max-device-width: 320)"> |
@@ -10549,17 +10549,21 @@ $('.cart-goods').on('touchstart', '.checkbox', function() { | @@ -10549,17 +10549,21 @@ $('.cart-goods').on('touchstart', '.checkbox', function() { | ||
10549 | * @return false or undefined | 10549 | * @return false or undefined |
10550 | * | 10550 | * |
10551 | */ | 10551 | */ |
10552 | -function showEditPannelWithSku(html, id, isSelected, isEditNum) { | ||
10553 | - if (html.length < 2) { | 10552 | +function showEditPannelWithSku(html, id, isSelected, isEditNum, skn) { |
10553 | + var $html = $(html); | ||
10554 | + | ||
10555 | + if (!$html.hasClass('chose-panel')) { | ||
10554 | tip.show('出错啦!'); | 10556 | tip.show('出错啦!'); |
10555 | return false; | 10557 | return false; |
10556 | } | 10558 | } |
10557 | 10559 | ||
10560 | + // 记录成功加载的选择框 | ||
10561 | + previousEditSkn = skn; | ||
10562 | + | ||
10558 | //删掉页面上原有的pannel | 10563 | //删掉页面上原有的pannel |
10559 | chosePanel.remove(); | 10564 | chosePanel.remove(); |
10560 | 10565 | ||
10561 | - $(html).appendTo('#mainCart'); | ||
10562 | - | 10566 | + $html.appendTo('#mainCart'); |
10563 | 10567 | ||
10564 | chosePanel.init(); | 10568 | chosePanel.init(); |
10565 | chosePanel.setEditModeWithSknId(id, isSelected); | 10569 | chosePanel.setEditModeWithSknId(id, isSelected); |
@@ -10594,9 +10598,6 @@ $('.icon-edit').on('touchstart', function(e) { | @@ -10594,9 +10598,6 @@ $('.icon-edit').on('touchstart', function(e) { | ||
10594 | return; | 10598 | return; |
10595 | } | 10599 | } |
10596 | 10600 | ||
10597 | - previousEditSkn = skn; | ||
10598 | - | ||
10599 | - | ||
10600 | $checkBox = $this.closest('.info').siblings('.checkbox'); | 10601 | $checkBox = $this.closest('.info').siblings('.checkbox'); |
10601 | $tag = $this.closest('.deps').siblings('.few-tag'); | 10602 | $tag = $this.closest('.deps').siblings('.few-tag'); |
10602 | 10603 | ||
@@ -10610,7 +10611,6 @@ $('.icon-edit').on('touchstart', function(e) { | @@ -10610,7 +10611,6 @@ $('.icon-edit').on('touchstart', function(e) { | ||
10610 | 10611 | ||
10611 | loading.showLoadingMask(); | 10612 | loading.showLoadingMask(); |
10612 | 10613 | ||
10613 | - | ||
10614 | $.ajax({ | 10614 | $.ajax({ |
10615 | url: '/cart/index/goodinfo', | 10615 | url: '/cart/index/goodinfo', |
10616 | data: { | 10616 | data: { |
@@ -10618,7 +10618,7 @@ $('.icon-edit').on('touchstart', function(e) { | @@ -10618,7 +10618,7 @@ $('.icon-edit').on('touchstart', function(e) { | ||
10618 | buy_num: count | 10618 | buy_num: count |
10619 | }, | 10619 | }, |
10620 | success: function(res) { | 10620 | success: function(res) { |
10621 | - showEditPannelWithSku(res, id, $checkBox.hasClass('icon-cb-checked'), canEditNum); | 10621 | + showEditPannelWithSku(res, id, $checkBox.hasClass('icon-cb-checked'), canEditNum, skn); |
10622 | }, | 10622 | }, |
10623 | error: function() { | 10623 | error: function() { |
10624 | tip.show('网络异常'); | 10624 | tip.show('网络异常'); |
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.

1.11 KB

1.1 KB

1.11 KB

1.11 KB
@@ -96,17 +96,21 @@ $('.cart-goods').on('touchstart', '.checkbox', function() { | @@ -96,17 +96,21 @@ $('.cart-goods').on('touchstart', '.checkbox', function() { | ||
96 | * @return false or undefined | 96 | * @return false or undefined |
97 | * | 97 | * |
98 | */ | 98 | */ |
99 | -function showEditPannelWithSku(html, id, isSelected, isEditNum) { | ||
100 | - if (html.length < 2) { | 99 | +function showEditPannelWithSku(html, id, isSelected, isEditNum, skn) { |
100 | + var $html = $(html); | ||
101 | + | ||
102 | + if (!$html.hasClass('chose-panel')) { | ||
101 | tip.show('出错啦!'); | 103 | tip.show('出错啦!'); |
102 | return false; | 104 | return false; |
103 | } | 105 | } |
104 | 106 | ||
107 | + // 记录成功加载的选择框 | ||
108 | + previousEditSkn = skn; | ||
109 | + | ||
105 | //删掉页面上原有的pannel | 110 | //删掉页面上原有的pannel |
106 | chosePanel.remove(); | 111 | chosePanel.remove(); |
107 | 112 | ||
108 | - $(html).appendTo('#mainCart'); | ||
109 | - | 113 | + $html.appendTo('#mainCart'); |
110 | 114 | ||
111 | chosePanel.init(); | 115 | chosePanel.init(); |
112 | chosePanel.setEditModeWithSknId(id, isSelected); | 116 | chosePanel.setEditModeWithSknId(id, isSelected); |
@@ -141,9 +145,6 @@ $('.icon-edit').on('touchstart', function(e) { | @@ -141,9 +145,6 @@ $('.icon-edit').on('touchstart', function(e) { | ||
141 | return; | 145 | return; |
142 | } | 146 | } |
143 | 147 | ||
144 | - previousEditSkn = skn; | ||
145 | - | ||
146 | - | ||
147 | $checkBox = $this.closest('.info').siblings('.checkbox'); | 148 | $checkBox = $this.closest('.info').siblings('.checkbox'); |
148 | $tag = $this.closest('.deps').siblings('.few-tag'); | 149 | $tag = $this.closest('.deps').siblings('.few-tag'); |
149 | 150 | ||
@@ -157,7 +158,6 @@ $('.icon-edit').on('touchstart', function(e) { | @@ -157,7 +158,6 @@ $('.icon-edit').on('touchstart', function(e) { | ||
157 | 158 | ||
158 | loading.showLoadingMask(); | 159 | loading.showLoadingMask(); |
159 | 160 | ||
160 | - | ||
161 | $.ajax({ | 161 | $.ajax({ |
162 | url: '/cart/index/goodinfo', | 162 | url: '/cart/index/goodinfo', |
163 | data: { | 163 | data: { |
@@ -165,7 +165,7 @@ $('.icon-edit').on('touchstart', function(e) { | @@ -165,7 +165,7 @@ $('.icon-edit').on('touchstart', function(e) { | ||
165 | buy_num: count | 165 | buy_num: count |
166 | }, | 166 | }, |
167 | success: function(res) { | 167 | success: function(res) { |
168 | - showEditPannelWithSku(res, id, $checkBox.hasClass('icon-cb-checked'), canEditNum); | 168 | + showEditPannelWithSku(res, id, $checkBox.hasClass('icon-cb-checked'), canEditNum, skn); |
169 | }, | 169 | }, |
170 | error: function() { | 170 | error: function() { |
171 | tip.show('网络异常'); | 171 | tip.show('网络异常'); |
@@ -475,7 +475,7 @@ class CartModel | @@ -475,7 +475,7 @@ class CartModel | ||
475 | } | 475 | } |
476 | 476 | ||
477 | // 累加商品金额 | 477 | // 累加商品金额 |
478 | - $goodsPrice += $single['subtotal']; | 478 | + $goodsPrice += $oneGoods['count'] * $oneGoods['price']; |
479 | 479 | ||
480 | $result['goods'][] = $oneGoods; | 480 | $result['goods'][] = $oneGoods; |
481 | } | 481 | } |
-
Please register or login to post a comment