Authored by 郝肖肖

门票有货币规则改造

... ... @@ -33,30 +33,20 @@
<section class="block dispatch">
<div class="yoho-coin">
<ul class="sale-invoice">
<li class="coin" data-yoho-coin="{{yohoCoin}}">
<li class="coin" data-yoho-coin="{{yohoCoinCompute.yohoCoin}}" data-yoho-coin-click={{yohoCoinCompute.yohoCoinClick}}>
<span class="title">有货币</span>
{{#if yohoCoin}}
<span class="desc used {{#unless useYohoCoin}}hide{{/unless}}">已抵¥{{useYohoCoin}}</span>
<span class="desc can-use {{#if useYohoCoin}}hide{{/if}}">可抵¥{{yohoCoin}}</span>
{{#if useYohoCoin}}
<span class="coin-check">
<!-- <em>- ¥ {{useYohoCoin}}</em> -->
<i class="iconfont checkbox icon-cb-radio"></i>
</span>
<span class="desc msg">{{yohoCoinCompute.yohoCoinMsg}}</span>
<span class="yoho-coin-help">?</span>
{{#if yohoCoinCompute.useYohoCoin}}
<span class="coin-check">
<i class="iconfont checkbox icon-cb-radio"></i>
</span>
{{else}}
<span class="coin-check">
<!-- <em style="display: none;">- ¥ {{useYohoCoin}}</em> -->
<i class="iconfont checkbox icon-radio"></i>
</span>
{{/if}}
{{^}}
<span class="not-used coin-check">
无有货币可用
</span>
<span class="coin-check">
<i class="iconfont checkbox icon-radio"></i>
</span>
{{/if}}
</li>
</li>
</ul>
</div>
<div class="sub-block delivery-id">
... ...
... ... @@ -1189,8 +1189,7 @@ class CartModel
$price = $data['data']['shopping_cart_data']['last_order_amount'];
$result['price'] = Helpers::transPrice($price, true);
// 有货币
$result['yohoCoin'] = Helpers::transPrice($data['data']['yoho_coin']);
$result['useYohoCoin'] = isset($data['data']['shopping_cart_data']['use_yoho_coin']) ? $data['data']['shopping_cart_data']['use_yoho_coin'] : false;
$result['yohoCoinCompute'] = self::yohoCoinCompute($compute['data']['shopping_cart_data']);
return $result;
}
... ... @@ -1203,6 +1202,7 @@ class CartModel
// 有货币添加.00后缀
$compute['data']['shopping_cart_data']['use_yoho_coin'] = Helpers::transPrice($compute['data']['shopping_cart_data']['use_yoho_coin']);
$result = $compute['data']['shopping_cart_data'];
$result['yohoCoinCompute'] = self::yohoCoinCompute($compute['data']['shopping_cart_data']);
}
return $result;
}
... ...