Authored by uedxwg

Merge branch 'develop' of http://git.dev.yoho.cn/web/yohobuy into develop

@@ -888,10 +888,16 @@ @@ -888,10 +888,16 @@
888 costOfThisYear: 3000, 888 costOfThisYear: 3000,
889 percent: 80, //当前消费等级进度条 889 percent: 80, //当前消费等级进度条
890 costGap: 300, //距离升级所需消费金额(白金会员不传) 890 costGap: 300, //距离升级所需消费金额(白金会员不传)
891 - sumCost: 600 891 + sumCost: 600,
892 892
893 - //查看全部VIP特权页面  
894 - all: true 893 + privilege: [
  894 + {
  895 + pic: '',
  896 + title: '',
  897 + description: ''
  898 + },
  899 + ...
  900 + ]
895 } 901 }
896 } 902 }
897 903
@@ -899,7 +905,7 @@ @@ -899,7 +905,7 @@
899 ### 我的订单 905 ### 我的订单
900 { 906 {
901 order: { 907 order: {
902 - allOrders: [ 908 + orders: [
903 ... 909 ...
904 ] 910 ]
905 } 911 }
@@ -925,5 +931,10 @@ @@ -925,5 +931,10 @@
925 ... 931 ...
926 ], 932 ],
927 count: 1, 933 count: 1,
928 - sumCost: '199.00' 934 + sumCost: '199.00',
  935 + //status
  936 + completed: true, //已完成
  937 + unpaid: true, //or 未支付
  938 + unshipped: true, //or 未发货
  939 + unreceived: '', //or 未收货,查看物流URL
929 } 940 }
@@ -30,6 +30,33 @@ @@ -30,6 +30,33 @@
30 .sum-cost { 30 .sum-cost {
31 color: #e01; 31 color: #e01;
32 } 32 }
  33 +
  34 + .order-opt {
  35 + padding: 30rem / $pxConvertRem 0;
  36 + padding-right: 30rem / $pxConvertRem;
  37 + border-top: 1px solid #e0e0e0;
  38 + text-align: right;
  39 +
  40 + > .btn {
  41 + display: inline-block;
  42 + box-sizing: border-box;
  43 + height: 60rem / $pxConvertRem;
  44 + line-height: 60rem / $pxConvertRem;
  45 + width: 140rem / $pxConvertRem;
  46 + font-size: 24rem / $pxConvertRem;
  47 + text-align: center;
  48 + }
  49 +
  50 + .cancel {
  51 + border: 1px solid #000;
  52 + }
  53 +
  54 + .pay {
  55 + background: #d0021b;
  56 + color: #fff;
  57 + margin-left: 20rem / $pxConvertRem;
  58 + }
  59 + }
33 } 60 }
34 } 61 }
35 62
@@ -18,11 +18,11 @@ @@ -18,11 +18,11 @@
18 18
19 <div id="order-container" class="order-container"> 19 <div id="order-container" class="order-container">
20 <div class="all orders"> 20 <div class="all orders">
21 - {{# allOrders}} 21 + {{#each orders}}
22 {{> me/order/order}} 22 {{> me/order/order}}
23 - {{/ allOrders}} 23 + {{/each}}
24 </div> 24 </div>
25 - <div class="obligation orders hide"></div> 25 + <div class="unpaid orders hide"></div>
26 <div class="unshipped orders hide"></div> 26 <div class="unshipped orders hide"></div>
27 <div class="unreceived orders hide"></div> 27 <div class="unreceived orders hide"></div>
28 </div> 28 </div>
1 -<div class="order"> 1 +<div class="order" data-id="{{orderNum}}">
2 <header class="header"> 2 <header class="header">
3 订单编号:{{orderNum}} 3 订单编号:{{orderNum}}
4 <span class="trading-status">{{tradingStatus}}</span> 4 <span class="trading-status">{{tradingStatus}}</span>
@@ -11,4 +11,17 @@ @@ -11,4 +11,17 @@
11 <footer class="footer"> 11 <footer class="footer">
12 共{{count}}件商品 实付<span class="sum-cost">¥{{sumCost}}</span> 12 共{{count}}件商品 实付<span class="sum-cost">¥{{sumCost}}</span>
13 </footer> 13 </footer>
  14 +
  15 + {{#if unpaid}}
  16 + <div class="order-opt">
  17 + <span class="btn cancel">取消订单</span>
  18 + <span class="btn pay">立即付款</span>
  19 + </div>
  20 + {{/if}}
  21 +
  22 + {{#with unreceived}}
  23 + <div class="order-opt">
  24 + <a class="check-logistics" href="{{.}}">查看物流</a>
  25 + </div>
  26 + {{/with}}
14 </div> 27 </div>
1 <ul> 1 <ul>
  2 + {{#each privilege}}
2 <li> 3 <li>
3 - <span class="icon icon-discount"></span> 4 + <img class="icon" src="{{pic}}">
4 <p> 5 <p>
5 - {{#if vip3}}  
6 - 购物8.8折  
7 - {{/if}}  
8 -  
9 - {{#if vip2}}  
10 - 购物9.0折  
11 - {{/if}}  
12 -  
13 - {{#if vip1}}  
14 - 购物9.5折  
15 - {{/if}}  
16 -  
17 - {{#if all}}  
18 - 全场最高8.8折  
19 - {{/if}}  
20 - <span>在原折扣基础上享受VIP折上折</span> 6 + {{title}}
  7 + <span>{{description}}</span>
21 </p> 8 </p>
22 </li> 9 </li>
23 - <li>  
24 - <span class="icon icon-year"></span>  
25 - <p>  
26 - 年度优惠活动  
27 - <span>年度级的sale促销活动中,VIP会员可以享受优先购买权</span>  
28 - </p>  
29 - </li>  
30 - <li>  
31 - <span class="icon icon-vip"></span>  
32 - <p>  
33 - VIP活动优惠  
34 - <span>优先参加"VIP会员限定"活动</span>  
35 - </p>  
36 - </li>  
37 - <li>  
38 - <span class="icon icon-birth"></span>  
39 - <p>  
40 - 生日特惠  
41 - <span>赠送生日优惠券</span>  
42 - </p>  
43 - </li>  
44 - <li>  
45 - <span class="icon icon-msg"></span>  
46 - <p>  
47 - 优惠信息  
48 - <span>获得大量的潮流新品及优惠活动的信息</span>  
49 - </p>  
50 - </li>  
51 - <li>  
52 - <span class="icon icon-magazine"></span>  
53 - <p>  
54 - 杂志赠阅  
55 - <span>下载《YOHO!潮流志》电子版,浏览magazine版块,最新最权威的潮流资讯尽在掌握!</span>  
56 - </p>  
57 - </li>  
58 - {{#or vip3 vip2 all}}  
59 - <li>  
60 - <span class="icon icon-arrival-soon"></span>  
61 - <p>  
62 - 快速送达  
63 - <span>  
64 - 白金卡会员的订单将采用最快速度进行配送  
65 - </span>  
66 - </p>  
67 - </li>  
68 - {{/or}}  
69 -  
70 - {{#or vip3 all}}  
71 - <li>  
72 - <span class="icon icon-gift"></span>  
73 - <p>  
74 - 纪念品赠送  
75 - <span>  
76 - 白金会员将有机会获得YOHO!与各潮流品牌和明显合作的联名款纪念品  
77 - </span>  
78 - </p>  
79 - </li>  
80 - {{/or}} 10 + {{/each}}
81 </ul> 11 </ul>
@@ -45,7 +45,7 @@ class HomeController extends AbstractAction @@ -45,7 +45,7 @@ class HomeController extends AbstractAction
45 // $orders = \Index\UserModel::getUserOrderData(967016, $type); 45 // $orders = \Index\UserModel::getUserOrderData(967016, $type);
46 46
47 $order = array( 47 $order = array(
48 - 'allOrders' => array( 48 + 'orders' => array(
49 array( 49 array(
50 'orderNum' => '408539077', 50 'orderNum' => '408539077',
51 'tradingStatus' => '交易成功', 51 'tradingStatus' => '交易成功',
@@ -71,7 +71,8 @@ class HomeController extends AbstractAction @@ -71,7 +71,8 @@ class HomeController extends AbstractAction
71 ) 71 )
72 ), 72 ),
73 'count' => 2, 73 'count' => 2,
74 - 'sumCost' => '699.00' 74 + 'sumCost' => '699.00',
  75 + 'unpaid' => true,
75 ) 76 )
76 ) 77 )
77 ); 78 );