Authored by ccbikai

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

@@ -10,4 +10,8 @@ npm-debug.log @@ -10,4 +10,8 @@ npm-debug.log
10 composer.lock 10 composer.lock
11 vendor/ 11 vendor/
12 .jscsrc 12 .jscsrc
13 -.jshintrc  
  13 +.jshintrc
  14 +.tags
  15 +.tags_sorted_by_file
  16 +yohobuyP.sublime-project
  17 +yohobuyP.sublime-workspace
@@ -767,4 +767,111 @@ @@ -767,4 +767,111 @@
767 price: '', 767 price: '',
768 discount: '' 768 discount: ''
769 } 769 }
  770 + }
  771 +
  772 +
  773 +## 购物车
  774 +
  775 + {
  776 + shoppingCart: {
  777 + cartNav: true, //显示预售和普通switch导航
  778 + commonGoodsCount: 2,
  779 + presellGoodsCount: 2, //普通商品和预售商品数目,显示在导航中
  780 + showLoginInfo: true, //是否显示登录提示
  781 + commonCart: {
  782 + goods: [
  783 + //购物车商品(见下),
  784 + ...
  785 + ],
  786 + freebieOrAdvanceBuy: true, //是否显示赠品和加价购
  787 + freebie: {
  788 + url: '',
  789 + count: 2
  790 + },
  791 + advanceBuy: {
  792 + url: '',
  793 + count: 1
  794 + },
  795 + price: 322,
  796 + activityPrice: 223, //活动价
  797 + count: 8,
  798 + sumPrice: 400
  799 + },
  800 + preSellCart: {
  801 + //同普通购物车
  802 + ...
  803 + }
  804 + }
  805 + }
  806 +
  807 +### 选择尺码、数目、颜色面板
  808 +
  809 + {
  810 + thumb: '',
  811 + name: '',
  812 + price: '',
  813 + salePrice: '',
  814 + colors: [
  815 + {
  816 + id: 1,
  817 + chosed: true,
  818 + name: '黄色'
  819 + },
  820 + ...
  821 + ],
  822 + sizes: [
  823 + {
  824 + id: 2,
  825 + chosed: true,
  826 + name: 'X'
  827 + },
  828 + ...
  829 + ],
  830 + num: 2
  831 + }
  832 +
  833 +### 购物车商品
  834 +
  835 + {
  836 + id: 1,
  837 + thumb: '',
  838 + name: '',
  839 + color: '黄色',
  840 + size: 'L',
  841 + appearDate: '12月', //上市期
  842 + price: 200,
  843 + count: 2,
  844 + soldOut: true, //售罄
  845 + lowStocks: true, //库存不足
  846 + }
  847 +
  848 +### 赠品和加价购
  849 +
  850 + {
  851 + shoppingCart: {
  852 + gift: [
  853 + //赠品(见下)
  854 + ],
  855 + //or
  856 + advance: [
  857 + {
  858 + title: '',
  859 + goods: [
  860 + //加价购商品(见下)
  861 + ]
  862 + }
  863 + ]
  864 + }
  865 + }
  866 +
  867 +### 赠品和加价购商品
  868 +
  869 + {
  870 + id: 1,
  871 + thumb: '',
  872 + name: '',
  873 + color: '黄色',
  874 + size: 'L', //颜色和尺寸需要显示就传,不显示不传
  875 + price: 562,
  876 + count: 3
770 } 877 }
@@ -354,6 +354,11 @@ class AbstractAction extends Controller_Abstract @@ -354,6 +354,11 @@ class AbstractAction extends Controller_Abstract
354 { 354 {
355 $header = array(); 355 $header = array();
356 356
  357 + // 判断是否是微信浏览器浏览
  358 + if (strpos($_SERVER['HTTP_USER_AGENT'], 'MicroMessenger') === false) {
  359 + $header['isShow'] = true;
  360 + }
  361 +
357 if ($backUrl) { 362 if ($backUrl) {
358 $header['navBack'] = true; 363 $header['navBack'] = true;
359 } 364 }
@@ -63,13 +63,13 @@ function hideSideBar() { @@ -63,13 +63,13 @@ function hideSideBar() {
63 } 63 }
64 } 64 }
65 65
66 -$('.overlay').on('touchend', function(e) { 66 +$('.overlay').on('touchstart', function(e) {
67 hideSideBar(); 67 hideSideBar();
68 return false; 68 return false;
69 }); 69 });
70 70
71 //点击一级导航,弹出二级导航 71 //点击一级导航,弹出二级导航
72 -$sideNav.on('touchend', 'li', function (e) { 72 +$sideNav.on('touchstart', 'li', function (e) {
73 if ($(this).find('.sub-nav').size() > 0) { 73 if ($(this).find('.sub-nav').size() > 0) {
74 $('.sub-nav').removeClass('show'); 74 $('.sub-nav').removeClass('show');
75 $(this).find('.sub-nav').addClass('show'); 75 $(this).find('.sub-nav').addClass('show');
@@ -83,12 +83,12 @@ $sideNav.on('touchend', 'li', function (e) { @@ -83,12 +83,12 @@ $sideNav.on('touchend', 'li', function (e) {
83 83
84 //返回一级导航,收起二级导航 84 //返回一级导航,收起二级导航
85 $subNav.each(function () { 85 $subNav.each(function () {
86 - $(this).find('li').eq(0).on('touchend', function (e) { 86 + $(this).find('li').eq(0).on('touchstart', function (e) {
87 $('.sub-nav').removeClass('show'); 87 $('.sub-nav').removeClass('show');
88 e.stopPropagation(); 88 e.stopPropagation();
89 return false; 89 return false;
90 }); 90 });
91 -}).on('touchend', function(e) { 91 +}).on('touchstart', function(e) {
92 if (e.currentTarget !== e.target) { 92 if (e.currentTarget !== e.target) {
93 $subNav.find('li').removeClass('current'); 93 $subNav.find('li').removeClass('current');
94 } 94 }
@@ -4,14 +4,18 @@ @@ -4,14 +4,18 @@
4 * @date: 2015/10/20 4 * @date: 2015/10/20
5 */ 5 */
6 6
7 -var $ = require('jquery'); 7 +var $ = require('jquery'),
  8 + Hammer = require('yoho.hammer');
8 9
9 var $cartContent = $('.cart-content'); 10 var $cartContent = $('.cart-content');
10 11
  12 +var navHammer;
  13 +
11 require('./good'); 14 require('./good');
12 15
13 -$('.cart-nav').delegate('li', 'tap', function() {  
14 - var $this = $(this); 16 +navHammer = new Hammer(document.getElementsByClassName('cart-nav')[0]);
  17 +navHammer.on('tap', function(e) {
  18 + var $this = $(e.target).closest('li');
15 19
16 if ($this.hasClass('active')) { 20 if ($this.hasClass('active')) {
17 return; 21 return;
@@ -5,8 +5,8 @@ @@ -5,8 +5,8 @@
5 * @date: 2015/10/21 5 * @date: 2015/10/21
6 */ 6 */
7 7
8 -var $ = require('jquery');  
9 -var Handlebars = require('yoho.handlebars'); 8 +var $ = require('jquery'),
  9 + Handlebars = require('yoho.handlebars');
10 10
11 var $page = $('.yoho-page'); 11 var $page = $('.yoho-page');
12 12
@@ -37,7 +37,7 @@ function remove() { @@ -37,7 +37,7 @@ function remove() {
37 $('.chose-panel').remove(); 37 $('.chose-panel').remove();
38 } 38 }
39 39
40 -$('.yoho-page').delegate('.chose-panel', 'tap', function(e) { 40 +$('.yoho-page').on('touchstart', '.chose-panel', function(e) {
41 var $cur = $(e.target); 41 var $cur = $(e.target);
42 42
43 if ($cur.closest('.main').length > 0) { 43 if ($cur.closest('.main').length > 0) {
@@ -46,10 +46,10 @@ $('.yoho-page').delegate('.chose-panel', 'tap', function(e) { @@ -46,10 +46,10 @@ $('.yoho-page').delegate('.chose-panel', 'tap', function(e) {
46 46
47 //点击蒙版消失 47 //点击蒙版消失
48 remove(); 48 remove();
49 -}).delegate('#chose-btn-sure', 'tap', function() { 49 +}).on('touchstart', '#chose-btn-sure', function() {
50 50
51 //确定 51 //确定
52 -}).delegate('.block', 'tap', function() { 52 +}).on('touchstart', '.block', function() {
53 53
54 //尺寸颜色点选 54 //尺寸颜色点选
55 var $this = $(this); 55 var $this = $(this);
@@ -60,7 +60,7 @@ $('.yoho-page').delegate('.chose-panel', 'tap', function(e) { @@ -60,7 +60,7 @@ $('.yoho-page').delegate('.chose-panel', 'tap', function(e) {
60 60
61 $this.siblings('.chosed').removeClass('chosed'); 61 $this.siblings('.chosed').removeClass('chosed');
62 $this.addClass('chosed'); 62 $this.addClass('chosed');
63 -}).delegate('.btn-minus', 'tap', function() { 63 +}).on('touchstart', '.btn-minus', function() {
64 var num = +$num.val(); 64 var num = +$num.val();
65 65
66 if (num === 1) { 66 if (num === 1) {
@@ -68,7 +68,7 @@ $('.yoho-page').delegate('.chose-panel', 'tap', function(e) { @@ -68,7 +68,7 @@ $('.yoho-page').delegate('.chose-panel', 'tap', function(e) {
68 } 68 }
69 69
70 $num.val(num - 1); 70 $num.val(num - 1);
71 -}).delegate('.btn-plus', 'tap', function() { 71 +}).on('touchstart', '.btn-plus', function() {
72 var num = +$num.val(); 72 var num = +$num.val();
73 73
74 //TODO:库存数验证 74 //TODO:库存数验证
@@ -10,21 +10,16 @@ var $ = require('jquery'), @@ -10,21 +10,16 @@ var $ = require('jquery'),
10 10
11 var chosePanel = require('./chose-panel'); 11 var chosePanel = require('./chose-panel');
12 12
13 -function docTouchEvt(e) {  
14 - var $tar = $(e.target); 13 +var $curDelPanel;
15 14
16 - if ($tar.closest('.opt-panel').length === 0) {  
17 - $('.opt-panel:not(.hide)').addClass('hide'); 15 +//删除面板显示后任何点击行为都将触发隐藏面板
  16 +function docTouchEvt() {
  17 + $curDelPanel && $curDelPanel.addClass('hide');
18 18
19 - //  
20 - $(document).unbind('tap', docTouchEvt);  
21 - } 19 + //
  20 + $(document).off('touchstart', docTouchEvt);
22 } 21 }
23 22
24 -// function unbindDocTouchEvt(e) {  
25 -// $(document).unbind('tap', docTouchEvt);  
26 -// }  
27 -  
28 ellipsis.init(); 23 ellipsis.init();
29 24
30 lazyLoad($('.lazy')); 25 lazyLoad($('.lazy'));
@@ -32,7 +27,7 @@ lazyLoad($('.lazy')); @@ -32,7 +27,7 @@ lazyLoad($('.lazy'));
32 $('.name')[0].mlellipsis(2); 27 $('.name')[0].mlellipsis(2);
33 28
34 //TIP:事件委托在.cart-goods,商品列表的容器统一需要有.cart-goods 29 //TIP:事件委托在.cart-goods,商品列表的容器统一需要有.cart-goods
35 -$('.cart-goods').delegate('.checkbox', 'tap', function() { 30 +$('.cart-goods').on('touchstart', '.checkbox', function() {
36 var $this = $(this); 31 var $this = $(this);
37 32
38 if ($this.hasClass('icon-cb-checked')) { 33 if ($this.hasClass('icon-cb-checked')) {
@@ -40,7 +35,7 @@ $('.cart-goods').delegate('.checkbox', 'tap', function() { @@ -40,7 +35,7 @@ $('.cart-goods').delegate('.checkbox', 'tap', function() {
40 } else { 35 } else {
41 $this.removeClass('icon-checkbox').addClass('icon-cb-checked'); 36 $this.removeClass('icon-checkbox').addClass('icon-cb-checked');
42 } 37 }
43 -}).delegate('.icon-edit', 'tap', function() { 38 +}).on('touchstart', '.icon-edit', function() {
44 var id = $(this).closest('.shopping-cart-good').data('id'); 39 var id = $(this).closest('.shopping-cart-good').data('id');
45 40
46 $.ajax({ 41 $.ajax({
@@ -55,36 +50,36 @@ $('.cart-goods').delegate('.checkbox', 'tap', function() { @@ -55,36 +50,36 @@ $('.cart-goods').delegate('.checkbox', 'tap', function() {
55 } 50 }
56 } 51 }
57 }); 52 });
58 -}).delegate('.icon-del', 'tap', function(e) { 53 +}).on('touchstart', '.icon-del', function(e) {
59 e.stopPropagation(); 54 e.stopPropagation();
60 55
61 - $(this).closest('.shopping-cart-good').children('.opt-panel').removeClass('hide'); 56 + //手动触发docTouchEvt清除因点击到del按钮上而被阻止冒泡到doc上的事件从而清除已打开的删除面板
  57 + docTouchEvt();
  58 +
  59 + $curDelPanel = $(this).closest('.shopping-cart-good').children('.opt-panel').removeClass('hide');
62 60
63 - $(document).bind('tap', docTouchEvt);  
64 -}).delegate('.opt-panel', 'tap', function() { 61 + $(document).on('touchstart', docTouchEvt);
  62 +}).on('touchstart', '.opt-panel', function() {
65 var $this = $(this), 63 var $this = $(this),
66 - id = $this.closest('.shopping-cart-good').data('id'); 64 + id = $this.closest('.shopping-cart-good').data('id'),
  65 + url;
67 66
68 if ($this.closest('.put-in-favorite')) { 67 if ($this.closest('.put-in-favorite')) {
69 68
70 //移入收藏夹 69 //移入收藏夹
71 - $.ajax({  
72 - type: 'POST',  
73 - url: '/shoppingCart/col',  
74 - data: {  
75 - id: id  
76 - }  
77 - }); 70 + url = '/shoppingCart/col';
78 } else { 71 } else {
79 72
80 //删除 73 //删除
81 - $.ajax({  
82 - type: 'POST',  
83 - url: '/shoppingCart/del',  
84 - data: {  
85 - id: id  
86 - }  
87 - }); 74 + url = '/shoppingCart/del';
88 } 75 }
  76 +
  77 + $.ajax({
  78 + type: 'POST',
  79 + url: url,
  80 + data: {
  81 + id: id
  82 + }
  83 + });
89 }); 84 });
90 85
@@ -21,7 +21,7 @@ @@ -21,7 +21,7 @@
21 "yoho.iswiper": "3.0.1", 21 "yoho.iswiper": "3.0.1",
22 "iscroll": "5.1.2", 22 "iscroll": "5.1.2",
23 "import-style": "1.0.0", 23 "import-style": "1.0.0",
24 - "yoho.lazyload": "1.1.0", 24 + "yoho.lazyload": "1.1.2",
25 "yoho.handlebars": "3.0.3", 25 "yoho.handlebars": "3.0.3",
26 "yoho.hammer": "2.0.4" 26 "yoho.hammer": "2.0.4"
27 }, 27 },
1 .brand-page { 1 .brand-page {
2 -  
3 .newbrand-search { 2 .newbrand-search {
4 width: 93.75%; 3 width: 93.75%;
5 height: 60rem / $pxConvertRem; 4 height: 60rem / $pxConvertRem;
1 .yoho-footer { 1 .yoho-footer {
2 font-size: 12px; 2 font-size: 12px;
3 background-color: #fff; 3 background-color: #fff;
  4 + margin-bottom: 2.5rem;
4 5
5 .op-row { 6 .op-row {
6 position: relative; 7 position: relative;
@@ -107,8 +107,9 @@ @@ -107,8 +107,9 @@
107 .opt-panel { 107 .opt-panel {
108 position: absolute; 108 position: absolute;
109 width: 220rem / $pxConvertRem; 109 width: 220rem / $pxConvertRem;
110 - height: 190rem / $pxConvertRem;  
111 right: 0; 110 right: 0;
  111 + top: 0;
  112 + bottom: 0;
112 113
113 color: #fff; 114 color: #fff;
114 115
@@ -8,14 +8,14 @@ @@ -8,14 +8,14 @@
8 padding-bottom: 120rem / $pxConvertRem; 8 padding-bottom: 120rem / $pxConvertRem;
9 9
10 .cart-nav { 10 .cart-nav {
11 - height: 30rem / $pxConvertRem;  
12 color: #c6c6c6; 11 color: #c6c6c6;
13 border-bottom: 1px solid #e0e0e0; 12 border-bottom: 1px solid #e0e0e0;
14 - padding: 30rem / $pxConvertRem 0;  
15 13
16 li { 14 li {
17 float: left; 15 float: left;
18 width: 50%; 16 width: 50%;
  17 + padding: 30rem / $pxConvertRem 0;
  18 + height: 30rem / $pxConvertRem;
19 } 19 }
20 20
21 li.active { 21 li.active {
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 <div class="shopping-cart-page yoho-page"> 2 <div class="shopping-cart-page yoho-page">
3 {{# shoppingCart}} 3 {{# shoppingCart}}
4 {{#if cartNav}} 4 {{#if cartNav}}
5 - <ul class="cart-nav"> 5 + <ul class="cart-nav clearfix">
6 <li class="active"> 6 <li class="active">
7 <span> 7 <span>
8 普通商品({{commonGoodsCount}}) 8 普通商品({{commonGoodsCount}})
  1 +{{> layout/header}}
  2 +<div class="discount-page yoho-page">
  3 + {{# headerBanner}}
  4 + {{> product/banner_swipe_and_single}}
  5 + {{/ headerBanner}}
  6 +
  7 + <ul id="list-nav" class="list-nav clearfix">
  8 + <li class="new active">
  9 + <a href="javascript:void(0);">
  10 + <span class="spanTest">最新</span>
  11 + <span class="iconfont cur">&#xe616;</span>
  12 + </a>
  13 + </li>
  14 + <li class="price">
  15 + <a href="javascript:void(0);">
  16 + <span class="spanTest">价格</span>
  17 + <span class="icon">
  18 + <i class="iconfont up">&#xe615;</i>
  19 + <i class="iconfont down cur">&#xe616;</i>
  20 + </span>
  21 + </a>
  22 + </li>
  23 + <li class="discount">
  24 + <a href="javascript:void(0);">
  25 + <span class="spanTest">折扣</span>
  26 + <span class="icon">
  27 + <i class="iconfont up">&#xe615;</i>
  28 + <i class="iconfont down cur">&#xe616;</i>
  29 + </span>
  30 + </a>
  31 + </li>
  32 + <li class="filter">
  33 + <a href="javascript:void(0);">
  34 + <span class="spanTest">筛选</span>
  35 + <span class="iconfont">&#xe613;</span>
  36 + </a>
  37 + </li>
  38 + </ul>
  39 +
  40 + <div id="goods-container" class="goods-container">
  41 + <div class="new-goods container clearfix">
  42 + {{# goods}}
  43 + {{> good}}
  44 + {{/ goods}}
  45 + </div>
  46 + <div class="price-goods container hide clearfix"></div>
  47 + <div class="discount-goods container hide clearfix"></div>
  48 +
  49 + {{> filter}}
  50 + </div>
  51 +
  52 + {{#if brand}}
  53 + <input id="brand" type="hidden" value={{brand}}>
  54 + {{/if}}
  55 +
  56 + {{#if gender}}
  57 + <input id="gender" type="hidden" value={{gender}}>
  58 + {{/if}}
  59 +
  60 + {{#if sort}}
  61 + <input id="sort" type="hidden" value={{sort}}>
  62 + {{/if}}
  63 +
  64 + {{#if msort}}
  65 + <input id="msort" type="hidden" value={{msort}}>
  66 + {{/if}}
  67 +
  68 + {{#if misort}}
  69 + <input id="misort" type="hidden" value={{misort}}>
  70 + {{/if}}
  71 +
  72 + {{#if color}}
  73 + <input id="color" type="hidden" value={{color}}>
  74 + {{/if}}
  75 +
  76 + {{#if size}}
  77 + <input id="size" type="hidden" value={{size}}>
  78 + {{/if}}
  79 +
  80 + {{#if price}}
  81 + <input id="price" type="hidden" value={{price}}>
  82 + {{/if}}
  83 +
  84 + {{#if p_d}}
  85 + <input id="p_d" type="hidden" value={{p_d}}>
  86 + {{/if}}
  87 +
  88 + {{#if channel}}
  89 + <input id="channel" type="hidden" value={{channel}}>
  90 + {{/if}}
  91 +
  92 + {{#if limit}}
  93 + <input id="limit" type="hidden" value={{limit}}>
  94 + {{/if}}
  95 +
  96 + {{#if page}}
  97 + <input id="page" type="hidden" value={{page}}>
  98 + {{/if}}
  99 +
  100 + {{#if discount}}
  101 + <input id="discount" type="hidden" value={{discount}}>
  102 + {{/if}}
  103 +
  104 + {{> product/suspend-cart}}
  105 +</div>
  106 +{{> layout/footer}}
1 {{#pageHeader}} 1 {{#pageHeader}}
  2 +{{# isShow}}
2 <header class="yoho-header{{#if boys}} boys{{/if}}{{#if girls}} girls{{/if}}{{#if kids}} kids{{/if}}{{#if lifeStyle}} life-style{{/if}}"> 3 <header class="yoho-header{{#if boys}} boys{{/if}}{{#if girls}} girls{{/if}}{{#if kids}} kids{{/if}}{{#if lifeStyle}} life-style{{/if}}">
3 {{#if navBack}} 4 {{#if navBack}}
4 <a href="javascript:history.go(-1);" class="nav-back"></a> 5 <a href="javascript:history.go(-1);" class="nav-back"></a>
@@ -10,4 +11,5 @@ @@ -10,4 +11,5 @@
10 <p class="nav-title">{{.}}</p> 11 <p class="nav-title">{{.}}</p>
11 {{/navTitle}} 12 {{/navTitle}}
12 </header> 13 </header>
  14 +{{/ isShow}}
13 {{/pageHeader}} 15 {{/pageHeader}}
@@ -32,14 +32,14 @@ @@ -32,14 +32,14 @@
32 <div class="price-compute"> 32 <div class="price-compute">
33 <p class="sum-price"> 33 <p class="sum-price">
34 <span class="title">总价</span> 34 <span class="title">总价</span>
35 - {{price}} 35 + ¥{{price}}
36 </p> 36 </p>
37 <p class="activity-price"> 37 <p class="activity-price">
38 <span class="title"> 38 <span class="title">
39 活动价 39 活动价
40 <i class="minus">-</i> 40 <i class="minus">-</i>
41 </span> 41 </span>
42 - {{activityPrice}} 42 + ¥{{activityPrice}}
43 </p> 43 </p>
44 </div> 44 </div>
45 45
@@ -47,11 +47,11 @@ @@ -47,11 +47,11 @@
47 <span class="iconfont icon-cb-checked"></span> 47 <span class="iconfont icon-cb-checked"></span>
48 <p> 48 <p>
49 <span> 49 <span>
50 - {{count}}件总计:{{sumPrice}} 50 + {{count}}件总计:¥{{sumPrice}}
51 </span> 51 </span>
52 <span class="tip">(不含运费)</span> 52 <span class="tip">(不含运费)</span>
53 </p> 53 </p>
54 <button class="btn-balance"> 54 <button class="btn-balance">
55 结算 55 结算
56 </button> 56 </button>
57 - </div>  
  57 +</div>
@@ -6,9 +6,9 @@ @@ -6,9 +6,9 @@
6 <div class="text-info"> 6 <div class="text-info">
7 <p class="name">{{name}}</p> 7 <p class="name">{{name}}</p>
8 <p class="price"> 8 <p class="price">
9 - <span class="sale-price{{^price}} no-price{{/price}}">{{salePrice}}</span> 9 + <span class="sale-price{{^price}} no-price{{/price}}">¥{{salePrice}}</span>
10 {{#if price}} 10 {{#if price}}
11 - <span class="market-price">{{price}}</span> 11 + <span class="market-price">¥{{price}}</span>
12 {{/if}} 12 {{/if}}
13 </p> 13 </p>
14 </div> 14 </div>
@@ -20,7 +20,7 @@ @@ -20,7 +20,7 @@
20 </p> 20 </p>
21 <p class="row"> 21 <p class="row">
22 <span class="price"> 22 <span class="price">
23 - {{price}} 23 + ¥{{price}}
24 </span> 24 </span>
25 <span class="count"> 25 <span class="count">
26 ×{{count}} 26 ×{{count}}
@@ -25,7 +25,7 @@ @@ -25,7 +25,7 @@
25 </p> 25 </p>
26 <p class="row"> 26 <p class="row">
27 <span class="price"> 27 <span class="price">
28 - {{price}} 28 + ¥{{price}}
29 </span> 29 </span>
30 <span class="count"> 30 <span class="count">
31 ×{{count}} 31 ×{{count}}
@@ -134,9 +134,9 @@ class ShoppingCartController extends AbstractAction @@ -134,9 +134,9 @@ class ShoppingCartController extends AbstractAction
134 public function tplAction() 134 public function tplAction()
135 { 135 {
136 if($this->isAjax()) { 136 if($this->isAjax()) {
137 - //$data = file_get_contents('../../../template/m.yohobuy.com/partials/shopping-cart/chose-panel.phtml'); 137 + $data = file_get_contents('../../../template/m.yohobuy.com/partials/shopping-cart/chose-panel.phtml');
138 138
139 - //echo($data); 139 + echo($data);
140 } 140 }
141 } 141 }
142 142
@@ -70,6 +70,33 @@ class NewsaleController extends AbstractAction @@ -70,6 +70,33 @@ class NewsaleController extends AbstractAction
70 } 70 }
71 71
72 /** 72 /**
  73 + * 热销排行榜
  74 + *
  75 + * @param int channel 1:男生,2:女生,3:潮童,4:创意生活
  76 + */
  77 + public function hotrankAction()
  78 + {
  79 + $this->setTitle('热销排行榜');
  80 + $this->setNavHeader('热销排行榜');
  81 +
  82 + // 设置一些默认参数
  83 + $data = array(
  84 + 'discountPage' => true,
  85 + 'showDownloadApp' => true,
  86 + 'pageFooter' => true,
  87 + 'brand' => '0',
  88 + 'sort' => '0',
  89 + 'gender' => Helpers::getGenderByCookie(),
  90 + 'price' => '0',
  91 + 'size' => '0',
  92 + 'discount' => '0.1,0.9',
  93 + 'cartUrl' => Helpers::url('/cart/index/index', null),
  94 + );
  95 +
  96 + $this->_view->display('hotrank', $data);
  97 + }
  98 +
  99 + /**
73 * Ajax方式筛选新品到着、折扣专区商品 100 * Ajax方式筛选新品到着、折扣专区商品
74 * 101 *
75 * @return array 根据指定条件筛选之后的商品 102 * @return array 根据指定条件筛选之后的商品
@@ -53,6 +53,6 @@ application.assets.path = ROOT_PATH "/assets" @@ -53,6 +53,6 @@ application.assets.path = ROOT_PATH "/assets"
53 application.version = "1.1.5" 53 application.version = "1.1.5"
54 54
55 ; 网站SEO信息 55 ; 网站SEO信息
56 -application.seo.title = "Yoho!Buy有货" 56 +application.seo.title = "Yoho!Buy有货 丨 年轻人潮流购物中心"
57 application.seo.keywords = "Yoho! 有货官网,潮流志,潮流男装,潮牌,美国潮牌,日本潮牌,香港潮牌,潮牌店,新品首发,欧美潮流,全球购,代购,时尚,流行,特卖,B2C,正品,购物网站,网上购物,货到付款" 57 application.seo.keywords = "Yoho! 有货官网,潮流志,潮流男装,潮牌,美国潮牌,日本潮牌,香港潮牌,潮牌店,新品首发,欧美潮流,全球购,代购,时尚,流行,特卖,B2C,正品,购物网站,网上购物,货到付款"
58 application.seo.description = "YOHO! 有货,年轻人潮流购物中心,中国最大的潮流商品购物网站。100%品牌正品保证,支持货到付款。作为YOHO!旗下的购物平台,汇集了全球潮流时尚商品和中国最流行的商品,也是国内最大的原创文化商品平台,也是香港,台湾地区流行商品的集中地。同时包含日本、韩国等众多国外潮流品牌,带给您全新潮流购物体验。" 58 application.seo.description = "YOHO! 有货,年轻人潮流购物中心,中国最大的潮流商品购物网站。100%品牌正品保证,支持货到付款。作为YOHO!旗下的购物平台,汇集了全球潮流时尚商品和中国最流行的商品,也是国内最大的原创文化商品平台,也是香港,台湾地区流行商品的集中地。同时包含日本、韩国等众多国外潮流品牌,带给您全新潮流购物体验。"
@@ -53,7 +53,7 @@ application.assets.path = ROOT_PATH "/assets" @@ -53,7 +53,7 @@ application.assets.path = ROOT_PATH "/assets"
53 application.version = "1.1.5" 53 application.version = "1.1.5"
54 54
55 ; 网站SEO信息 55 ; 网站SEO信息
56 -application.seo.title = "Yoho!Buy有货" 56 +application.seo.title = "Yoho!Buy有货 丨 年轻人潮流购物中心"
57 application.seo.keywords = "Yoho! 有货官网,潮流志,潮流男装,潮牌,美国潮牌,日本潮牌,香港潮牌,潮牌店,新品首发,欧美潮流,全球购,代购,时尚,流行,特卖,B2C,正品,购物网站,网上购物,货到付款" 57 application.seo.keywords = "Yoho! 有货官网,潮流志,潮流男装,潮牌,美国潮牌,日本潮牌,香港潮牌,潮牌店,新品首发,欧美潮流,全球购,代购,时尚,流行,特卖,B2C,正品,购物网站,网上购物,货到付款"
58 application.seo.description = "YOHO! 有货,年轻人潮流购物中心,中国最大的潮流商品购物网站。100%品牌正品保证,支持货到付款。作为YOHO!旗下的购物平台,汇集了全球潮流时尚商品和中国最流行的商品,也是国内最大的原创文化商品平台,也是香港,台湾地区流行商品的集中地。同时包含日本、韩国等众多国外潮流品牌,带给您全新潮流购物体验。" 58 application.seo.description = "YOHO! 有货,年轻人潮流购物中心,中国最大的潮流商品购物网站。100%品牌正品保证,支持货到付款。作为YOHO!旗下的购物平台,汇集了全球潮流时尚商品和中国最流行的商品,也是国内最大的原创文化商品平台,也是香港,台湾地区流行商品的集中地。同时包含日本、韩国等众多国外潮流品牌,带给您全新潮流购物体验。"
59 59
@@ -53,7 +53,7 @@ application.assets.path = ROOT_PATH "/assets" @@ -53,7 +53,7 @@ application.assets.path = ROOT_PATH "/assets"
53 application.version = "1.1.5" 53 application.version = "1.1.5"
54 54
55 ; 网站SEO信息 55 ; 网站SEO信息
56 -application.seo.title = "Yoho!Buy有货" 56 +application.seo.title = "Yoho!Buy有货 丨 年轻人潮流购物中心"
57 application.seo.keywords = "Yoho! 有货官网,潮流志,潮流男装,潮牌,美国潮牌,日本潮牌,香港潮牌,潮牌店,新品首发,欧美潮流,全球购,代购,时尚,流行,特卖,B2C,正品,购物网站,网上购物,货到付款" 57 application.seo.keywords = "Yoho! 有货官网,潮流志,潮流男装,潮牌,美国潮牌,日本潮牌,香港潮牌,潮牌店,新品首发,欧美潮流,全球购,代购,时尚,流行,特卖,B2C,正品,购物网站,网上购物,货到付款"
58 application.seo.description = "YOHO! 有货,年轻人潮流购物中心,中国最大的潮流商品购物网站。100%品牌正品保证,支持货到付款。作为YOHO!旗下的购物平台,汇集了全球潮流时尚商品和中国最流行的商品,也是国内最大的原创文化商品平台,也是香港,台湾地区流行商品的集中地。同时包含日本、韩国等众多国外潮流品牌,带给您全新潮流购物体验。" 58 application.seo.description = "YOHO! 有货,年轻人潮流购物中心,中国最大的潮流商品购物网站。100%品牌正品保证,支持货到付款。作为YOHO!旗下的购物平台,汇集了全球潮流时尚商品和中国最流行的商品,也是国内最大的原创文化商品平台,也是香港,台湾地区流行商品的集中地。同时包含日本、韩国等众多国外潮流品牌,带给您全新潮流购物体验。"
59 59
@@ -53,6 +53,6 @@ application.assets.path = ROOT_PATH "/assets" @@ -53,6 +53,6 @@ application.assets.path = ROOT_PATH "/assets"
53 application.version = "1.1.5" 53 application.version = "1.1.5"
54 54
55 ; 网站SEO信息 55 ; 网站SEO信息
56 -application.seo.title = "Yoho!Buy有货" 56 +application.seo.title = "Yoho!Buy有货 丨 年轻人潮流购物中心"
57 application.seo.keywords = "Yoho! 有货官网,潮流志,潮流男装,潮牌,美国潮牌,日本潮牌,香港潮牌,潮牌店,新品首发,欧美潮流,全球购,代购,时尚,流行,特卖,B2C,正品,购物网站,网上购物,货到付款" 57 application.seo.keywords = "Yoho! 有货官网,潮流志,潮流男装,潮牌,美国潮牌,日本潮牌,香港潮牌,潮牌店,新品首发,欧美潮流,全球购,代购,时尚,流行,特卖,B2C,正品,购物网站,网上购物,货到付款"
58 application.seo.description = "YOHO! 有货,年轻人潮流购物中心,中国最大的潮流商品购物网站。100%品牌正品保证,支持货到付款。作为YOHO!旗下的购物平台,汇集了全球潮流时尚商品和中国最流行的商品,也是国内最大的原创文化商品平台,也是香港,台湾地区流行商品的集中地。同时包含日本、韩国等众多国外潮流品牌,带给您全新潮流购物体验。" 58 application.seo.description = "YOHO! 有货,年轻人潮流购物中心,中国最大的潮流商品购物网站。100%品牌正品保证,支持货到付款。作为YOHO!旗下的购物平台,汇集了全球潮流时尚商品和中国最流行的商品,也是国内最大的原创文化商品平台,也是香港,台湾地区流行商品的集中地。同时包含日本、韩国等众多国外潮流品牌,带给您全新潮流购物体验。"
@@ -89,6 +89,13 @@ routes.productsale.route.module = Product @@ -89,6 +89,13 @@ routes.productsale.route.module = Product
89 routes.productsale.route.controller = Newsale 89 routes.productsale.route.controller = Newsale
90 routes.productsale.route.action = Discount 90 routes.productsale.route.action = Discount
91 91
  92 +; 热销排行榜
  93 +routes.productsale.type = "rewrite"
  94 +routes.productsale.match = "/hotrank"
  95 +routes.productsale.route.module = Product
  96 +routes.productsale.route.controller = Newsale
  97 +routes.productsale.route.action = Hotrank
  98 +
92 ; 女生首页 99 ; 女生首页
93 routes.girls.type = "rewrite" 100 routes.girls.type = "rewrite"
94 routes.girls.match = "/girl$" 101 routes.girls.match = "/girl$"