Merge remote-tracking branch 'origin/release/5.1' into release/5.1
Showing
5 changed files
with
24 additions
and
2 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,7 +162,10 @@ | @@ -162,7 +162,10 @@ | ||
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> |
167 | + | ||
168 | + {{#unless isDepositAdvance}} | ||
166 | {{#if addToCartUrl}} | 169 | {{#if addToCartUrl}} |
167 | <a id="addtoCart" href="javascript:;" class="addto-cart">{{#if ../tickets}}立即购买{{else}}加入购物车{{/if}}</a> | 170 | <a id="addtoCart" href="javascript:;" class="addto-cart">{{#if ../tickets}}立即购买{{else}}加入购物车{{/if}}</a> |
168 | {{/if}} | 171 | {{/if}} |
@@ -186,6 +189,9 @@ | @@ -186,6 +189,9 @@ | ||
186 | {{#if canNotBuy}} | 189 | {{#if canNotBuy}} |
187 | <a href="javascript:;" class="addto-cart can-not-buy">立即购买</a> | 190 | <a href="javascript:;" class="addto-cart can-not-buy">立即购买</a> |
188 | {{/if}} | 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