Commit f723617a by dhn

删除线

parent 7152d1dd
...@@ -241,6 +241,9 @@ define([ ...@@ -241,6 +241,9 @@ define([
flatrate_price: function(){ flatrate_price: function(){
return window.checkoutConfig.flatrate_price; return window.checkoutConfig.flatrate_price;
}, },
free_price: function(){
return window.checkoutConfig.free_price;
},
full_free_ship: function(){ full_free_ship: function(){
return window.checkoutConfig.full_free_ship; return window.checkoutConfig.full_free_ship;
}, },
......
...@@ -45,6 +45,14 @@ ...@@ -45,6 +45,14 @@
attr="'id': 'label_carrier_fee_' + method.method_code + '_' + method.carrier_code" attr="'id': 'label_carrier_fee_' + method.method_code + '_' + method.carrier_code"
text="$parent.flatrate_price()"></span> text="$parent.flatrate_price()"></span>
<!-- /ko --> <!-- /ko -->
<!-- ko ifnot: (method.amount) -->
<span class="col col-amount col-free-amount"
attr="'id': 'label_carrier_fee_' + method.method_code + '_' + method.carrier_code"
text="$parent.free_price()"></span>
<span class="col col-amount col-elide-amount"
attr="'id': 'label_carrier_fee_' + method.method_code + '_' + method.carrier_code"
text="$parent.flatrate_price()"></span>
<!-- /ko -->
</div> </div>
<!-- ko if: (method.amount) --> <!-- ko if: (method.amount) -->
<div class="method-msg"> <div class="method-msg">
...@@ -115,6 +123,14 @@ ...@@ -115,6 +123,14 @@
attr="'id': 'label_carrier_fee_' + method.method_code + '_' + method.carrier_code" attr="'id': 'label_carrier_fee_' + method.method_code + '_' + method.carrier_code"
text="$parent.flatrate_price()"></span> text="$parent.flatrate_price()"></span>
<!-- /ko --> <!-- /ko -->
<!-- ko ifnot: (method.amount) -->
<span class="col col-amount col-free-amount"
attr="'id': 'label_carrier_fee_' + method.method_code + '_' + method.carrier_code"
text="$parent.free_price()"></span>
<span class="col col-amount col-elide-amount"
attr="'id': 'label_carrier_fee_' + method.method_code + '_' + method.carrier_code"
text="$parent.flatrate_price()"></span>
<!-- /ko -->
</div> </div>
<!-- ko if: (method.amount) --> <!-- ko if: (method.amount) -->
<div class="method-msg"> <div class="method-msg">
......
...@@ -13,6 +13,7 @@ $flatraPrice = $block->getFlatratePrice(); ...@@ -13,6 +13,7 @@ $flatraPrice = $block->getFlatratePrice();
$full_free = $block->getFullFreeShip(); $full_free = $block->getFullFreeShip();
$_helper = $objectManager->get('Magento\Framework\Pricing\Helper\Data'); $_helper = $objectManager->get('Magento\Framework\Pricing\Helper\Data');
$full_free_ship = $_helper->currency($full_free, true, false); $full_free_ship = $_helper->currency($full_free, true, false);
$free_price = $_helper->currency(0, true, false);
?> ?>
<style type="text/css"> <style type="text/css">
.payment-method._active{ .payment-method._active{
...@@ -92,6 +93,9 @@ $full_free_ship = $_helper->currency($full_free, true, false); ...@@ -92,6 +93,9 @@ $full_free_ship = $_helper->currency($full_free, true, false);
.opc-block-summary{ .opc-block-summary{
padding: 15px; padding: 15px;
} }
.checkout-index-index .col-elide-amount{
text-decoration:line-through;
}
.action.action-auth-toggle{ .action.action-auth-toggle{
background: none; background: none;
color: #000; color: #000;
...@@ -1001,6 +1005,7 @@ $full_free_ship = $_helper->currency($full_free, true, false); ...@@ -1001,6 +1005,7 @@ $full_free_ship = $_helper->currency($full_free, true, false);
window.checkoutConfig = {$serializedCheckoutConfig}; window.checkoutConfig = {$serializedCheckoutConfig};
window.checkoutConfig.flatrate_price = '{$flatraPrice}'; window.checkoutConfig.flatrate_price = '{$flatraPrice}';
window.checkoutConfig.full_free_ship = '{$full_free_ship}'; window.checkoutConfig.full_free_ship = '{$full_free_ship}';
window.checkoutConfig.free_price = '{$free_price}';
// Create aliases for customer.js model from customer module // Create aliases for customer.js model from customer module
window.isCustomerLoggedIn = window.checkoutConfig.isCustomerLoggedIn; window.isCustomerLoggedIn = window.checkoutConfig.isCustomerLoggedIn;
window.customerData = window.checkoutConfig.customerData; window.customerData = window.checkoutConfig.customerData;
...@@ -1021,6 +1026,7 @@ script; ...@@ -1021,6 +1026,7 @@ script;
</div> </div>
<script> <script>
require(['jquery'], function ($) { require(['jquery'], function ($) {
console.log('window.checkoutConfig',window.checkoutConfig)
var isMobile = window.matchMedia("(pointer:coarse)").matches; var isMobile = window.matchMedia("(pointer:coarse)").matches;
if (!isMobile) { if (!isMobile) {
$(window).scroll(function () { $(window).scroll(function () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment