Merge remote-tracking branch 'origin/release/5.1' into release/5.1
Showing
5 changed files
with
42 additions
and
20 deletions
@@ -201,7 +201,7 @@ let upvoteConsult = (params) => { | @@ -201,7 +201,7 @@ let upvoteConsult = (params) => { | ||
201 | */ | 201 | */ |
202 | let addConsult = (uid, productId, content) => { | 202 | let addConsult = (uid, productId, content) => { |
203 | let params = { | 203 | let params = { |
204 | - method: 'h5.consult.add', | 204 | + method: 'app.consult.add', |
205 | product_id: productId, | 205 | product_id: productId, |
206 | content: content, | 206 | content: content, |
207 | uid: uid | 207 | uid: uid |
@@ -978,6 +978,7 @@ const getSeckillData = (param) => { | @@ -978,6 +978,7 @@ const getSeckillData = (param) => { | ||
978 | method: 'app.seckill.data', | 978 | method: 'app.seckill.data', |
979 | product_skn: param.productskn | 979 | product_skn: param.productskn |
980 | }; | 980 | }; |
981 | + | ||
981 | return api.get('', params, { | 982 | return api.get('', params, { |
982 | code: 200 | 983 | code: 200 |
983 | }) | 984 | }) |
@@ -995,7 +996,8 @@ const getSeckillData = (param) => { | @@ -995,7 +996,8 @@ const getSeckillData = (param) => { | ||
995 | }; | 996 | }; |
996 | 997 | ||
997 | let getProductData = (data) => { | 998 | let getProductData = (data) => { |
998 | - let finalResult; | 999 | + let finalResult = {}; |
1000 | + | ||
999 | let params = { | 1001 | let params = { |
1000 | method: 'app.product.data' | 1002 | method: 'app.product.data' |
1001 | }; | 1003 | }; |
@@ -1028,6 +1030,7 @@ let getProductData = (data) => { | @@ -1028,6 +1030,7 @@ let getProductData = (data) => { | ||
1028 | return {}; | 1030 | return {}; |
1029 | } | 1031 | } |
1030 | result = result.data; | 1032 | result = result.data; |
1033 | + | ||
1031 | return Promise.all([ | 1034 | return Promise.all([ |
1032 | _getShopsInfo(_.get(result, 'brandInfo.brandId', 0)), | 1035 | _getShopsInfo(_.get(result, 'brandInfo.brandId', 0)), |
1033 | _getPromotionInfo(result.productSkn), | 1036 | _getPromotionInfo(result.productSkn), |
@@ -1044,6 +1047,11 @@ let getProductData = (data) => { | @@ -1044,6 +1047,11 @@ let getProductData = (data) => { | ||
1044 | Object.assign(finalResult.feedbacks, info[2]); | 1047 | Object.assign(finalResult.feedbacks, info[2]); |
1045 | Object.assign(finalResult, {isSecKill: result.isSecKill}); | 1048 | Object.assign(finalResult, {isSecKill: result.isSecKill}); |
1046 | 1049 | ||
1050 | + /* 预售商品不能购买 */ | ||
1051 | + if (_.get(result, 'isDepositAdvance', '') === 'Y') { | ||
1052 | + finalResult.cartInfo.isDepositAdvance = true; | ||
1053 | + } | ||
1054 | + | ||
1047 | /* 如果有咨询,显示咨询,否则显示常见问题 */ | 1055 | /* 如果有咨询,显示咨询,否则显示常见问题 */ |
1048 | 1056 | ||
1049 | if (info[4].total) { | 1057 | if (info[4].total) { |
@@ -162,30 +162,36 @@ | @@ -162,30 +162,36 @@ | ||
162 | {{> cart/chose-panel}} | 162 | {{> cart/chose-panel}} |
163 | {{#cartInfo}} | 163 | {{#cartInfo}} |
164 | <div class="cart-bar"> | 164 | <div class="cart-bar"> |
165 | + | ||
165 | <a href="{{cartUrl}}" class="num-incart iconfont"><span class="num-tag hide"></span></a> | 166 | <a href="{{cartUrl}}" class="num-incart iconfont"><span class="num-tag hide"></span></a> |
166 | - {{#if addToCartUrl}} | ||
167 | - <a id="addtoCart" href="javascript:;" class="addto-cart">{{#if ../tickets}}立即购买{{else}}加入购物车{{/if}}</a> | ||
168 | - {{/if}} | ||
169 | 167 | ||
170 | - {{#if soldOut}} | ||
171 | - <a href="javascript:;" class="sold-out">已售罄</a> | ||
172 | - {{/if}} | 168 | + {{#unless isDepositAdvance}} |
169 | + {{#if addToCartUrl}} | ||
170 | + <a id="addtoCart" href="javascript:;" class="addto-cart">{{#if ../tickets}}立即购买{{else}}加入购物车{{/if}}</a> | ||
171 | + {{/if}} | ||
173 | 172 | ||
174 | - {{#if notForSale}} | ||
175 | - <a href="javascript:;" class="sold-out">非卖品</a> | ||
176 | - {{/if}} | 173 | + {{#if soldOut}} |
174 | + <a href="javascript:;" class="sold-out">已售罄</a> | ||
175 | + {{/if}} | ||
177 | 176 | ||
178 | - {{#if limitNotForSale}} | ||
179 | - <a href="javascript:;" class="sold-out limit">即将发售</a> | ||
180 | - {{/if}} | 177 | + {{#if notForSale}} |
178 | + <a href="javascript:;" class="sold-out">非卖品</a> | ||
179 | + {{/if}} | ||
181 | 180 | ||
182 | - {{#if noLimitCode}} | ||
183 | - <a href="javascript:;" class="sold-out limit">立即购买</a> | ||
184 | - {{/if}} | 181 | + {{#if limitNotForSale}} |
182 | + <a href="javascript:;" class="sold-out limit">即将发售</a> | ||
183 | + {{/if}} | ||
185 | 184 | ||
186 | - {{#if canNotBuy}} | ||
187 | - <a href="javascript:;" class="addto-cart can-not-buy">立即购买</a> | ||
188 | - {{/if}} | 185 | + {{#if noLimitCode}} |
186 | + <a href="javascript:;" class="sold-out limit">立即购买</a> | ||
187 | + {{/if}} | ||
188 | + | ||
189 | + {{#if canNotBuy}} | ||
190 | + <a href="javascript:;" class="addto-cart can-not-buy">立即购买</a> | ||
191 | + {{/if}} | ||
192 | + {{^}} | ||
193 | + <a href="javascript:;" class="addto-cart" id="is-deposit-advance">立即购买</a> | ||
194 | + {{/unless}} | ||
189 | 195 | ||
190 | <input type="hidden" id="limitCodeUrl" name="limitCodeUrl" value="{{limitCodeUrl}}"> | 196 | <input type="hidden" id="limitCodeUrl" name="limitCodeUrl" value="{{limitCodeUrl}}"> |
191 | 197 |
@@ -15,6 +15,10 @@ var introUrl = $('#introUrl').val(), | @@ -15,6 +15,10 @@ var introUrl = $('#introUrl').val(), | ||
15 | searching = false, | 15 | searching = false, |
16 | end = false; | 16 | end = false; |
17 | 17 | ||
18 | +$('#is-deposit-advance').on('click', function() { | ||
19 | + tip.show('定金预售商品只能在APP端购买'); | ||
20 | +}); | ||
21 | + | ||
18 | // 判断是否要显示向左滑动提示 | 22 | // 判断是否要显示向左滑动提示 |
19 | function hiddenTips($ele) { | 23 | function hiddenTips($ele) { |
20 | var offsetContainer, | 24 | var offsetContainer, |
-
Please register or login to post a comment