Authored by ccbikai

merge code

@@ -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 }
@@ -155,7 +155,7 @@ class TemplateLayout implements View_Interface @@ -155,7 +155,7 @@ class TemplateLayout implements View_Interface
155 $template = file_get_contents($viewName, false, null); 155 $template = file_get_contents($viewName, false, null);
156 $phpStr = LightnCandy::compile($template, array( 156 $phpStr = LightnCandy::compile($template, array(
157 // DEBUG: LightnCandy::FLAG_RENDER_DEBUG | LightnCandy::FLAG_ERROR_EXCEPTION 157 // DEBUG: LightnCandy::FLAG_RENDER_DEBUG | LightnCandy::FLAG_ERROR_EXCEPTION
158 - 'flags' => LightnCandy::FLAG_ERROR_EXCEPTION | LightnCandy::FLAG_MUSTACHE | LightnCandy::FLAG_HANDLEBARS, // 使用MUSTACHE和HANDLEBARS的模板格式 158 + 'flags' => LightnCandy::FLAG_RENDER_DEBUG | LightnCandy::FLAG_ERROR_EXCEPTION | LightnCandy::FLAG_MUSTACHE | LightnCandy::FLAG_HANDLEBARS, // 使用MUSTACHE和HANDLEBARS的模板格式
159 'basedir' => array($config->template->partials), // 模板里使用 {{> partial_name}} 时查找的目录 159 'basedir' => array($config->template->partials), // 模板里使用 {{> partial_name}} 时查找的目录
160 'fileext' => array($tplExt), // 允许查找文件的后缀 160 'fileext' => array($tplExt), // 允许查找文件的后缀
161 'lcrun' => 'Plugin\LCRun3', // 指定编译模板的runtime 161 'lcrun' => 'Plugin\LCRun3', // 指定编译模板的runtime
1 -var $ = require('jquery'),  
2 - Hammer = require('yoho.hammer'),  
3 - lazyLoad = require('yoho.lazyload');  
1 -@import "home", "vip-grade", "order", "recommend-for-you";  
  1 +@import "home", "vip-grade", "order", "personal-details", "yoho-coin", "recommend-for-you";
@@ -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
  1 +.personal-details{
  2 + width: 100%;
  3 + height: auto;
  4 + overflow: hidden;
  5 + background-color:#fff;
  6 + border-bottom:1px solid #e0e0e0;
  7 + ul{
  8 + width: 95%;
  9 + height: auto;
  10 + overflow: hidden;
  11 + float:right;
  12 + li{
  13 + &:first-of-type{
  14 + height: 100rem / $pxConvertRem;
  15 + line-height:100rem / $pxConvertRem;
  16 + }
  17 + height: 80rem / $pxConvertRem;
  18 + border-bottom: 1px solid #e0e0e0;
  19 + span{
  20 + &:first-of-type{
  21 + color: #444;
  22 + line-height:100rem / $pxConvertRem;
  23 + }
  24 + width: 42%;
  25 + height: 100%;
  26 + line-height:80rem / $pxConvertRem;
  27 + font-size: 48em / $pxConvertRem;
  28 + margin-right: 8%;
  29 + float: left;
  30 + .head-portrait{
  31 + width:90rem / $pxConvertRem;
  32 + height: 90rem / $pxConvertRem;
  33 + overflow: hidden;
  34 + float: right;
  35 + border-radius:50%;
  36 + border:1px solid #eee;
  37 + }
  38 + .grade{
  39 + width:85rem / $pxConvertRem;
  40 + height: 30rem / $pxConvertRem;
  41 + overflow: hidden;
  42 + display: inline-block;
  43 + margin-top: 25rem / $pxConvertRem;
  44 + }
  45 + &:last-of-type{
  46 + color: #b0b0b0;
  47 + text-align: right;
  48 + }
  49 + }
  50 + &:last-of-type{
  51 + border-bottom:none;
  52 + }
  53 + }
  54 + }
  55 +}
  1 +.yoho-coin-page {
  2 + padding: 1em;
  3 +
  4 + .coin-num {
  5 + font-size: 1.4em;
  6 + text-align: center;
  7 +
  8 + em {
  9 + font-size: 4em;
  10 + color: #f00;
  11 + }
  12 + }
  13 +
  14 + section p {
  15 + line-height: 1.5em;
  16 + }
  17 +
  18 + .title {
  19 + font-size: 16px;
  20 + line-height: 20px;
  21 + font-weight: bold;
  22 + }
  23 +
  24 + .sub-title {
  25 + display: block;
  26 + font-size: 14px;
  27 + line-height: 28px;
  28 + font-weight: bold;
  29 + }
  30 +
  31 + .path {
  32 + color: #f60;
  33 + }
  34 +
  35 + .remark {
  36 + color: #666;
  37 +
  38 + span {
  39 + color: #9c3;
  40 + }
  41 + }
  42 +}
@@ -38,12 +38,12 @@ @@ -38,12 +38,12 @@
38 text-align: center; 38 text-align: center;
39 font-size: 22rem / $pxConvertRem; 39 font-size: 22rem / $pxConvertRem;
40 color: #fff; 40 color: #fff;
41 - background: image-url("sale-icon/rank.png") no-repeat; 41 + // background: image-url("sale-icon/rank.png") no-repeat;
42 background-position: center top; 42 background-position: center top;
43 background-size: auto 100%; 43 background-size: auto 100%;
44 44
45 &.top { 45 &.top {
46 - background: image-url("sale-icon/rank-t.png") no-repeat; 46 + // background: image-url("sale-icon/rank-t.png") no-repeat;
47 background-position: center top; 47 background-position: center top;
48 background-size: 100%; 48 background-size: 100%;
49 line-height: 58rem / $pxConvertRem; 49 line-height: 58rem / $pxConvertRem;
@@ -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 +{{> layout/header}}
  2 + <div class="personal-details">
  3 + <ul>
  4 + <li><span>头像</span><span><i class="head-portrait"><img src="{{ head_ico }}"></i></span></li>
  5 + <li><span>昵称</span><span>{{ username }}</span></li>
  6 + <li><span>性别</span><span>{{ sex }}</span></li>
  7 + <li><span>生日</span><span>{{ birthday }}</span></li>
  8 + <li><span>会员等级</span><span><i class="grade vip-icon"></i></span></li>
  9 + </ul>
  10 + </div>
  11 +{{> layout/footer}}
  1 +{{> layout/header}}
  2 +<div class="yoho-coin-page yoho-page">
  3 + {{# yohoCoin}}
  4 + <p class="coin-num">
  5 + <em>{{coinNum}}</em>
  6 + YOHO币
  7 + </p>
  8 +
  9 + <section>
  10 + <p class="title">YOHO币</p>
  11 + <hr>
  12 + <p>
  13 + <span class="sub-title">YOHO币是什么,有什么用?</span>
  14 + YOHO币是有货商城的虚拟货币,与现金比例1:1,没有任何使用期限,YOHO币可直接用于有货线上购物使用,不可转让他人,不可兑换为现金。使用YOHO币支付的金额不可计入消费金额。
  15 + </p>
  16 + <p>
  17 + <span class="sub-title">如何查看自己的YOHO币?</span>
  18 + <span class="path">登录 > 个人中心 > 我的YOHO币</span>
  19 + </p>
  20 + <p>
  21 + <span class="sub-title">YOHO币如何购买支付?</span>
  22 + 在购买支付页面输入您要使用的YOHO币金额即可完成支付
  23 +
  24 + <div class="remark">
  25 + <span>※ </span>
  26 + 如果超过了我们约定的期限的非正常退货,我们将会于您的退款金额中直接扣除赠送YOHO币等值的金额。赠送给您的YOHO币还将保留在您的账户中,敬请谅解。
  27 + </div>
  28 + </p>
  29 + </section>
  30 + {{/ yohoCoin}}
  31 +</div>
  32 +{{> layout/footer}}
@@ -143,6 +143,13 @@ @@ -143,6 +143,13 @@
143 seajs.use('js/index/footer'); 143 seajs.use('js/index/footer');
144 </script> 144 </script>
145 {{/if}} 145 {{/if}}
  146 +{{!-- 热门排行 --}}
  147 +{{#if hotrankPage}}
  148 +<script>
  149 + seajs.use('js/product/newsale/hot-rank');
  150 + seajs.use('js/index/footer');
  151 +</script>
  152 +{{/if}}
146 {{!-- 商品列表 --}} 153 {{!-- 商品列表 --}}
147 {{#if goodListPage}} 154 {{#if goodListPage}}
148 <script> 155 <script>
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 - <li>  
3 - <span class="icon icon-discount"></span>  
4 - <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>  
21 - </p>  
22 - </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}} 2 + {{#each privilege}}
59 <li> 3 <li>
60 - <span class="icon icon-arrival-soon"></span> 4 + <img class="icon" src="{{pic}}">
61 <p> 5 <p>
62 - 快速送达  
63 - <span>  
64 - 白金卡会员的订单将采用最快速度进行配送  
65 - </span> 6 + {{title}}
  7 + <span>{{description}}</span>
66 </p> 8 </p>
67 </li> 9 </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>
@@ -68,7 +68,7 @@ class HomeController extends AbstractAction @@ -68,7 +68,7 @@ class HomeController extends AbstractAction
68 // $orders = \Index\UserModel::getUserOrderData(967016, $type); 68 // $orders = \Index\UserModel::getUserOrderData(967016, $type);
69 69
70 $order = array( 70 $order = array(
71 - 'allOrders' => array( 71 + 'orders' => array(
72 array( 72 array(
73 'orderNum' => '408539077', 73 'orderNum' => '408539077',
74 'tradingStatus' => '交易成功', 74 'tradingStatus' => '交易成功',
@@ -94,7 +94,8 @@ class HomeController extends AbstractAction @@ -94,7 +94,8 @@ class HomeController extends AbstractAction
94 ) 94 )
95 ), 95 ),
96 'count' => 2, 96 'count' => 2,
97 - 'sumCost' => '699.00' 97 + 'sumCost' => '699.00',
  98 + 'unpaid' => true,
98 ) 99 )
99 ) 100 )
100 ); 101 );
@@ -126,6 +127,20 @@ class HomeController extends AbstractAction @@ -126,6 +127,20 @@ class HomeController extends AbstractAction
126 $favBrands = \Index\UserModel::getFavBrandData($uid, $gender); 127 $favBrands = \Index\UserModel::getFavBrandData($uid, $gender);
127 128
128 print_r($favBrands); 129 print_r($favBrands);
  130 +
  131 + }
  132 +
  133 + /**
  134 + * 个人信息
  135 + */
  136 + public function personalDetailsAction()
  137 + {
  138 + // $uid = $this->getUid();
  139 + $uid = 967016;
  140 + $data = \Index\UserModel::getUserProfileData($uid);
  141 + $this->_view->display('personal-details', $data);
  142 +
  143 +
129 } 144 }
130 145
131 /** 146 /**
@@ -133,11 +148,11 @@ class HomeController extends AbstractAction @@ -133,11 +148,11 @@ class HomeController extends AbstractAction
133 */ 148 */
134 public function currencyAction() 149 public function currencyAction()
135 { 150 {
136 - $uid = $this->getUid();  
137 -  
138 - $favBrands = \Index\UserModel::getYohoCoinData($uid); 151 + // $uid = $this->getUid();
139 152
140 - print_r($favBrands); 153 + // $favBrands = \Index\UserModel::getYohoCoinData($uid);
  154 + // print_r($favBrands);
  155 + $this->_view->display('yoho-coin', array('yohoCoin' => array('coinNum' => 0)));
141 } 156 }
142 157
143 /** 158 /**
@@ -82,7 +82,7 @@ class NewsaleController extends AbstractAction @@ -82,7 +82,7 @@ class NewsaleController extends AbstractAction
82 $channel = Helpers::getChannelByCookie(); 82 $channel = Helpers::getChannelByCookie();
83 // 设置一些默认参数 83 // 设置一些默认参数
84 $data = array( 84 $data = array(
85 - 'discountPage' => true, 85 + 'hotrankPage' => true,
86 'headerBanner' => \Product\NewsaleModel::getNewFocus($channel), 86 'headerBanner' => \Product\NewsaleModel::getNewFocus($channel),
87 'showDownloadApp' => true, 87 'showDownloadApp' => true,
88 'pageFooter' => true, 88 'pageFooter' => true,