Authored by 毕凯

发票和留言信息记录

@@ -41,7 +41,7 @@ @@ -41,7 +41,7 @@
41 41
42 <section class="block"> 42 <section class="block">
43 <ul class="sale-invoice"> 43 <ul class="sale-invoice">
44 - {{# coupon}} 44 + {{#if coupon}}
45 <li class="coupon"> 45 <li class="coupon">
46 <a href="/shoppingCart/selectCoupon"> 46 <a href="/shoppingCart/selectCoupon">
47 <!-- <a href="{{url}}"> --> 47 <!-- <a href="{{url}}"> -->
@@ -65,7 +65,7 @@ @@ -65,7 +65,7 @@
65 {{/if}} 65 {{/if}}
66 </a> 66 </a>
67 </li> 67 </li>
68 - {{/ coupon}} 68 + {{/if}}
69 69
70 {{# yohoCoin}} 70 {{# yohoCoin}}
71 <li class="coin" data-yoho-coin="{{.}}"> 71 <li class="coin" data-yoho-coin="{{.}}">
@@ -79,16 +79,16 @@ @@ -79,16 +79,16 @@
79 {{/ yohoCoin}} 79 {{/ yohoCoin}}
80 80
81 {{#if invoice}} 81 {{#if invoice}}
82 - <li class="invoice"> 82 + <li class="invoice {{#if needInvoice}}focus{{/if}}">
83 <span class="title">发票</span> 83 <span class="title">发票</span>
84 - <span class="iconfont checkbox icon-checkbox"></span> 84 + <span class="iconfont checkbox {{#if needInvoice}}icon-cb-checkbox{{else}}icon-checkbox{{/if}}"></span>
85 <form id="invoice"> 85 <form id="invoice">
86 - <input type="text" name="invoice-title" value="" placeholder="发票抬头"> 86 + <input type="text" name="invoice-title" value="{{invoiceText}}" placeholder="发票抬头">
87 <label> 87 <label>
88 发票类型 88 发票类型
89 <select class="invoice-type" name="invoice-type"> 89 <select class="invoice-type" name="invoice-type">
90 {{# invoice}} 90 {{# invoice}}
91 - <option value="{{id}}">{{name}}</option> 91 + <option value="{{id}}" {{#if isSelected}}select{{/if}}>{{name}}</option>
92 {{/ invoice}} 92 {{/ invoice}}
93 </select> 93 </select>
94 </label> 94 </label>
@@ -98,7 +98,7 @@ @@ -98,7 +98,7 @@
98 </ul> 98 </ul>
99 99
100 <form id="msg" action="" method="post"> 100 <form id="msg" action="" method="post">
101 - <input type="text" name="msg" value="" placeholder="留言"> 101 + <input type="text" name="msg" value="{{msg}}" placeholder="留言">
102 </form> 102 </form>
103 </section> 103 </section>
104 104
@@ -428,10 +428,17 @@ class CartModel @@ -428,10 +428,17 @@ class CartModel
428 428
429 $result['invoice'][] = $one; 429 $result['invoice'][] = $one;
430 } 430 }
  431 +
  432 + // 发票信息需要记录
  433 + // $one['id'] === $orderInfo['invoiceType'] && $one['isSelected'] = true;
  434 + // $one['needInvoice'] = $orderInfo['invoiceType'];
431 } 435 }
432 436
  437 + // 留言
  438 + $result['msg'] = $orderInfo['msg'];
  439 +
433 // 优惠券数据 440 // 优惠券数据
434 - $coupons = array('notUsed' => true); 441 + $coupons = array();
435 !empty($orderCompute['coupon_amount']) && $coupons['value'] = $orderInfo['couponValue']; 442 !empty($orderCompute['coupon_amount']) && $coupons['value'] = $orderInfo['couponValue'];
436 $coupons += self::getCouponList($uid, 0, 1, true); 443 $coupons += self::getCouponList($uid, 0, 1, true);
437 $result['coupon'] = $coupons; 444 $result['coupon'] = $coupons;