Authored by whb

PC删除Home和ME

<?php
use Action\WebAction;
use WebPlugin\Helpers;
use WebPlugin\Paging;
use Home\UserModel;
use Home\AddressModel;
use Home\IndexModel;
use Home\OrderModel;
use LibModels\Web\Home\UserData;
use LibModels\Web\Home\AddressData;
use LibModels\Web\Home\OrderData;
/**
* 个人中心
*/
class HomeController extends WebAction
{
// /**
// * 我的收藏
// */
// public function favoriteAction()
// {
// $data = array(
// 'path' => array(
// array(
// 'href' => 'www.yohobuy.com',
// 'name' => 'YOHO!有货首页'
// ),
// array(
// 'href' => 'www.yohobuy.com/home',
// 'name' => '个人中心'
// ),
// array(
// 'name' => '订单中心'
// )
// ),
// 'userThumb' => 'http://img10.static.yhbimg.com/headimg/2013/11/28/09/01cae078abe5fe320c88cdf4c220212688.gif?imageView/2/w/100/h/100',
// 'homeNav' => array(
// array(
// 'title' => '交易管理',
// 'subNav' => array(
// array(
// 'name' => '我的订单',
// 'href' => '/',
// 'active' => true
// ),
// array(
// 'name' => '我的收藏',
// 'href' => '/'
// ),
// array(
// 'name' => '我的YOHO币',
// 'href' => '/'
// ),
// array(
// 'name' => '我的红包',
// 'href' => '/'
// ),
// array(
// 'name' => '我的优惠券',
// 'href' => '/'
// ),
// array(
// 'name' => '我的VIP',
// 'href' => '/'
// )
// )
// )
// ),
// 'tabs' => array(
// array(
// 'active' => true,
// 'url' => '',
// 'name' => '商品收藏'
// ),
// array(
// 'url' => '',
// 'name' => '品牌收藏'
// ),
// array(
// 'url' => '',
// 'name' => '文章收藏'
// )
// ),
// 'favProducts' => array(
// 'sort' => array(
// 'default' => array(
// array(
// 'name' => '全部',
// 'count' => 140,
// 'focus' => true,
// 'url' => ''
// )
// ),
// 'all' => array(
// array(
// 'name' => '全部',
// 'count' => 140,
// 'focus' => true,
// 'url' => ''
// ),
// array(
// 'name' => 'T恤',
// 'count' => 5,
// 'url' => ''
// ),
// array(
// 'name' => '衬衫',
// 'count' => 40,
// 'url' => ''
// )
// )
// ),
// 'reduction' => array(
// 'count' => 0,
// 'url' => ''
// ),
// 'filter' => array(
// 'reductionUrl' => '',
// 'reductionChecked' => true,
// 'activityUrl' => '',
// 'activityChecked' => true
// ),
// 'goods' => array(
// array(
// 'skn' => '239557',
// 'img' => 'http://img12.static.yhbimg.com/goodsimg/2016/01/14/07/02b9ce4acb9374022cf645634574902f1a.jpg?imageMogr2/thumbnail/100x100/extent/100x100/background/d2hpdGU=/position/center/quality/90',
// 'name' => 'VEIL ADVOCATED CHAOS Snapback 熔岩体刺绣棒球帽',
// 'url' => '',
// 'activites' => array(
// 'count' => 1,
// 'list' => array(
// array(
// 'type' => '现金折扣',
// 'name' => '冬装季末特享',
// 'desc' => '折上满¥599再减¥100'
// ),
// array(
// 'type' => '满送礼品',
// 'name' => '全场99元加价购'
// ),
// array(
// 'type' => '满送礼品',
// 'name' => '全场59元加价购'
// )
// )
// ),
// 'price' => '239.00',
// 'priceDown' => '30.00',
// 'buyNow' => '/path/to/buy',
// // 'buyAgain' => '/path/to/buy', //再次购买链接
// // 'soldOut' => true,
// // 'hadNoticed' => true, //已经订阅通知
// 'delUrl' => ''
// )
// ),
// 'pager' => array(
// 'hasCheckAll' => true,
// 'count' => 24,
// 'curPage' => 1,
// 'totalPages' => 4,
// 'pagerHtml' => '<a href="?page=2&amp;type=3"><span class="iconfont">&#xe634;</span>上一页</a><a href="?page=1&amp;type=3">1</a><a class="cur" href="?page=2&amp;type=3">2</a><a href="?page=3&amp;type=3">3</a><a href="?page=2&amp;type=3">下一页<span class="iconfont">&#xe601;</span></a>'
// )
// )
// // 'favBrands' => array(
// // 'brands' => array(
// // array(
// // 'img' => 'http://img13.static.yhbimg.com/brandLogo/2015/12/07/11/02ad8c091053e36261ac4eace80ba40c54.jpg?imageMogr2/thumbnail/100x100/extent/100x100/background/d2hpdGU=/position/center/quality/90',
// // 'url' => '',
// // 'name' => 'ACROSS!',
// // 'naCount' => 1,
// // 'colCount' => 2300,
// // 'delUrl' => ''
// // )
// // ),
// // 'pager' => array(
// // 'hasCheckAll' => true,
// // 'count' => 24,
// // 'curPage' => 1,
// // 'totalPages' => 4,
// // 'pagerHtml' => '<a href="?page=2&amp;type=3"><span class="iconfont">&#xe634;</span>上一页</a><a href="?page=1&amp;type=3">1</a><a class="cur" href="?page=2&amp;type=3">2</a><a href="?page=3&amp;type=3">3</a><a href="?page=2&amp;type=3">下一页<span class="iconfont">&#xe601;</span></a>'
// // )
// // )
// // 'favArticles' => array(
// // 'articles' => array(
// // array(
// // 'img' => 'http://img12.static.yhbimg.com/yhb-img01/2016/02/17/06/02f6d182974252df932839932b1f2f8b9c.jpg?imageView/2/w/600/h/200',
// // 'url' => '',
// // 'name' => ' 趁着好天气,换上一身轻松的装备,骑车去郊游吧',
// // 'desc' => '看着外面天气这么好,春节假期的欢乐应该延续一下,马上周末,快约上三五好友去郊游吧!'
// // )
// // ),
// // 'pager' => array(
// // 'hasCheckAll' => true,
// // 'count' => 24,
// // 'curPage' => 1,
// // 'totalPages' => 4,
// // 'pagerHtml' => '<a href="?page=2&amp;type=3"><span class="iconfont">&#xe634;</span>上一页</a><a href="?page=1&amp;type=3">1</a><a class="cur" href="?page=2&amp;type=3">2</a><a href="?page=3&amp;type=3">3</a><a href="?page=2&amp;type=3">下一页<span class="iconfont">&#xe601;</span></a>'
// // )
// // )
// );
//
// $this->_view->display('favorite', array('meFavoritePage' => true, 'meFavorite' => $data));
// }
// /**
// * 品牌收藏-新品到着
// */
// public function newproductAction()
// {
// $this->_view->display('na-list', array(
// 'naGoods' => array(
// // 'pre' => 'path/to/ajax',
// 'goods' => array(
// array(
// 'img' => 'http://img13.static.yhbimg.com/goodsimg/2016/02/02/08/0262ec823af3dcecc5fff8c687fc872c31.jpg?imageMogr2/thumbnail/100x100/extent/100x100/background/d2hpdGU=/position/center/quality/90',
// 'url' => '',
// 'name' => 'Master Plan PU拼接魔术贴运动鞋 ',
// 'salePrice' => '699.00',
// 'marketPrice' => '799.00'
// )
// ),
// 'next' => '/home/newproduct'
// )
// ));
// }
/**
* 我的红包
*/
public function redenvelopesAction()
{
$data = array(
'path' => array(
array(
'href' => 'www.yohobuy.com',
'name' => 'YOHO!有货首页'
),
array(
'href' => 'www.yohobuy.com/home',
'name' => '个人中心'
),
array(
'name' => '订单中心'
)
),
'userThumb' => 'http://img10.static.yhbimg.com/headimg/2013/11/28/09/01cae078abe5fe320c88cdf4c220212688.gif?imageView/2/w/100/h/100',
'homeNav' => array(
array(
'title' => '交易管理',
'subNav' => array(
array(
'name' => '我的订单',
'href' => '/',
'active' => true
),
array(
'name' => '我的收藏',
'href' => '/'
),
array(
'name' => '我的YOHO币',
'href' => '/'
),
array(
'name' => '我的红包',
'href' => '/'
),
array(
'name' => '我的优惠券',
'href' => '/'
),
array(
'name' => '我的VIP',
'href' => '/'
)
)
)
),
'redEnvelopes' => array(
array(
'money' => '0.00',
'termOfValidity' => '2015.10.30-2015.11.12',
'useRemark' => '结算时折抵现金使用,可与优惠券叠加使用。'
)
)
);
$this->_view->display('red-envelopes', array('meRedEnvelopes' => $data));
}
/**
* 我的优惠券
*/
public function couponsAction()
{
$data = array(
'path' => array(
array(
'href' => 'www.yohobuy.com',
'name' => 'YOHO!有货首页'
),
array(
'href' => 'www.yohobuy.com/home',
'name' => '个人中心'
),
array(
'name' => '订单中心'
)
),
'userThumb' => 'http://img10.static.yhbimg.com/headimg/2013/11/28/09/01cae078abe5fe320c88cdf4c220212688.gif?imageView/2/w/100/h/100',
'homeNav' => array(
array(
'title' => '交易管理',
'subNav' => array(
array(
'name' => '我的订单',
'href' => '/',
'active' => true
),
array(
'name' => '我的收藏',
'href' => '/'
),
array(
'name' => '我的YOHO币',
'href' => '/'
),
array(
'name' => '我的红包',
'href' => '/'
),
array(
'name' => '我的优惠券',
'href' => '/'
),
array(
'name' => '我的VIP',
'href' => '/'
)
)
)
),
'tabs' => array(
array(
'active' => true,
'url' => '',
'name' => '未使用优惠券'
),
array(
'url' => '',
'name' => '已使用优惠券'
),
array(
'url' => '',
'name' => '已失效优惠券'
)
),
'unUseCoupons' => array(
array(
'img' => 'http://static.yohobuy.com/images/v2/activity/default_coupon.jpg',
'value' => '¥70.00',
'beginTime' => '2016-02-19',
'endTime' => '2016-02-29',
'endSoon' => true,
'useRemark' => '开学开工利是:满599减70(金卡专享)',
'status' => '可使用'
),
array(
'img' => 'http://static.yohobuy.com/images/v2/activity/default_coupon.jpg',
'value' => '¥70.00',
'beginTime' => '2016-02-19',
'endTime' => '2016-02-29',
'endSoon' => true,
'useRemark' => '开学开工利是:满799减100(金卡专享)',
'status' => '可使用'
)
),
// 'usedCoupons' => array(
// array(
// 'img' => 'http://static.yohobuy.com/images/v2/activity/default_coupon.jpg',
// 'value' => '¥70.00',
// 'orderNum' => '89223467',
// 'orderSum' => '122.00',
// 'payment' => '111.00',
// 'useTime' => '2016-01-01 22:44'
// )
// ),
// 'noValidCoupons' => array(
// array(
// 'img' => 'http://static.yohobuy.com/images/v2/activity/default_coupon.jpg',
// 'value' => '¥70.00',
// 'beginTime' => '2016-02-19',
// 'endTime' => '2016-02-29',
// 'endSoon' => true,
// 'useRemark' => '开学开工利是:满599减70(金卡专享)'
// )
// )
);
$this->_view->display('coupons', array('meCoupons' => $data));
}
public function currencyAction()
{
$data = array(
'path' => array(
array(
'href' => 'www.yohobuy.com',
'name' => 'YOHO!有货首页'
),
array(
'href' => 'www.yohobuy.com/home',
'name' => '个人中心'
),
array(
'name' => '订单中心'
)
),
'userThumb' => 'http://img10.static.yhbimg.com/headimg/2013/11/28/09/01cae078abe5fe320c88cdf4c220212688.gif?imageView/2/w/100/h/100',
'homeNav' => array(
array(
'title' => '交易管理',
'subNav' => array(
array(
'name' => '我的订单',
'href' => '/',
'active' => true
),
array(
'name' => '我的收藏',
'href' => '/'
),
array(
'name' => '我的YOHO币',
'href' => '/'
),
array(
'name' => '我的红包',
'href' => '/'
),
array(
'name' => '我的优惠券',
'href' => '/'
),
array(
'name' => '我的VIP',
'href' => '/'
)
)
)
),
'myCurrency' => 0,
'tabs' => array(
array(
'active' => true,
'url' => '',
'name' => '全部明细'
),
array(
'url' => '',
'name' => '全部收入'
),
array(
'url' => '',
'name' => '全部支出'
)
),
'options' => array(
array(
'url' => '#',
'name' => '最近3个月明细'
),
array(
'url' => '',
'name' => '最近半年明细'
),
array(
'url' => '',
'name' => '最近一年明细'
)
),
'coinHelperUrl' => '',
'currency' => array(
array(
'date' => '2016/2/2 14:20:09',
'isIncome' => true,
'value' => 100,
'desc' => '晒单奖励:DABOMB经典后背交叉骨印花圆领卫衣',
'detailUrl' => '#'
)
)
);
$this->_view->display('currency', array('meCurrency' => $data));
}
/**
* 我的咨询
*/
public function consultAction()
{
$data = array(
'path' => array(
array(
'href' => 'www.yohobuy.com',
'name' => 'YOHO!有货首页'
),
array(
'href' => 'www.yohobuy.com/home',
'name' => '个人中心'
),
array(
'name' => '订单中心'
)
),
'userThumb' => 'http://img10.static.yhbimg.com/headimg/2013/11/28/09/01cae078abe5fe320c88cdf4c220212688.gif?imageView/2/w/100/h/100',
'homeNav' => array(
array(
'title' => '交易管理',
'subNav' => array(
array(
'name' => '我的订单',
'href' => '/'
),
array(
'name' => '我的收藏',
'href' => '/'
),
array(
'name' => '我的YOHO币',
'href' => '/'
),
array(
'name' => '我的红包',
'href' => '/'
),
array(
'name' => '我的优惠券',
'href' => '/'
),
array(
'name' => '我的VIP',
'href' => '/'
)
)
),
array(
'title' => '服务中心',
'subNav' => array(
array(
'name' => '我的退/换货',
'href' => '/'
),
array(
'name' => '我的咨询',
'href' => '/',
'active' => true
),
array(
'name' => '我的评论',
'href' => '/'
),
array(
'name' => '我的投诉',
'href' => '/'
),
array(
'name' => '我的信息',
'href' => '/'
),
array(
'name' => '在线客服',
'href' => '/'
)
)
)
),
'consults' => array(
array(
'href' => '',
'thumb' => 'http://img12.static.yhbimg.com/goodsimg/2015/11/06/08/02107c4a7aed6d189584116c6f1fa7ec03.jpg?imageMogr2/thumbnail/60x60/extent/60x60/background/d2hpdGU=/position/center/quality/90',
'name' => 'MACROPUS PU简约系列双肩包',
'question' => '170, 65应该穿多大号',
'reply' => '向您推荐L号供参考,由于版型和个人穿衣风格不同,建议您参照此款商品“尺码信息”。
感谢您对Yoho!Buy有货的支持,祝您购物愉快!',
'consultTime' => '2015-12-01 22:08:19'
),
array(
'href' => '',
'thumb' => 'http://img11.static.yhbimg.com/goodsimg/2015/11/17/08/0107ba4a348463e8d0a5898a45ac986c1e.jpg?imageMogr2/thumbnail/60x60/extent/60x60/background/d2hpdGU=/position/center/quality/90',
'name' => 'Daniel Wellington Cl',
'question' => '表盘直径多少',
'consultTime' => '2015-12-01 22:08:19'
),
array(
'href' => '',
'thumb' => 'http://img12.static.yhbimg.com/goodsimg/2015/11/06/08/02107c4a7aed6d189584116c6f1fa7ec03.jpg?imageMogr2/thumbnail/60x60/extent/60x60/background/d2hpdGU=/position/center/quality/90',
'name' => 'MACROPUS PU简约系列双肩包',
'question' => '170, 65应该穿多大号',
'reply' => '您的问题太多,不想回答。',
'consultTime' => '2015-12-01 22:08:19'
),
array(
'href' => '',
'thumb' => 'http://img12.static.yhbimg.com/goodsimg/2015/11/06/08/02107c4a7aed6d189584116c6f1fa7ec03.jpg?imageMogr2/thumbnail/60x60/extent/60x60/background/d2hpdGU=/position/center/quality/90',
'name' => 'MACROPUS PU简约系列双肩包',
'question' => '170, 65应该穿多大号',
'reply' => '您的问题太多,不想回答。',
'consultTime' => '2015-12-01 22:08:19'
),
array(
'href' => '',
'thumb' => 'http://img12.static.yhbimg.com/goodsimg/2015/11/06/08/02107c4a7aed6d189584116c6f1fa7ec03.jpg?imageMogr2/thumbnail/60x60/extent/60x60/background/d2hpdGU=/position/center/quality/90',
'name' => 'MACROPUS PU简约系列双肩包',
'question' => '170, 65应该穿多大号',
'reply' => '您的问题太多,不想回答。',
'consultTime' => '2015-12-01 22:08:19'
)
),
'pager' => array(
'hasCheckAll' => true,
'count' => 24,
'curPage' => 1,
'totalPages' => 4,
'pagerHtml' => '<a href="?page=2&amp;type=3"><span class="iconfont">&#xe634;</span>上一页</a><a href="?page=1&amp;type=3">1</a><a class="cur" href="?page=2&amp;type=3">2</a><a href="?page=3&amp;type=3">3</a><a href="?page=2&amp;type=3">下一页<span class="iconfont">&#xe601;</span></a>'
)
);
$this->_view->display('consult', array('homeConsultPage' => false, 'consult' => $data));
}
public function complaintsAction()
{
$data = array(
'path' => array(
array(
'href' => 'www.yohobuy.com',
'name' => 'YOHO!有货首页'
),
array(
'href' => 'www.yohobuy.com/home',
'name' => '个人中心'
),
array(
'name' => '订单中心'
)
),
'userThumb' => 'http://img10.static.yhbimg.com/headimg/2013/11/28/09/01cae078abe5fe320c88cdf4c220212688.gif?imageView/2/w/100/h/100',
'homeNav' => array(
array(
'title' => '交易管理',
'subNav' => array(
array(
'name' => '我的订单',
'href' => '/'
),
array(
'name' => '我的收藏',
'href' => '/'
),
array(
'name' => '我的YOHO币',
'href' => '/'
),
array(
'name' => '我的红包',
'href' => '/'
),
array(
'name' => '我的优惠券',
'href' => '/'
),
array(
'name' => '我的VIP',
'href' => '/'
)
)
),
array(
'title' => '服务中心',
'subNav' => array(
array(
'name' => '我的退/换货',
'href' => '/'
),
array(
'name' => '我的咨询',
'href' => '/',
'active' => true
),
array(
'name' => '我的评论',
'href' => '/'
),
array(
'name' => '我的投诉',
'href' => '/'
),
array(
'name' => '我的信息',
'href' => '/'
),
array(
'name' => '在线客服',
'href' => '/'
)
)
)
),
'complaints' => array(
'empty' => '您尚未投诉任何内容'
),
'pager' => array(
'hasCheckAll' => true,
'count' => 24,
'curPage' => 1,
'totalPages' => 4,
'pagerHtml' => '<a href="?page=2&amp;type=3"><span class="iconfont">&#xe634;</span>上一页</a><a href="?page=1&amp;type=3">1</a><a class="cur" href="?page=2&amp;type=3">2</a><a href="?page=3&amp;type=3">3</a><a href="?page=2&amp;type=3">下一页<span class="iconfont">&#xe601;</span></a>'
)
);
$this->_view->display('complaints', array('homeComplaintsPage' => false, 'complaints' => $data));
}
/**
* 个人中心-我的评论
*/
public function commentAction()
{
$data = array(
'path' => array(
array(
'href' => 'www.yohobuy.com',
'name' => 'YOHO!有货首页'
),
array(
'href' => 'www.yohobuy.com/home',
'name' => '个人中心'
),
array(
'name' => '订单中心'
)
),
'userThumb' => 'http://img10.static.yhbimg.com/headimg/2013/11/28/09/01cae078abe5fe320c88cdf4c220212688.gif?imageView/2/w/100/h/100',
'homeNav' => array(
array(
'title' => '服务中心',
'subNav' => array(
array(
'name' => '我的退/换货',
'href' => '/'
),
array(
'name' => '我的咨询',
'href' => '/'
),
array(
'name' => '我的评论',
'href' => '/',
'active' => true
),
array(
'name' => '我的投诉',
'href' => '/'
),
array(
'name' => '我的信息',
'href' => '/'
),
array(
'name' => '在线客服',
'href' => '/'
)
)
)
),
'comment' => array(
'isComment' => true, // 未评论
'goodsNum' => '18', // 已/未评论商品数量
'orders' => array(
array(
'orderNum' => '1511731933',
'orderTime' => '2015-12-01 22:08:19',
'goods' => array(
array(
'href' => '',
'thumb' => 'http://img13.static.yhbimg.com/goodsimg/2016/01/12/02/025e869a41f00e6316b5e7daaec39c14f4.jpg?imageMogr2/thumbnail/100x100/extent/100x100/background/d2hpdGU=/position/center/quality/90',
'name' => 'VEIL OG Logo 《World Chaos》 Black Snapback 棒球帽',
'remark' => '21222131212'
),
array(
'href' => '',
'thumb' => 'http://img13.static.yhbimg.com/goodsimg/2016/01/12/02/025e869a41f00e6316b5e7daaec39c14f4.jpg?imageMogr2/thumbnail/100x100/extent/100x100/background/d2hpdGU=/position/center/quality/90',
'name' => 'VEIL OG Logo 《World Chaos》 Black Snapback 棒球帽'
)
)
),
array(
'orderNum' => '1511731933',
'orderTime' => '2015-12-01 22:08:19',
'goods' => array(
array(
'href' => '',
'thumb' => 'http://img13.static.yhbimg.com/goodsimg/2016/01/12/02/025e869a41f00e6316b5e7daaec39c14f4.jpg?imageMogr2/thumbnail/100x100/extent/100x100/background/d2hpdGU=/position/center/quality/90',
'name' => 'VEIL OG Logo 《World Chaos》 Black Snapback 棒球帽',
'remark' => '21222131212'
),
array(
'href' => '',
'thumb' => 'http://img13.static.yhbimg.com/goodsimg/2016/01/12/02/025e869a41f00e6316b5e7daaec39c14f4.jpg?imageMogr2/thumbnail/100x100/extent/100x100/background/d2hpdGU=/position/center/quality/90',
'name' => 'VEIL OG Logo 《World Chaos》 Black Snapback 棒球帽'
)
)
)
)
),
'pager' => array(
'hasCheckAll' => false,
'count' => 24,
'curPage' => 1,
'totalPages' => 4,
'pagerHtml' => '<a href="?page=2&amp;type=3"><span class="iconfont">&#xe634;</span>上一页</a><a href="?page=1&amp;type=3">1</a><a class="cur" href="?page=2&amp;type=3">2</a><a href="?page=3&amp;type=3">3</a><a href="?page=2&amp;type=3">下一页<span class="iconfont">&#xe601;</span></a>'
)
);
$this->_view->display('comment', array('meCommentPage' => true, 'comment' => $data));
}
/**
* 个人中心-退货申请
*/
public function refund2Action()
{
$data = array(
'path' => array(
array(
'href' => 'www.yohobuy.com',
'name' => 'YOHO!有货首页'
),
array(
'href' => 'www.yohobuy.com/home',
'name' => '个人中心'
),
array(
'name' => '订单中心'
)
),
'userThumb' => 'http://img10.static.yhbimg.com/headimg/2013/11/28/09/01cae078abe5fe320c88cdf4c220212688.gif?imageView/2/w/100/h/100',
'homeNav' => array(
array(
'title' => '服务中心',
'subNav' => array(
array(
'name' => '我的退/换货',
'href' => '/'
),
array(
'name' => '我的咨询',
'href' => '/',
'active' => true
),
array(
'name' => '我的评论',
'href' => '/'
),
array(
'name' => '我的投诉',
'href' => '/'
),
array(
'name' => '我的信息',
'href' => '/'
),
array(
'name' => '在线客服',
'href' => '/'
)
)
)
),
'refund' => array(
'tips' => array(
'footwear' => true
),
'goods' => array(
array(
'href' => '',
'thumb' => 'http://img12.static.yhbimg.com/goodsimg/2015/11/06/08/02107c4a7aed6d189584116c6f1fa7ec03.jpg?imageMogr2/thumbnail/60x60/extent/60x60/background/d2hpdGU=/position/center/quality/90',
'name' => 'MACROPUS PU简约系列双肩包',
'color' => '黑色',
'size' => 'F',
'price' => '195.00',
'banMsg' => '已申请退换货!'
),
array(
'href' => '',
'thumb' => 'http://img12.static.yhbimg.com/goodsimg/2015/11/06/08/02107c4a7aed6d189584116c6f1fa7ec03.jpg?imageMogr2/thumbnail/60x60/extent/60x60/background/d2hpdGU=/position/center/quality/90',
'name' => 'MACROPUS PU简约系列双肩包',
'color' => '黑色',
'size' => 'F',
'price' => '195.00'
)
),
'reason' => array(
array(
'id' => 3,
'name' => '不喜欢'
),
array(
'id' => 2,
'name' => '性价比不高'
),
array(
'id' => 11,
'name' => '价格变化'
),
array(
'id' => 4,
'name' => '质量瑕疵'
),
array(
'id' => 1,
'name' => '尺寸不合适'
),
array(
'id' => 7,
'name' => '商品有色差'
),
array(
'id' => 8,
'name' => '图片与实物不符'
),
array(
'id' => 6,
'name' => '发错货'
),
array(
'id' => 5,
'name' => '快递延迟'
)
),
'amount' => '196.00',
'cash' => '196.00',
'yohoCoin' => '0.00',
'coupon' => '0.00',
'returnAmountMode' => array(
array(
'id' => 1,
'name' => '原卡返还'
)
)
),
'pager' => array(
'hasCheckAll' => true,
'count' => 24,
'curPage' => 1,
'totalPages' => 4,
'pagerHtml' => '<a href="?page=2&amp;type=3"><span class="iconfont">&#xe634;</span>上一页</a><a href="?page=1&amp;type=3">1</a><a class="cur" href="?page=2&amp;type=3">2</a><a href="?page=3&amp;type=3">3</a><a href="?page=2&amp;type=3">下一页<span class="iconfont">&#xe601;</span></a>'
)
);
$this->_view->display('returns-apply', array('meReturnsPage' => true, 'returns' => $data));
}
/**
* 个人中心-换货申请
*/
public function exchange2Action()
{
$data = array(
'path' => array(
array(
'href' => 'www.yohobuy.com',
'name' => 'YOHO!有货首页'
),
array(
'href' => 'www.yohobuy.com/home',
'name' => '个人中心'
),
array(
'name' => '订单中心'
)
),
'userThumb' => 'http://img10.static.yhbimg.com/headimg/2013/11/28/09/01cae078abe5fe320c88cdf4c220212688.gif?imageView/2/w/100/h/100',
'homeNav' => array(
array(
'title' => '服务中心',
'subNav' => array(
array(
'name' => '我的退/换货',
'href' => '/'
),
array(
'name' => '我的咨询',
'href' => '/',
'active' => true
),
array(
'name' => '我的评论',
'href' => '/'
),
array(
'name' => '我的投诉',
'href' => '/'
),
array(
'name' => '我的信息',
'href' => '/'
),
array(
'name' => '在线客服',
'href' => '/'
)
)
)
),
'exchange' => array(
'goods' => array(
array(
'href' => '',
'thumb' => 'http://img12.static.yhbimg.com/goodsimg/2015/11/06/08/02107c4a7aed6d189584116c6f1fa7ec03.jpg?imageMogr2/thumbnail/60x60/extent/60x60/background/d2hpdGU=/position/center/quality/90',
'name' => 'MACROPUS PU简约系列双肩包',
'color' => '黑色',
'size' => 'F'
),
array(
'href' => '',
'thumb' => 'http://img12.static.yhbimg.com/goodsimg/2015/11/06/08/02107c4a7aed6d189584116c6f1fa7ec03.jpg?imageMogr2/thumbnail/60x60/extent/60x60/background/d2hpdGU=/position/center/quality/90',
'name' => 'MACROPUS PU简约系列双肩包',
'color' => '黑色',
'size' => 'F',
'colorList' => array(
'446333' => '黑色'
),
'sizeList' => array(
'231432' => 'A',
'542122' => 'B',
'874521' => 'C',
'435452' => 'F'
)
)
),
'reason' => array(
array(
'id' => 3,
'name' => '不喜欢'
),
array(
'id' => 2,
'name' => '性价比不高'
),
array(
'id' => 11,
'name' => '价格变化'
),
array(
'id' => 4,
'name' => '质量瑕疵'
),
array(
'id' => 1,
'name' => '尺寸不合适'
),
array(
'id' => 7,
'name' => '商品有色差'
),
array(
'id' => 8,
'name' => '图片与实物不符'
),
array(
'id' => 6,
'name' => '发错货'
),
array(
'id' => 5,
'name' => '快递延迟'
)
),
'name' => '杨延青',
'province' => '32',
'city' => '3201',
'area' => '320105',
'address' => '国家广告产业园5栋16楼',
'phone' => '18752098068',
'postcode' => ''
),
'pager' => array(
'hasCheckAll' => true,
'count' => 24,
'curPage' => 1,
'totalPages' => 4,
'pagerHtml' => '<a href="?page=2&amp;type=3"><span class="iconfont">&#xe634;</span>上一页</a><a href="?page=1&amp;type=3">1</a><a class="cur" href="?page=2&amp;type=3">2</a><a href="?page=3&amp;type=3">3</a><a href="?page=2&amp;type=3">下一页<span class="iconfont">&#xe601;</span></a>'
)
);
$this->_view->display('returns-apply', array('meReturnsPage' => true, 'returns' => $data));
}
/**
* 个人中心-我的信息
*/
public function messageAction()
{
$data = array(
'path' => array(
array(
'href' => 'www.yohobuy.com',
'name' => 'YOHO!有货首页'
),
array(
'href' => 'www.yohobuy.com/home',
'name' => '个人中心'
),
array(
'name' => '订单中心'
)
),
'userThumb' => 'http://img10.static.yhbimg.com/headimg/2013/11/28/09/01cae078abe5fe320c88cdf4c220212688.gif?imageView/2/w/100/h/100',
'homeNav' => array(
array(
'title' => '服务中心',
'subNav' => array(
array(
'name' => '我的退/换货',
'href' => '/'
),
array(
'name' => '我的咨询',
'href' => '/',
'active' => true
),
array(
'name' => '我的评论',
'href' => '/'
),
array(
'name' => '我的投诉',
'href' => '/'
),
array(
'name' => '我的信息',
'href' => '/'
),
array(
'name' => '在线客服',
'href' => '/'
)
)
)
),
'messages' => array(
array(
'href' => '#',
'sender' => 'YOHO!有货官方消息',
'title' => '您有一张优惠券即将过期',
'time' => '2016-02-24 08:16:09',
'id' => '3123'
),
array(
'href' => '#',
'sender' => 'YOHO!有货官方消息',
'title' => '您有一张优惠券即将过期',
'time' => '2016-02-24 08:16:09',
'id' => '3123'
),
array(
'href' => '#',
'sender' => 'YOHO!有货官方消息',
'title' => '您有一张优惠券即将过期',
'time' => '2016-02-24 08:16:09',
'id' => '3123'
),
array(
'href' => '#',
'sender' => 'YOHO!有货官方消息',
'title' => '您有一张优惠券即将过期',
'time' => '2016-02-24 08:16:09',
'id' => '3123'
)
),
'pager' => array(
'hasCheckAll' => false,
'count' => 24,
'curPage' => 1,
'totalPages' => 4,
'pagerHtml' => '<a href="?page=2&amp;type=3"><span class="iconfont">&#xe634;</span>上一页</a><a href="?page=1&amp;type=3">1</a><a class="cur" href="?page=2&amp;type=3">2</a><a href="?page=3&amp;type=3">3</a><a href="?page=2&amp;type=3">下一页<span class="iconfont">&#xe601;</span></a>'
)
);
$this->_view->display('message', array('meMessagePage' => true, 'message' => $data));
}
/**
* 个人中心-账号安全
*/
public function accountAction()
{
//判断是否登录
$this->auditJumpLogin();
//头部导航
$channel = Helpers::getChannelNameByCookie();
$this->setWebNavHeader($channel);
//面包屑-左侧导航
$path = UserModel::getCenterCrumb('账号安全');
$leftNav = UserModel::getCenterLeftNav('账号安全');
$data = array(
'path' => $path,
'homeNav' => $leftNav,
'userThumb' => 'http://img10.static.yhbimg.com/headimg/2013/11/28/09/01cae078abe5fe320c88cdf4c220212688.gif?imageView/2/w/100/h/100',
'allAccounts' => array(
array(
'icon' => 'ok',
'type' => '登录密码',
'tip' => '互联网帐号存在被盗风险,建议您定期更改密码以保护帐号安全。',
'red' => 'true',
'url' => '/home/userpwd',
'isValid' => true
),
array(
'icon' => 'warning',
'type' => '邮箱验证',
'tip' => '验证后,可用于找回登录密码。',
'url' => '/home/email'
),
array(
'icon' => 'warning',
'type' => '手机验证',
'tip' => '验证后,可用于找回登录密码。',
'url' => '/home/mobile'
)
)
);
$this->_view->display('account', array('meAccountPage' => true, 'account' => $data));
}
/**
* 个人中心-修改密码身份验证
*/
public function userpwdAction()
{
//判断是否登录
$this->auditJumpLogin();
//头部导航
$channel = Helpers::getChannelNameByCookie();
$this->setWebNavHeader($channel);
//面包屑-左侧导航
$path = UserModel::getCenterCrumb('账号安全');
$leftNav = UserModel::getCenterLeftNav('账号安全');
//用户信息
//判断身份验证状态
$checkStatus = $this ->auditCheckStatus('');
$data = array(
'path' => $path,
'homeNav' => $leftNav,
'subTitle' => '修改密码',
'enTitle' => 'CHANGE PASSWORD',
'progressCur' => 'progress1',
'progress' => array(
array(
'iscur' => true,
'progressName' => '1.验证身份'
),
array(
'iscur' => false,
'progressName' => '2.修改登录密码'
),
array(
'iscur' => false,
'progressName' => '3.完成'
)
),
'returnInfo' => false,
'sendEmail' => array(
'emailInfo' => '92****65@qq.com',
'emailUrl' => 'http://mail.qq.com'
),
'formInfo' => array(
'formAction' => '/home/userpwd/newpwd',
'ischeckEmail' => $checkStatus['ischeckEmail'],
'formData' => array(
$checkStatus['formData']
),
'mobileCode' => $checkStatus['ischeckMobile']
)
);
$this->_view->display('userpwd', array(
'userpwd' => $data,
'meValidatePage' => true
));
}
/**
* 个人中心-邮箱验证身份
*/
public function emailAction()
{
//判断是否登录
$this->auditJumpLogin();
//头部导航
$channel = Helpers::getChannelNameByCookie();
$this->setWebNavHeader($channel);
//面包屑-左侧导航
$path = UserModel::getCenterCrumb('账号安全');
$leftNav = UserModel::getCenterLeftNav('账号安全');
//用户信息
//判断身份验证状态
$checkStatus = $this ->auditCheckStatus('email');
$data = array(
'path' => $path,
'homeNav' => $leftNav,
'subTitle' => $checkStatus['subTitle'],
'enTitle' => $checkStatus['enTitle'],
'progressCur' => 'progress1',
'progress' => array(
array(
'iscur' => true,
'progressName' => '1.验证身份'
),
array(
'iscur' => false,
'progressName' => '2.'.$checkStatus['subTitle']
),
array(
'iscur' => false,
'progressName' => '3.完成'
)
),
'returnInfo' => false,
'sendEmail' => array(
'emailInfo' => '92****65@qq.com',
'emailUrl' => 'http://mail.qq.com'
),
'formInfo' => array(
'formAction' => '/home/email/mail',
'ischeckEmail' => $checkStatus['ischeckEmail'],
'formData' => array(
$checkStatus['formData']
),
'mobileCode' => $checkStatus['ischeckMobile']
)
);
$this->_view->display('email', array(
'email' => $data,
'meValidatePage' => true
));
}
/**
* 个人中心-手机验证身份
*/
public function mobileAction()
{
//判断是否登录
$this->auditJumpLogin();
//头部导航
$channel = Helpers::getChannelNameByCookie();
$this->setWebNavHeader($channel);
//面包屑-左侧导航
$path = UserModel::getCenterCrumb('账号安全');
$leftNav = UserModel::getCenterLeftNav('账号安全');
//用户信息
//判断身份验证状态
$checkStatus = $this ->auditCheckStatus('mobile');
$data = array(
'path' => $path,
'homeNav' => $leftNav,
'subTitle' => $checkStatus['subTitle'],
'enTitle' => $checkStatus['enTitle'],
'progressCur' => 'progress1',
'progress' => array(
array(
'iscur' => true,
'progressName' => '1.验证身份'
),
array(
'iscur' => false,
'progressName' => '2.'.$checkStatus['subTitle']
),
array(
'iscur' => false,
'progressName' => '3.完成'
)
),
'returnInfo' => false,
'sendEmail' => array(
'emailInfo' => '92****65@qq.com',
'emailUrl' => 'http://mail.qq.com'
),
'formInfo' => array(
'formAction' => '/home/mobile/new',
'ischeckEmail' => $checkStatus['ischeckEmail'],
'formData' => array(
$checkStatus['formData']
),
'mobileCode' => $checkStatus['ischeckMobile']
)
);
$this->_view->display('mobile', array(
'mobile' => $data,
'meValidatePage' => true
));
}
/**
* 个人中心-判断身份验证状态
*/
function auditCheckStatus($checkType)
{
$ischeckMobile = false;
//是否验证过手机号码
$ischeckEmail = false;
//是否验证过邮箱
$firstCheck = 'mobile';
//第一个校验的是手机还是邮箱的标记
if ($checkType === 'mobile') {
$subTitle = $ischeckMobile ? '修改手机' : '验证手机';
$enTitle = $ischeckMobile ? 'CHANGE TELEPHONE' : 'VERIFICATION TELEPHONE';
} else {
$subTitle = $ischeckEmail ? '修改邮箱' : '验证邮箱';
$enTitle = $ischeckEmail ? 'CHANGE EMAIL' : 'VERIFICATION EMAIL';
}
$formData1 = array(
'inputTxt' => '请输入登录密码',
'key' => 'password',
'type' => 'password',
'name' => 'oldpassword'
);
$formData2 = array(
'inputTxt' => '已验证的手机号',
'key' => 'mobilevalue',
'type' => 'text',
'name' => 'mobile'
);
$formData3 = array(
'inputTxt' => '已验证邮箱',
'emailInfo' => '92****65@qq.com'
);
if ($ischeckMobile && !$ischeckEmail) {
$formData = $formData2;
} else if ($ischeckEmail && !$ischeckMobile) {
$formData = $formData3;
} else if ($ischeckMobile && $ischeckEmail) {
if ($firstCheck === 'mobile') {
$formData = $formData2;
} else {
$formData = $formData3;
}
} else {
$formData = $formData1;
}
$data = array(
'ischeckMobile' => $ischeckMobile,
'ischeckEmail' => $ischeckEmail,
'subTitle' => $subTitle,
'enTitle' => $enTitle,
'formData' => $formData
);
return $data;
}
/**
* 个人中心-兑换礼品卡编辑
*/
public function giftAction()
{
//判断是否登录
$this->auditJumpLogin();
//头部导航
$channel = Helpers::getChannelNameByCookie();
$this->setWebNavHeader($channel);
//面包屑-左侧导航
$path = UserModel::getCenterCrumb('兑换礼品卡');
$leftNav = UserModel::getCenterLeftNav('兑换礼品卡');
//用户信息
$data = array(
'path' => $path,
'homeNav' => $leftNav,
'formAction' => '/home/gift/exchange'
);
$this->_view->display('gift', array(
'gift' => $data,
'meGiftPage' => true
));
}
}
<?php
use Action\AbstractAction;
/**
* 个人中心
*/
class MeController extends AbstractAction
{
public function indexAction()
{
$data = array(
'path' => array(
array(
'href' => 'www.yohobuy.com',
'name' => 'YOHO!有货首页'
),
array(
'href' => 'www.yohobuy.com/home',
'name' => '个人中心'
),
array(
'name' => '订单中心'
)
),
'userThumb' => 'http://img10.static.yhbimg.com/headimg/2013/11/28/09/01cae078abe5fe320c88cdf4c220212688.gif?imageView/2/w/100/h/100',
'homeNav' => array(
array(
'title' => '交易管理',
'subNav' => array(
array(
'name' => '我的订单',
'href' => '/',
'active' => true
),
array(
'name' => '我的收藏',
'href' => '/'
),
array(
'name' => '我的YOHO币',
'href' => '/'
),
array(
'name' => '我的红包',
'href' => '/'
),
array(
'name' => '我的优惠券',
'href' => '/'
),
array(
'name' => '我的VIP',
'href' => '/'
)
)
)
),
'content' => array(
array(
'messages' => array(
array(
'href' => '',
'name' => '待处理订单',
'count' => '0'
),
array(
'href' => '',
'name' => '未读消息',
'count' => '0'
),
array(
'href' => '',
'name' => '待评论商品',
'count' => '18'
)
)
),
array(
'latestOrders' => array(
'more' => '',
'orders' => array(
array(
'orderNum' => '1511731933',
'orderTime' => '2015-12-01 22:08:19',
'goods' => array(
array(
'href' => '',
'thumb' => 'http://img12.static.yhbimg.com/goodsimg/2015/11/06/08/02107c4a7aed6d189584116c6f1fa7ec03.jpg?imageMogr2/thumbnail/60x60/extent/60x60/background/d2hpdGU=/position/center/quality/90',
'name' => 'MACROPUS PU简约系列双肩包',
'color' => '黑色',
'size' => 'F',
'price' => '80.00',
'count' => '1',
'pay' => '80',
'fregit' => '0',
'complete' => true,
'operation' => array(
array(
'href' => '',
'name' => '查看订单'
),
array(
'href' => '',
'name' => '申请换货'
)
)
)
)
)
)
),
'favBrand' => array(
'more' => '',
'brands' => array(
array(
'href' => '',
'logo' => 'http://img11.static.yhbimg.com/brandLogo/2015/11/30/14/013f99ea6cff1f718e4fc765b9eb62d03a.jpg?imageMogr2/thumbnail/80x50/extent/80x50/background/d2hpdGU=/position/center/quality/90',
'name' => 'PHANTACi'
),
array(
'href' => '',
'logo' => 'http://img11.static.yhbimg.com/brandLogo/2015/11/30/11/0103330bef027d94f57037168dc1004de6.jpg?imageMogr2/thumbnail/80x50/extent/80x50/background/d2hpdGU=/position/center/quality/90',
'name' => '熊家优品'
),
array(
'href' => '',
'logo' => 'http://img10.static.yhbimg.com/brandLogo/2015/12/03/16/0105644fe3dcdc081327a37b005959acbc.jpg?imageMogr2/thumbnail/80x50/extent/80x50/background/d2hpdGU=/position/center/quality/90',
'name' => '金银帝国'
),
array(
'href' => '',
'logo' => 'http://img13.static.yhbimg.com/brandLogo/2015/12/03/14/02c3768a7f14ebeb219593f9cd0b20090a.jpg?imageMogr2/thumbnail/80x50/extent/80x50/background/d2hpdGU=/position/center/quality/90',
'name' => 'WONDER HOME'
)
)
),
'newArrival' => array(
array(
'href' => '',
'thumb' => 'http://img11.static.yhbimg.com/goodsimg/2015/12/13/12/01ead78b5d9e63c35feca149c74432dc70.jpg?imageMogr2/thumbnail/100x100/extent/100x100/background/d2hpdGU=/position/center/quality/90',
'name' => 'Genanx 嘻哈风印花防风棉衣黑色',
'price' => '498'
),
array(
'href' => '',
'thumb' => 'http://img11.static.yhbimg.com/goodsimg/2015/12/13/12/01ead78b5d9e63c35feca149c74432dc70.jpg?imageMogr2/thumbnail/100x100/extent/100x100/background/d2hpdGU=/position/center/quality/90',
'name' => 'Genanx 大口袋字母印花棉衣黑色',
'price' => '568'
),
array(
'href' => '',
'thumb' => 'http://img11.static.yhbimg.com/goodsimg/2016/02/16/09/01502668c17603b6675bcbd8c9d6236f00.jpg?imageMogr2/thumbnail/100x100/extent/100x100/background/d2hpdGU=/position/center/quality/90',
'name' => 'Genanx 大口袋字母印花棉衣黑色',
'price' => '568'
),
array(
'href' => '',
'thumb' => 'http://img11.static.yhbimg.com/goodsimg/2016/02/16/09/01490a5140ad00fff65983b4ca8501b719.jpg?imageMogr2/thumbnail/100x100/extent/100x100/background/d2hpdGU=/position/center/quality/90',
'name' => 'Genanx 大口袋字母印花棉衣黑色',
'price' => '568'
),
array(
'href' => '',
'thumb' => 'http://img11.static.yhbimg.com/goodsimg/2016/02/16/09/01490a5140ad00fff65983b4ca8501b719.jpg?imageMogr2/thumbnail/100x100/extent/100x100/background/d2hpdGU=/position/center/quality/90',
'name' => 'Genanx 植物贴布绣圆领卫衣白色 ',
'price' => '568'
),
array(
'href' => '',
'thumb' => 'http://img13.static.yhbimg.com/goodsimg/2016/02/16/09/02476e9bb75f64545c1438286a94e8d95e.jpg?imageMogr2/thumbnail/100x100/extent/100x100/background/d2hpdGU=/position/center/quality/90',
'name' => 'Genanx 大口袋字母印花棉衣黑色',
'price' => '568'
),
array(
'href' => '',
'thumb' => 'http://img12.static.yhbimg.com/goodsimg/2016/02/16/09/0287e5fdaafe529a6cc7f53a83ecd4d513.jpg?imageMogr2/thumbnail/100x100/extent/100x100/background/d2hpdGU=/position/center/quality/90',
'name' => 'Genanx 大口袋字母印花棉衣黑色',
'price' => '568'
),
array(
'href' => '',
'thumb' => 'http://img11.static.yhbimg.com/goodsimg/2015/12/13/12/01ead78b5d9e63c35feca149c74432dc70.jpg?imageMogr2/thumbnail/100x100/extent/100x100/background/d2hpdGU=/position/center/quality/90',
'name' => 'Genanx 大口袋字母印花棉衣黑色',
'price' => '568'
)
),
'banner' => array(
'href' => '',
'img' => 'http://img02.static.yohobuy.com/adpic/2015/07/23/15/020d2a20f6693cae4b572caf8e1fd7c37e.jpg'
)
)
),
'helpUsUrl' => ''
);
$this->_view->display('index', array('meIndexPage' => true, 'me' => $data));
}
}
\ No newline at end of file