商品详情页如果是预售商品则把立即购买按钮置灰不能点击
Showing
3 changed files
with
17 additions
and
0 deletions
@@ -479,6 +479,8 @@ module.exports = class extends global.yoho.BaseModel { | @@ -479,6 +479,8 @@ module.exports = class extends global.yoho.BaseModel { | ||
479 | 479 | ||
480 | dest.productSkn = origin.product_skn; | 480 | dest.productSkn = origin.product_skn; |
481 | dest.goodsName = origin.product_name; | 481 | dest.goodsName = origin.product_name; |
482 | + dest.startSaleTime = origin.startSaleTime; | ||
483 | + dest.startSaleTimeStr = origin.startSaleTimeStr; | ||
482 | 484 | ||
483 | // 线下店商品展示限制 | 485 | // 线下店商品展示限制 |
484 | dest.storeGood = origin.store_show_status === 3 || origin.store_show_status === 4; | 486 | dest.storeGood = origin.store_show_status === 3 || origin.store_show_status === 4; |
@@ -61,8 +61,13 @@ | @@ -61,8 +61,13 @@ | ||
61 | </div> | 61 | </div> |
62 | </div> | 62 | </div> |
63 | <div class="btn-wrap"> | 63 | <div class="btn-wrap"> |
64 | + | ||
64 | {{#if @root.buttonText.double}} | 65 | {{#if @root.buttonText.double}} |
66 | + {{#if @root.startSaleTimeStr}} | ||
67 | + <button disabled="disabled" class="btn btn-cannot-buynow">立即购买</button> | ||
68 | + {{else}} | ||
65 | <button id="chose-btn-buynow" class="btn btn-sure-buynow">立即购买</button> | 69 | <button id="chose-btn-buynow" class="btn btn-sure-buynow">立即购买</button> |
70 | + {{/if}} | ||
66 | <button id="chose-btn-sure" class="btn btn-sure-addtocart">加入购物车</button> | 71 | <button id="chose-btn-sure" class="btn btn-sure-addtocart">加入购物车</button> |
67 | {{^}} | 72 | {{^}} |
68 | <button id="chose-btn-sure" class="btn btn-sure">{{@root.buttonText.text}}</button> | 73 | <button id="chose-btn-sure" class="btn btn-sure">{{@root.buttonText.text}}</button> |
@@ -392,6 +392,16 @@ | @@ -392,6 +392,16 @@ | ||
392 | float: left; | 392 | float: left; |
393 | } | 393 | } |
394 | 394 | ||
395 | + .btn-cannot-buynow { | ||
396 | + width: 50%; | ||
397 | + height: 80px; | ||
398 | + border: none; | ||
399 | + background: #b0b0b0; | ||
400 | + color: #fff; | ||
401 | + font-size: 32px; | ||
402 | + float: left; | ||
403 | + } | ||
404 | + | ||
395 | .btn-sure-addtocart { | 405 | .btn-sure-addtocart { |
396 | width: 50%; | 406 | width: 50%; |
397 | height: 80px; | 407 | height: 80px; |
-
Please register or login to post a comment