Authored by ccbikai

merge code

... ... @@ -888,10 +888,16 @@
costOfThisYear: 3000,
percent: 80, //当前消费等级进度条
costGap: 300, //距离升级所需消费金额(白金会员不传)
sumCost: 600
sumCost: 600,
//查看全部VIP特权页面
all: true
privilege: [
{
pic: '',
title: '',
description: ''
},
...
]
}
}
... ... @@ -899,7 +905,7 @@
### 我的订单
{
order: {
allOrders: [
orders: [
...
]
}
... ... @@ -925,5 +931,10 @@
...
],
count: 1,
sumCost: '199.00'
sumCost: '199.00',
//status
completed: true, //已完成
unpaid: true, //or 未支付
unshipped: true, //or 未发货
unreceived: '', //or 未收货,查看物流URL
}
\ No newline at end of file
... ...
... ... @@ -155,7 +155,7 @@ class TemplateLayout implements View_Interface
$template = file_get_contents($viewName, false, null);
$phpStr = LightnCandy::compile($template, array(
// DEBUG: LightnCandy::FLAG_RENDER_DEBUG | LightnCandy::FLAG_ERROR_EXCEPTION
'flags' => LightnCandy::FLAG_ERROR_EXCEPTION | LightnCandy::FLAG_MUSTACHE | LightnCandy::FLAG_HANDLEBARS, // 使用MUSTACHE和HANDLEBARS的模板格式
'flags' => LightnCandy::FLAG_RENDER_DEBUG | LightnCandy::FLAG_ERROR_EXCEPTION | LightnCandy::FLAG_MUSTACHE | LightnCandy::FLAG_HANDLEBARS, // 使用MUSTACHE和HANDLEBARS的模板格式
'basedir' => array($config->template->partials), // 模板里使用 {{> partial_name}} 时查找的目录
'fileext' => array($tplExt), // 允许查找文件的后缀
'lcrun' => 'Plugin\LCRun3', // 指定编译模板的runtime
... ...
var $ = require('jquery'),
Hammer = require('yoho.hammer'),
lazyLoad = require('yoho.lazyload');
\ No newline at end of file
@import "home", "vip-grade", "order", "recommend-for-you";
\ No newline at end of file
@import "home", "vip-grade", "order", "personal-details", "yoho-coin", "recommend-for-you";
... ...
... ... @@ -30,6 +30,33 @@
.sum-cost {
color: #e01;
}
.order-opt {
padding: 30rem / $pxConvertRem 0;
padding-right: 30rem / $pxConvertRem;
border-top: 1px solid #e0e0e0;
text-align: right;
> .btn {
display: inline-block;
box-sizing: border-box;
height: 60rem / $pxConvertRem;
line-height: 60rem / $pxConvertRem;
width: 140rem / $pxConvertRem;
font-size: 24rem / $pxConvertRem;
text-align: center;
}
.cancel {
border: 1px solid #000;
}
.pay {
background: #d0021b;
color: #fff;
margin-left: 20rem / $pxConvertRem;
}
}
}
}
... ...
.personal-details{
width: 100%;
height: auto;
overflow: hidden;
background-color:#fff;
border-bottom:1px solid #e0e0e0;
ul{
width: 95%;
height: auto;
overflow: hidden;
float:right;
li{
&:first-of-type{
height: 100rem / $pxConvertRem;
line-height:100rem / $pxConvertRem;
}
height: 80rem / $pxConvertRem;
border-bottom: 1px solid #e0e0e0;
span{
&:first-of-type{
color: #444;
line-height:100rem / $pxConvertRem;
}
width: 42%;
height: 100%;
line-height:80rem / $pxConvertRem;
font-size: 48em / $pxConvertRem;
margin-right: 8%;
float: left;
.head-portrait{
width:90rem / $pxConvertRem;
height: 90rem / $pxConvertRem;
overflow: hidden;
float: right;
border-radius:50%;
border:1px solid #eee;
}
.grade{
width:85rem / $pxConvertRem;
height: 30rem / $pxConvertRem;
overflow: hidden;
display: inline-block;
margin-top: 25rem / $pxConvertRem;
}
&:last-of-type{
color: #b0b0b0;
text-align: right;
}
}
&:last-of-type{
border-bottom:none;
}
}
}
}
\ No newline at end of file
... ...
.yoho-coin-page {
padding: 1em;
.coin-num {
font-size: 1.4em;
text-align: center;
em {
font-size: 4em;
color: #f00;
}
}
section p {
line-height: 1.5em;
}
.title {
font-size: 16px;
line-height: 20px;
font-weight: bold;
}
.sub-title {
display: block;
font-size: 14px;
line-height: 28px;
font-weight: bold;
}
.path {
color: #f60;
}
.remark {
color: #666;
span {
color: #9c3;
}
}
}
\ No newline at end of file
... ...
... ... @@ -38,12 +38,12 @@
text-align: center;
font-size: 22rem / $pxConvertRem;
color: #fff;
background: image-url("sale-icon/rank.png") no-repeat;
// background: image-url("sale-icon/rank.png") no-repeat;
background-position: center top;
background-size: auto 100%;
&.top {
background: image-url("sale-icon/rank-t.png") no-repeat;
// background: image-url("sale-icon/rank-t.png") no-repeat;
background-position: center top;
background-size: 100%;
line-height: 58rem / $pxConvertRem;
... ...
... ... @@ -18,11 +18,11 @@
<div id="order-container" class="order-container">
<div class="all orders">
{{# allOrders}}
{{#each orders}}
{{> me/order/order}}
{{/ allOrders}}
{{/each}}
</div>
<div class="obligation orders hide"></div>
<div class="unpaid orders hide"></div>
<div class="unshipped orders hide"></div>
<div class="unreceived orders hide"></div>
</div>
... ...
{{> layout/header}}
<div class="personal-details">
<ul>
<li><span>头像</span><span><i class="head-portrait"><img src="{{ head_ico }}"></i></span></li>
<li><span>昵称</span><span>{{ username }}</span></li>
<li><span>性别</span><span>{{ sex }}</span></li>
<li><span>生日</span><span>{{ birthday }}</span></li>
<li><span>会员等级</span><span><i class="grade vip-icon"></i></span></li>
</ul>
</div>
{{> layout/footer}}
\ No newline at end of file
... ...
{{> layout/header}}
<div class="yoho-coin-page yoho-page">
{{# yohoCoin}}
<p class="coin-num">
<em>{{coinNum}}</em>
YOHO币
</p>
<section>
<p class="title">YOHO币</p>
<hr>
<p>
<span class="sub-title">YOHO币是什么,有什么用?</span>
YOHO币是有货商城的虚拟货币,与现金比例1:1,没有任何使用期限,YOHO币可直接用于有货线上购物使用,不可转让他人,不可兑换为现金。使用YOHO币支付的金额不可计入消费金额。
</p>
<p>
<span class="sub-title">如何查看自己的YOHO币?</span>
<span class="path">登录 > 个人中心 > 我的YOHO币</span>
</p>
<p>
<span class="sub-title">YOHO币如何购买支付?</span>
在购买支付页面输入您要使用的YOHO币金额即可完成支付
<div class="remark">
<span>※ </span>
如果超过了我们约定的期限的非正常退货,我们将会于您的退款金额中直接扣除赠送YOHO币等值的金额。赠送给您的YOHO币还将保留在您的账户中,敬请谅解。
</div>
</p>
</section>
{{/ yohoCoin}}
</div>
{{> layout/footer}}
\ No newline at end of file
... ...
... ... @@ -143,6 +143,13 @@
seajs.use('js/index/footer');
</script>
{{/if}}
{{!-- 热门排行 --}}
{{#if hotrankPage}}
<script>
seajs.use('js/product/newsale/hot-rank');
seajs.use('js/index/footer');
</script>
{{/if}}
{{!-- 商品列表 --}}
{{#if goodListPage}}
<script>
... ...
<div class="order">
<div class="order" data-id="{{orderNum}}">
<header class="header">
订单编号:{{orderNum}}
<span class="trading-status">{{tradingStatus}}</span>
... ... @@ -11,4 +11,17 @@
<footer class="footer">
共{{count}}件商品 实付<span class="sum-cost">¥{{sumCost}}</span>
</footer>
{{#if unpaid}}
<div class="order-opt">
<span class="btn cancel">取消订单</span>
<span class="btn pay">立即付款</span>
</div>
{{/if}}
{{#with unreceived}}
<div class="order-opt">
<a class="check-logistics" href="{{.}}">查看物流</a>
</div>
{{/with}}
</div>
\ No newline at end of file
... ...
<ul>
<li>
<span class="icon icon-discount"></span>
<p>
{{#if vip3}}
购物8.8折
{{/if}}
{{#if vip2}}
购物9.0折
{{/if}}
{{#if vip1}}
购物9.5折
{{/if}}
{{#if all}}
全场最高8.8折
{{/if}}
<span>在原折扣基础上享受VIP折上折</span>
</p>
</li>
<li>
<span class="icon icon-year"></span>
<p>
年度优惠活动
<span>年度级的sale促销活动中,VIP会员可以享受优先购买权</span>
</p>
</li>
<li>
<span class="icon icon-vip"></span>
<p>
VIP活动优惠
<span>优先参加"VIP会员限定"活动</span>
</p>
</li>
<li>
<span class="icon icon-birth"></span>
<p>
生日特惠
<span>赠送生日优惠券</span>
</p>
</li>
<li>
<span class="icon icon-msg"></span>
<p>
优惠信息
<span>获得大量的潮流新品及优惠活动的信息</span>
</p>
</li>
<li>
<span class="icon icon-magazine"></span>
<p>
杂志赠阅
<span>下载《YOHO!潮流志》电子版,浏览magazine版块,最新最权威的潮流资讯尽在掌握!</span>
</p>
</li>
{{#or vip3 vip2 all}}
{{#each privilege}}
<li>
<span class="icon icon-arrival-soon"></span>
<img class="icon" src="{{pic}}">
<p>
快速送达
<span>
白金卡会员的订单将采用最快速度进行配送
</span>
{{title}}
<span>{{description}}</span>
</p>
</li>
{{/or}}
{{#or vip3 all}}
<li>
<span class="icon icon-gift"></span>
<p>
纪念品赠送
<span>
白金会员将有机会获得YOHO!与各潮流品牌和明显合作的联名款纪念品
</span>
</p>
</li>
{{/or}}
{{/each}}
</ul>
\ No newline at end of file
... ...
... ... @@ -68,7 +68,7 @@ class HomeController extends AbstractAction
// $orders = \Index\UserModel::getUserOrderData(967016, $type);
$order = array(
'allOrders' => array(
'orders' => array(
array(
'orderNum' => '408539077',
'tradingStatus' => '交易成功',
... ... @@ -94,7 +94,8 @@ class HomeController extends AbstractAction
)
),
'count' => 2,
'sumCost' => '699.00'
'sumCost' => '699.00',
'unpaid' => true,
)
)
);
... ... @@ -126,6 +127,20 @@ class HomeController extends AbstractAction
$favBrands = \Index\UserModel::getFavBrandData($uid, $gender);
print_r($favBrands);
}
/**
* 个人信息
*/
public function personalDetailsAction()
{
// $uid = $this->getUid();
$uid = 967016;
$data = \Index\UserModel::getUserProfileData($uid);
$this->_view->display('personal-details', $data);
}
/**
... ... @@ -133,11 +148,11 @@ class HomeController extends AbstractAction
*/
public function currencyAction()
{
$uid = $this->getUid();
$favBrands = \Index\UserModel::getYohoCoinData($uid);
// $uid = $this->getUid();
print_r($favBrands);
// $favBrands = \Index\UserModel::getYohoCoinData($uid);
// print_r($favBrands);
$this->_view->display('yoho-coin', array('yohoCoin' => array('coinNum' => 0)));
}
/**
... ...
... ... @@ -82,7 +82,7 @@ class NewsaleController extends AbstractAction
$channel = Helpers::getChannelByCookie();
// 设置一些默认参数
$data = array(
'discountPage' => true,
'hotrankPage' => true,
'headerBanner' => \Product\NewsaleModel::getNewFocus($channel),
'showDownloadApp' => true,
'pageFooter' => true,
... ...