Authored by 郝肖肖

门票有货币规则改造

@@ -33,29 +33,19 @@ @@ -33,29 +33,19 @@
33 <section class="block dispatch"> 33 <section class="block dispatch">
34 <div class="yoho-coin"> 34 <div class="yoho-coin">
35 <ul class="sale-invoice"> 35 <ul class="sale-invoice">
36 - <li class="coin" data-yoho-coin="{{yohoCoin}}"> 36 + <li class="coin" data-yoho-coin="{{yohoCoinCompute.yohoCoin}}" data-yoho-coin-click={{yohoCoinCompute.yohoCoinClick}}>
37 <span class="title">有货币</span> 37 <span class="title">有货币</span>
38 -  
39 - {{#if yohoCoin}}  
40 - <span class="desc used {{#unless useYohoCoin}}hide{{/unless}}">已抵¥{{useYohoCoin}}</span>  
41 - <span class="desc can-use {{#if useYohoCoin}}hide{{/if}}">可抵¥{{yohoCoin}}</span>  
42 -  
43 - {{#if useYohoCoin}} 38 + <span class="desc msg">{{yohoCoinCompute.yohoCoinMsg}}</span>
  39 + <span class="yoho-coin-help">?</span>
  40 + {{#if yohoCoinCompute.useYohoCoin}}
44 <span class="coin-check"> 41 <span class="coin-check">
45 - <!-- <em>- ¥ {{useYohoCoin}}</em> -->  
46 <i class="iconfont checkbox icon-cb-radio"></i> 42 <i class="iconfont checkbox icon-cb-radio"></i>
47 </span> 43 </span>
48 {{else}} 44 {{else}}
49 <span class="coin-check"> 45 <span class="coin-check">
50 - <!-- <em style="display: none;">- ¥ {{useYohoCoin}}</em> -->  
51 <i class="iconfont checkbox icon-radio"></i> 46 <i class="iconfont checkbox icon-radio"></i>
52 </span> 47 </span>
53 {{/if}} 48 {{/if}}
54 - {{^}}  
55 - <span class="not-used coin-check">  
56 - 无有货币可用  
57 - </span>  
58 - {{/if}}  
59 </li> 49 </li>
60 </ul> 50 </ul>
61 </div> 51 </div>
@@ -1189,8 +1189,7 @@ class CartModel @@ -1189,8 +1189,7 @@ class CartModel
1189 $price = $data['data']['shopping_cart_data']['last_order_amount']; 1189 $price = $data['data']['shopping_cart_data']['last_order_amount'];
1190 $result['price'] = Helpers::transPrice($price, true); 1190 $result['price'] = Helpers::transPrice($price, true);
1191 // 有货币 1191 // 有货币
1192 - $result['yohoCoin'] = Helpers::transPrice($data['data']['yoho_coin']);  
1193 - $result['useYohoCoin'] = isset($data['data']['shopping_cart_data']['use_yoho_coin']) ? $data['data']['shopping_cart_data']['use_yoho_coin'] : false; 1192 + $result['yohoCoinCompute'] = self::yohoCoinCompute($compute['data']['shopping_cart_data']);
1194 return $result; 1193 return $result;
1195 } 1194 }
1196 1195
@@ -1203,6 +1202,7 @@ class CartModel @@ -1203,6 +1202,7 @@ class CartModel
1203 // 有货币添加.00后缀 1202 // 有货币添加.00后缀
1204 $compute['data']['shopping_cart_data']['use_yoho_coin'] = Helpers::transPrice($compute['data']['shopping_cart_data']['use_yoho_coin']); 1203 $compute['data']['shopping_cart_data']['use_yoho_coin'] = Helpers::transPrice($compute['data']['shopping_cart_data']['use_yoho_coin']);
1205 $result = $compute['data']['shopping_cart_data']; 1204 $result = $compute['data']['shopping_cart_data'];
  1205 + $result['yohoCoinCompute'] = self::yohoCoinCompute($compute['data']['shopping_cart_data']);
1206 } 1206 }
1207 return $result; 1207 return $result;
1208 } 1208 }