Merge branch 'develop/wap' into beta/wap
Showing
8 changed files
with
88 additions
and
36 deletions
@@ -99,6 +99,17 @@ function checkColorSizeNum() { | @@ -99,6 +99,17 @@ function checkColorSizeNum() { | ||
99 | return true; | 99 | return true; |
100 | } | 100 | } |
101 | 101 | ||
102 | +//禁用数字编辑 | ||
103 | +function disableNumEdit() { | ||
104 | + var $numBtn = $('.chose-panel').find('.num .btn>.iconfont'); | ||
105 | + | ||
106 | + //添加disabled样式 | ||
107 | + $numBtn.hasClass('disabled') ? null : $numBtn.addClass('disabled'); | ||
108 | + | ||
109 | + $yohoPage.off('touchstart', '.btn-minus'); | ||
110 | + $yohoPage.off('touchstart', '.btn-plus'); | ||
111 | +} | ||
112 | + | ||
102 | 113 | ||
103 | function show(html, cb) { | 114 | function show(html, cb) { |
104 | var scrollPosition = [ | 115 | var scrollPosition = [ |
@@ -116,8 +127,7 @@ function show(html, cb) { | @@ -116,8 +127,7 @@ function show(html, cb) { | ||
116 | if (html) { | 127 | if (html) { |
117 | $chosePanel.html(html); | 128 | $chosePanel.html(html); |
118 | if ($('#promotionId').val() !== '') { | 129 | if ($('#promotionId').val() !== '') { |
119 | - $yohoPage.off('touchstart', '.btn-minus'); | ||
120 | - $yohoPage.off('touchstart', '.btn-plus'); | 130 | + disableNumEdit(); |
121 | } | 131 | } |
122 | init(); | 132 | init(); |
123 | } | 133 | } |
@@ -496,4 +506,5 @@ exports.init = init; | @@ -496,4 +506,5 @@ exports.init = init; | ||
496 | exports.show = show; | 506 | exports.show = show; |
497 | exports.remove = removePannel; | 507 | exports.remove = removePannel; |
498 | exports.setEditModeWithSknId = setEditModeWithSknId; | 508 | exports.setEditModeWithSknId = setEditModeWithSknId; |
509 | +exports.disableNumEdit = disableNumEdit; | ||
499 | 510 |
@@ -16,6 +16,9 @@ var dialog = require('../me/dialog'), | @@ -16,6 +16,9 @@ var dialog = require('../me/dialog'), | ||
16 | var $selectAllBtn = $('.balance .checkbox'), | 16 | var $selectAllBtn = $('.balance .checkbox'), |
17 | requesting = false; | 17 | requesting = false; |
18 | 18 | ||
19 | +//上次编辑的商品skn | ||
20 | +var previousEditSkn; | ||
21 | + | ||
19 | ellipsis.init(); | 22 | ellipsis.init(); |
20 | 23 | ||
21 | lazyLoad({ | 24 | lazyLoad({ |
@@ -86,11 +89,12 @@ $('.cart-goods').on('touchstart', '.checkbox', function() { | @@ -86,11 +89,12 @@ $('.cart-goods').on('touchstart', '.checkbox', function() { | ||
86 | * | 89 | * |
87 | * @param {Bool} isSelected. 所要编辑的商品是否被选中 | 90 | * @param {Bool} isSelected. 所要编辑的商品是否被选中 |
88 | * | 91 | * |
89 | - * @return false; | 92 | + * @param {Bool} isEditNum. 所要编辑的商品是否被选中 |
93 | + * | ||
94 | + * @return false or undefined | ||
90 | * | 95 | * |
91 | */ | 96 | */ |
92 | -function showEditPannelWithSku(html, id, isSelected) { | ||
93 | - | 97 | +function showEditPannelWithSku(html, id, isSelected, isEditNum) { |
94 | if (html.length < 2) { | 98 | if (html.length < 2) { |
95 | tip.show('出错啦!'); | 99 | tip.show('出错啦!'); |
96 | return false; | 100 | return false; |
@@ -100,21 +104,47 @@ function showEditPannelWithSku(html, id, isSelected) { | @@ -100,21 +104,47 @@ function showEditPannelWithSku(html, id, isSelected) { | ||
100 | chosePanel.remove(); | 104 | chosePanel.remove(); |
101 | 105 | ||
102 | $(html).appendTo('#mainCart'); | 106 | $(html).appendTo('#mainCart'); |
107 | + | ||
108 | + | ||
103 | chosePanel.init(); | 109 | chosePanel.init(); |
104 | chosePanel.setEditModeWithSknId(id, isSelected); | 110 | chosePanel.setEditModeWithSknId(id, isSelected); |
105 | - chosePanel.show(); | ||
106 | 111 | ||
107 | - return false; | 112 | + if (!isEditNum) { |
113 | + chosePanel.disableNumEdit(); | ||
114 | + } | ||
115 | + | ||
116 | + chosePanel.show(); | ||
108 | } | 117 | } |
109 | 118 | ||
110 | 119 | ||
111 | $('.icon-edit').on('touchstart', function(e) { | 120 | $('.icon-edit').on('touchstart', function(e) { |
112 | var $this = $(this), | 121 | var $this = $(this), |
113 | - $checkBox = $this.closest('.info').siblings('.checkbox'); | 122 | + skn = $this.closest('.shopping-cart-good').data('skn'); |
123 | + | ||
124 | + var $checkBox, | ||
125 | + $tag; | ||
126 | + | ||
127 | + var id, | ||
128 | + count, | ||
129 | + canEditNum; | ||
130 | + | ||
131 | + //如果点击的是上次编辑的商品,直接显示chose-pannel | ||
132 | + if (skn === previousEditSkn) { | ||
133 | + chosePanel.show(); | ||
134 | + return; | ||
135 | + } | ||
136 | + | ||
137 | + previousEditSkn = skn; | ||
138 | + | ||
139 | + | ||
140 | + $checkBox = $this.closest('.info').siblings('.checkbox'); | ||
141 | + $tag = $this.closest('.deps').siblings('.few-tag'); | ||
142 | + | ||
143 | + id = $this.closest('.shopping-cart-good').data('id'); | ||
144 | + count = $this.data('count'); | ||
114 | 145 | ||
115 | - var skn = $this.closest('.shopping-cart-good').data('skn'), | ||
116 | - id = $this.closest('.shopping-cart-good').data('id'), | ||
117 | - count = $this.data('count'); | 146 | + //加价购或者赠品不能编辑数量 |
147 | + canEditNum = $tag.hasClass('gift-tag') || $tag.hasClass('plus-tag') ? false : true; | ||
118 | 148 | ||
119 | e.stopPropagation(); | 149 | e.stopPropagation(); |
120 | 150 | ||
@@ -128,7 +158,7 @@ $('.icon-edit').on('touchstart', function(e) { | @@ -128,7 +158,7 @@ $('.icon-edit').on('touchstart', function(e) { | ||
128 | buy_num: count | 158 | buy_num: count |
129 | }, | 159 | }, |
130 | success: function(res) { | 160 | success: function(res) { |
131 | - showEditPannelWithSku(res, id, $checkBox.hasClass('icon-cb-checked')); | 161 | + showEditPannelWithSku(res, id, $checkBox.hasClass('icon-cb-checked'), canEditNum); |
132 | }, | 162 | }, |
133 | error: function() { | 163 | error: function() { |
134 | tip.show('网络异常'); | 164 | tip.show('网络异常'); |
@@ -29,6 +29,8 @@ module.exports = function(specificGender) { | @@ -29,6 +29,8 @@ module.exports = function(specificGender) { | ||
29 | index, | 29 | index, |
30 | $navList = $('#maybe-like-nav'); | 30 | $navList = $('#maybe-like-nav'); |
31 | 31 | ||
32 | + var $footer; | ||
33 | + | ||
32 | //ajax url | 34 | //ajax url |
33 | if (kidsType) { | 35 | if (kidsType) { |
34 | url = '/product/recom/maylikekids'; | 36 | url = '/product/recom/maylikekids'; |
@@ -92,15 +94,11 @@ module.exports = function(specificGender) { | @@ -92,15 +94,11 @@ module.exports = function(specificGender) { | ||
92 | page: page + 1 | 94 | page: page + 1 |
93 | }, | 95 | }, |
94 | success: function(data) { | 96 | success: function(data) { |
97 | + | ||
95 | if (data === ' ') { | 98 | if (data === ' ') { |
96 | searching = false; | 99 | searching = false; |
97 | loading.hideLoadingMask(); | 100 | loading.hideLoadingMask(); |
98 | 101 | ||
99 | - //修复有货币页面最后一条数据显示被遮挡的问题 | ||
100 | - if (specificGender) { | ||
101 | - window.rePosFooter(); | ||
102 | - } | ||
103 | - | ||
104 | // 有货币页面不加载底部 | 102 | // 有货币页面不加载底部 |
105 | if (gender && !specificGender) { | 103 | if (gender && !specificGender) { |
106 | if (gender === '1,3') { | 104 | if (gender === '1,3') { |
@@ -126,6 +124,12 @@ module.exports = function(specificGender) { | @@ -126,6 +124,12 @@ module.exports = function(specificGender) { | ||
126 | return; | 124 | return; |
127 | } | 125 | } |
128 | 126 | ||
127 | + //加载到数据后,去除bottom样式,使得footer能够随着页面长度的增加改变位置 | ||
128 | + if (data.length > 1) { | ||
129 | + $footer ? null : $footer = $('#yoho-footer'); | ||
130 | + $footer.hasClass('bottom') ? $footer.removeClass('bottom') : null; | ||
131 | + } | ||
132 | + | ||
129 | num = $goodList.find('.good-info').length; | 133 | num = $goodList.find('.good-info').length; |
130 | 134 | ||
131 | $goodList.append(data); | 135 | $goodList.append(data); |
@@ -14,7 +14,7 @@ | @@ -14,7 +14,7 @@ | ||
14 | .checkbox { | 14 | .checkbox { |
15 | position: absolute; | 15 | position: absolute; |
16 | top: 50%; | 16 | top: 50%; |
17 | - margin-top: -14rem / $pxConvertRem; | 17 | + margin-top: -34rem / $pxConvertRem; |
18 | margin-left: 8rem / $pxConvertRem; | 18 | margin-left: 8rem / $pxConvertRem; |
19 | font-size: 28rem / $pxConvertRem; | 19 | font-size: 28rem / $pxConvertRem; |
20 | 20 |
@@ -126,13 +126,25 @@ | @@ -126,13 +126,25 @@ | ||
126 | width: 100%; | 126 | width: 100%; |
127 | height: 90rem / $pxConvertRem; | 127 | height: 90rem / $pxConvertRem; |
128 | overflow: hidden; | 128 | overflow: hidden; |
129 | - @include background-image(linear-gradient(#323232, #414141)); | ||
130 | - border-top: 1px solid #444; | 129 | + border-top: 1px solid #fff; |
131 | color: #fff; | 130 | color: #fff; |
132 | - // position: absolute; | ||
133 | - // top: 90rem / $pxConvertRem; | ||
134 | - // left: 0; | ||
135 | - // z-index: 10; | 131 | + |
132 | + &.boys { | ||
133 | + @include background-image(linear-gradient(#323232, #414141)); | ||
134 | + } | ||
135 | + | ||
136 | + &.girls { | ||
137 | + background: #ff88ae; | ||
138 | + } | ||
139 | + | ||
140 | + &.kids { | ||
141 | + background: #7ad9f9; | ||
142 | + } | ||
143 | + | ||
144 | + &.life-style { | ||
145 | + background: #4f4138; | ||
146 | + } | ||
147 | + | ||
136 | ul{ | 148 | ul{ |
137 | width: 100%; | 149 | width: 100%; |
138 | height: 90%; | 150 | height: 90%; |
@@ -9,8 +9,6 @@ $border_color_light: #eee; | @@ -9,8 +9,6 @@ $border_color_light: #eee; | ||
9 | .logistic-page { | 9 | .logistic-page { |
10 | background-color: $logistic_gray; | 10 | background-color: $logistic_gray; |
11 | 11 | ||
12 | - @include set-singleBorder("bottom", $border_color_light); | ||
13 | - | ||
14 | .overview { | 12 | .overview { |
15 | height: 120rem / $pxConvertRem; | 13 | height: 120rem / $pxConvertRem; |
16 | line-height: 120rem / $pxConvertRem; | 14 | line-height: 120rem / $pxConvertRem; |
@@ -66,9 +64,6 @@ $border_color_light: #eee; | @@ -66,9 +64,6 @@ $border_color_light: #eee; | ||
66 | font-size: 40rem / $pxConvertRem; | 64 | font-size: 40rem / $pxConvertRem; |
67 | color: #4f4f4f; | 65 | color: #4f4f4f; |
68 | 66 | ||
69 | - @include set-singleBorder("top", $border_color_strong); | ||
70 | - | ||
71 | - @include set-singleBorder("bottom", $border_color_light); | ||
72 | } | 67 | } |
73 | 68 | ||
74 | .detail { | 69 | .detail { |
@@ -20,7 +20,7 @@ | @@ -20,7 +20,7 @@ | ||
20 | {{/navTitle}} | 20 | {{/navTitle}} |
21 | </header> | 21 | </header> |
22 | {{#navBtn}} | 22 | {{#navBtn}} |
23 | -<div class="homebuttom none"> | 23 | +<div class="homebuttom none {{#if boys}} boys{{/if}}{{#if girls}} girls{{/if}}{{#if kids}} kids{{/if}}{{#if lifeStyle}} life-style{{/if}}"> |
24 | <ul> | 24 | <ul> |
25 | <li> | 25 | <li> |
26 | <a href="{{ indexUrl }}"> | 26 | <a href="{{ indexUrl }}"> |
@@ -112,6 +112,12 @@ class OrderModel | @@ -112,6 +112,12 @@ class OrderModel | ||
112 | break; | 112 | break; |
113 | } | 113 | } |
114 | 114 | ||
115 | + // 获取物流详情页banner | ||
116 | + $banner = self::getLogisterBanner(); | ||
117 | + if ($banner) { | ||
118 | + $result['banner'] = $banner; | ||
119 | + } | ||
120 | + | ||
115 | $logistics = OrderData::LogisticsData($orderCode, $uid); | 121 | $logistics = OrderData::LogisticsData($orderCode, $uid); |
116 | if (empty($logistics['data'])) { | 122 | if (empty($logistics['data'])) { |
117 | break; | 123 | break; |
@@ -129,12 +135,6 @@ class OrderModel | @@ -129,12 +135,6 @@ class OrderModel | ||
129 | $result['logisticDetail'][] = $build; | 135 | $result['logisticDetail'][] = $build; |
130 | } | 136 | } |
131 | 137 | ||
132 | - // 获取物流详情页banner | ||
133 | - $banner = self::getLogisterBanner(); | ||
134 | - if ($banner) { | ||
135 | - $result['banner'] = $banner; | ||
136 | - } | ||
137 | - | ||
138 | } while (false); | 138 | } while (false); |
139 | 139 | ||
140 | return $result; | 140 | return $result; |
-
Please register or login to post a comment