Authored by biao

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

1 {{> layout/header}} 1 {{> layout/header}}
2 -<div class="sale-page yoho-page">  
3 - <h1>折扣页面</h1> 2 +<div class="sale-page yoho-page center-content">
  3 + {{#topBanner}}
  4 + {{> index/slide-banner}}
  5 + {{/topBanner}}
  6 +
  7 + {{> sale/activity-entry}}
4 </div> 8 </div>
5 {{> layout/footer}} 9 {{> layout/footer}}
1 <div class="slide-container {{#if pagination}}slide-thumb-container{{/if}}"> 1 <div class="slide-container {{#if pagination}}slide-thumb-container{{/if}}">
2 - <div class="slide-wrapper"> 2 + <div class="slide-wrapper">
3 <ul> 3 <ul>
4 {{# list}} 4 {{# list}}
5 - <li style="background:{{bgColor}}"> 5 + <li style="{{#if bgColor}}background:{{bgColor}}{{/if}}">
6 <a href="{{href}}" target= "_blank"> 6 <a href="{{href}}" target= "_blank">
7 <img class="lazy" data-original="{{img}}" alt=""> 7 <img class="lazy" data-original="{{img}}" alt="">
8 </a> 8 </a>
@@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
13 </div> 13 </div>
14 {{/ tips}} 14 {{/ tips}}
15 </li> 15 </li>
16 - {{/ list}} 16 + {{/ list}}
17 </ul> 17 </ul>
18 <div class="slide-switch"> 18 <div class="slide-switch">
19 <a class="prev" href="javascript:;"> 19 <a class="prev" href="javascript:;">
@@ -31,11 +31,11 @@ @@ -31,11 +31,11 @@
31 {{# pagination}} 31 {{# pagination}}
32 <li> 32 <li>
33 <a href="{{href}}" target="_blank"></a> 33 <a href="{{href}}" target="_blank"></a>
34 - <img src="{{img}}" alt=""> 34 + <img src="{{img}}" alt="">
35 </li> 35 </li>
36 {{/ pagination}} 36 {{/ pagination}}
37 </ul> 37 </ul>
38 </div> 38 </div>
39 {{/if}} 39 {{/if}}
40 </div> 40 </div>
41 -<div class="slide-container-placeholder {{#if pagination}}slide-thumb-container-placeholder{{/if}}"></div>  
  41 +<div class="slide-container-placeholder {{#if pagination}}slide-thumb-container-placeholder{{/if}}"></div>
@@ -83,8 +83,8 @@ @@ -83,8 +83,8 @@
83 <ul class="sub-nav-list"> 83 <ul class="sub-nav-list">
84 {{# subnav}} 84 {{# subnav}}
85 <li class="sub-nav-item"> 85 <li class="sub-nav-item">
86 - <a href="{{link}}">{{name}} {{#is_new}}<span class="newlogo"></span>{{/is_new}}</a>  
87 - {{#if thirdnav}} 86 + <a href="{{link}}">{{name}}</a>
  87 + {{#if thirdnav}}
88 <div class="third-nav-wrapper"> 88 <div class="third-nav-wrapper">
89 <div class="third-nav"> 89 <div class="third-nav">
90 <div class="categorywrapper" id="category{{../index_main}}{{index_sub}}"> 90 <div class="categorywrapper" id="category{{../index_main}}{{index_sub}}">
@@ -94,8 +94,9 @@ @@ -94,8 +94,9 @@
94 <h1 class="category-title thirdnavbar">{{title}}</h1> 94 <h1 class="category-title thirdnavbar">{{title}}</h1>
95 <ul class="category-list"> 95 <ul class="category-list">
96 {{#branditems}} 96 {{#branditems}}
97 - <li class="category-item thirdnavbar">  
98 - <a href="{{link}}" class="{{hot}}">{{brandname}}</a> 97 + <li class="category-
  98 + item thirdnavbar">
  99 + <a href="" hot={{hot}}>{{brandname}}</a>
99 </li> 100 </li>
100 {{/branditems}} 101 {{/branditems}}
101 </ul> 102 </ul>
@@ -299,8 +300,7 @@ @@ -299,8 +300,7 @@
299 <script type="text/html" id="tmpl-my-login-new"> 300 <script type="text/html" id="tmpl-my-login-new">
300 <div class="myyoho-info-header clearfix"> 301 <div class="myyoho-info-header clearfix">
301 \{\{# head_ico \}\} 302 \{\{# head_ico \}\}
302 - <div class="myyoho-photo" style="display:none;"><img src="" alt="" data-url ="\{\{it.head_ico\}\}">  
303 - </div> 303 + <div class="myyoho-photo" style="display:none;"><img src="" alt="" data-url ="\{\{it.head_ico\}\}"></div>
304 \{\{/ head_ico\}\} 304 \{\{/ head_ico\}\}
305 <h3 class="user-email"><a href="<?php print QConfigs_Site_Config::$site_url?>/home?t=\{\{random\}\}">\{\{profile_name\}\}</a></h3> 305 <h3 class="user-email"><a href="<?php print QConfigs_Site_Config::$site_url?>/home?t=\{\{random\}\}">\{\{profile_name\}\}</a></h3>
306 <h3 class="user-level"> 306 <h3 class="user-level">
@@ -68,6 +68,13 @@ @@ -68,6 +68,13 @@
68 </script> 68 </script>
69 {{/if}} 69 {{/if}}
70 70
  71 +{{!-- SALE --}}
  72 +{{#if saleIndexPage}}
  73 + <script>
  74 + seajs.use('js/sale/index');
  75 + </script>
  76 +{{/if}}
  77 +
71 {{!-- 登录注册找回密码--}} 78 {{!-- 登录注册找回密码--}}
72 {{#if loginPage}} 79 {{#if loginPage}}
73 <script> 80 <script>
  1 +<div class="activity-entry clearfix">
  2 + {{#activityEnter}}
  3 + <a class="entry-item pull-left {{#if @first}}first{{/if}} {{#if @last}}last{{/if}}" href="link">
  4 + <img class="icon pull-left" src="{{icon}}">
  5 + <div class="entry-text">
  6 + <span class="title">{{title}}</span>
  7 + <p class="desc">{{desc}}</p>
  8 + </div>
  9 + </a>
  10 + {{/activityEnter}}
  11 +</div>
@@ -3837,7 +3837,8 @@ define("js/passport/entry", ["jquery","jquery.placeholder"], function(require, e @@ -3837,7 +3837,8 @@ define("js/passport/entry", ["jquery","jquery.placeholder"], function(require, e
3837 require("js/passport/reg"); 3837 require("js/passport/reg");
3838 require("js/passport/back"); 3838 require("js/passport/back");
3839 require("js/passport/login"); 3839 require("js/passport/login");
3840 -require("js/passport/reset"); 3840 +require("js/passport/reset");
  3841 +require("js/passport/vertification");
3841 }); 3842 });
3842 define("js/passport/reg", ["jquery"], function(require, exports, module){ 3843 define("js/passport/reg", ["jquery"], function(require, exports, module){
3843 /* 3844 /*
@@ -5345,3 +5346,106 @@ $('#pwd, #repwd').keydown(function(e) { @@ -5345,3 +5346,106 @@ $('#pwd, #repwd').keydown(function(e) {
5345 }); 5346 });
5346 5347
5347 }); 5348 });
  5349 +define("js/passport/vertification", ["jquery"], function(require, exports, module){
  5350 +/**
  5351 + * 验证手机
  5352 + * @author: xuqi<qi.xu@yoho.cn>
  5353 + * @date: 2015/12/14
  5354 + */
  5355 +
  5356 +var $ = require("jquery");
  5357 +
  5358 +var $sc = $('#send-captcha'),
  5359 + $msgTip = $('#captcha-tip'),
  5360 + $errTip = $('#err-tip'),
  5361 + $next = $('#next-step'),
  5362 + seconds,
  5363 + itime;
  5364 +
  5365 +$sc.click(function() {
  5366 + $.post('/passport/register/authcode', {
  5367 + mobile: $('#mobile').val(),
  5368 + area: $('#area').val(),
  5369 + captcha: $('#captchaPic').val(),
  5370 + project: 'repassword'
  5371 + }, function(jsonData) {
  5372 + if (jsonData.code === 200) {
  5373 + $errTip.hide();
  5374 + if ($(this).hasClass('disable')) {
  5375 + return;
  5376 + }
  5377 + seconds = 60;
  5378 +
  5379 + //$sc.addClass('disable').prop('disabled', true);
  5380 + $sc.addClass('disable').attr('disabled', true);
  5381 + $msgTip.removeClass('hide');
  5382 +
  5383 + $sc.val(seconds-- + '秒后可重新操作');
  5384 + itime = setInterval(function() {
  5385 + if (seconds === 0) {
  5386 + clearInterval(itime);
  5387 +
  5388 + //$sc.val('发送验证码').removeClass('disable').prop('disabled', false);
  5389 + $sc.val('发送验证码').removeClass('disable').removeAttr('disabled');
  5390 + } else {
  5391 + $sc.val(seconds-- + '秒后可重新操作');
  5392 + }
  5393 + }, 1000);
  5394 + } else {
  5395 + $(this).addClass('error');
  5396 + $errTip.removeClass('hide').text('发送失败');
  5397 + }
  5398 + });
  5399 +});
  5400 +
  5401 +if ($(this).hasClass('disable')) {
  5402 + return;
  5403 +}
  5404 +seconds = 60;
  5405 +
  5406 +//$sc.addClass('disable').prop('disabled', true);
  5407 +$sc.addClass('disable').attr('disabled', true);
  5408 +$msgTip.removeClass('hide');
  5409 +
  5410 +$sc.val(seconds-- + '秒后可重新操作');
  5411 +itime = setInterval(function() {
  5412 + if (seconds === 0) {
  5413 + clearInterval(itime);
  5414 +
  5415 + //$sc.val('发送验证码').removeClass('disable').prop('disabled', false);
  5416 + $sc.val('发送验证码').removeClass('disable').removeAttr('disabled');
  5417 + } else {
  5418 + $sc.val(seconds-- + '秒后可重新操作');
  5419 + }
  5420 +}, 1000);
  5421 +
  5422 +
  5423 +$('#captcha').keyup(function() {
  5424 + var v = $.trim($(this).val());
  5425 +
  5426 + if (v !== '') {
  5427 +
  5428 + //添加验证码正确验证
  5429 + //$next.removeClass('disable').prop('disabled', false);
  5430 + $next.removeClass('disable').removeAttr('disabled');
  5431 + } else {
  5432 +
  5433 + //$next.addClass('disable').prop('disabled', true);
  5434 + $next.addClass('disable').attr('disabled', true);
  5435 + }
  5436 +}).blur(function() {
  5437 + var v = $.trim($(this).val());
  5438 +
  5439 + if (v === '') {
  5440 +
  5441 + //添加验证码正确验证
  5442 + $(this).addClass('error');
  5443 + $errTip.removeClass('hide');
  5444 + } else {
  5445 + $(this).removeClass('error');
  5446 + $errTip.addClass('hide');
  5447 + }
  5448 +}).focus(function() {
  5449 + $(this).removeClass('error');
  5450 +});
  5451 +});
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
@@ -95,20 +95,20 @@ function getShoppingKey() { @@ -95,20 +95,20 @@ function getShoppingKey() {
95 } 95 }
96 96
97 //YAS统计代码 97 //YAS统计代码
98 -(function(w, d, s, j, f) {  
99 - var a = d.createElement(s);  
100 - var m = d.getElementsByTagName(s)[0];  
101 -  
102 - w.YohoAcquisitionObject = f;  
103 -  
104 - w[f] = function() {  
105 - w[f].p = arguments;  
106 - };  
107 -  
108 - a.async = 1;  
109 - a.src = j;  
110 - m.parentNode.insertBefore(a, m);  
111 -})(window, document, 'script', 'http://cdn.yoho.cn/yas-jssdk/1.0.14/yas.js', '_yas'); 98 +//(function(w, d, s, j, f) {
  99 +// var a = d.createElement(s);
  100 +// var m = d.getElementsByTagName(s)[0];
  101 +//
  102 +// w.YohoAcquisitionObject = f;
  103 +//
  104 +// w[f] = function() {
  105 +// w[f].p = arguments;
  106 +// };
  107 +//
  108 +// a.async = 1;
  109 +// a.src = j;
  110 +// m.parentNode.insertBefore(a, m);
  111 +//})(window, document, 'script', 'http://cdn.yoho.cn/yas-jssdk/1.0.14/yas.js', '_yas');
112 112
113 (function() { 113 (function() {
114 var uid = getUid(); 114 var uid = getUid();
@@ -502,6 +502,226 @@ function actionTopLogoAnimate() { @@ -502,6 +502,226 @@ function actionTopLogoAnimate() {
502 window.setTimeout(fadeAnimate, 3000); 502 window.setTimeout(fadeAnimate, 3000);
503 } 503 }
504 } 504 }
  505 +window.newArr = [];
  506 +window.wrapperindex = 0;
  507 +window.gindex = 0;
  508 +window.targetArr1 = [];
  509 +window.targetArr2 = [];
  510 +window.targetArr3 = [];
  511 +window.oh1 = 0;
  512 +window.oh2 = 0;
  513 +window.oh3 = 0;
  514 +window.valueIndex = 0;
  515 +window.nowIndex = 0;
  516 +window.inner1 = '';
  517 +window.inner2 = '';
  518 +window.inner3 = '';
  519 +window.finalresult = '';
  520 +
  521 +function createNewArray(obj) {
  522 + var $thirdnavpanel = $(obj);
  523 +
  524 + $thirdnavpanel.find('.thirdnavbar').each(function() {
  525 + var $that = $(this);
  526 + var $alink = $that.find('a');
  527 + var _href = $alink.attr('href');
  528 + var hottag = $alink.attr('hot') === 'true' ? true : false;
  529 + var objt = {};
  530 +
  531 + if ($that.hasClass('category-title')) {
  532 + objt = {
  533 + type: 'title',
  534 + height: 49,
  535 + content: $that.text(),
  536 + index: window.valueIndex,
  537 + href: _href,
  538 + hot: false
  539 + };
  540 + } else {
  541 + objt = {
  542 + type: 'catlist',
  543 + height: 36,
  544 + content: $alink.text(),
  545 + index: window.valueIndex,
  546 + href: _href,
  547 + hot: hottag
  548 + };
  549 + }
  550 + window.valueIndex++;
  551 + window.newArr.push(objt);
  552 + });
  553 +}
  554 +
  555 +function createWrapper() {
  556 + var arrlength = window.newArr.length;
  557 + var i = 0;
  558 + var objnew = [];
  559 + var aobj = [];
  560 + var bobj = [];
  561 + var cobj = [];
  562 + var final1 = '',
  563 + final2 = '',
  564 + final3 = '';
  565 + var a = 0;
  566 + var b = 0;
  567 + var c = 0;
  568 +
  569 + for (i; i < arrlength; i++) {
  570 + objnew = window.newArr[i];
  571 + if (window.gindex === 0) {
  572 + window.oh1 = (window.oh1 + objnew.height);
  573 + if (window.oh1 >= 340 && i !== (arrlength - 1)) {
  574 + window.targetArr1 = window.newArr.slice(0, objnew.index + 1);
  575 + window.nowIndex = objnew.index + 1;
  576 + window.gindex++;
  577 + }
  578 + if (i === (arrlength - 1)) {
  579 + window.targetArr1 = window.newArr.slice(0, arrlength + 1);
  580 + break;
  581 + }
  582 + }
  583 + if (window.gindex === 1) {
  584 + window.oh2 = (window.oh2 + objnew.height);
  585 + if (window.oh2 >= 340 && i !== (arrlength - 1)) {
  586 + window.targetArr2 = window.newArr.slice(window.nowIndex, objnew.index + 1);
  587 + window.nowIndex = objnew.index + 1;
  588 + window.gindex++;
  589 + }
  590 + if (i === (arrlength - 1)) {
  591 + window.targetArr2 = window.newArr.slice(window.nowIndex, arrlength + 1);
  592 + break;
  593 + }
  594 + }
  595 + if (window.gindex === 2) {
  596 + window.oh3 = (window.oh3 + objnew.height);
  597 + if (window.oh3 >= 340 && i !== (arrlength - 1)) {
  598 + window.targetArr3 = window.newArr.slice(window.nowIndex, objnew.index + 1);
  599 + window.nowIndex = objnew.index + 1;
  600 + window.gindex++;
  601 + break;
  602 + }
  603 + if (i === (arrlength - 1)) {
  604 + window.targetArr3 = window.newArr.slice(window.nowIndex, arrlength + 1);
  605 + break;
  606 + }
  607 + }
  608 + }
  609 + for (a; a < window.targetArr1.length; a++) {
  610 + aobj = window.targetArr1[a] || {};
  611 + if (aobj.type === 'title') {
  612 + window.inner1 = window.inner1 +
  613 + '<li class="cattitle"><h3><a href="' +
  614 + aobj.href +
  615 + '">' +
  616 + aobj.content +
  617 + '</a></h3></li>';
  618 + } else {
  619 + if (aobj.hot === true) {
  620 + window.inner1 = window.inner1 +
  621 + '<li class="catdetail"><a class="thirdcatelink hot" href="' +
  622 + aobj.href +
  623 + '">' +
  624 + aobj.content +
  625 + '</a></li>';
  626 + } else {
  627 + window.inner1 = window.inner1 +
  628 + '<li class="catdetail"><a class="thirdcatelink" href="' +
  629 + aobj.href + '">' +
  630 + aobj.content +
  631 + '</a></li>';
  632 + }
  633 +
  634 + }
  635 + }
  636 + for (b; b < window.targetArr2.length; b++) {
  637 + bobj = window.targetArr2[b] || {};
  638 + if (bobj.type === 'title') {
  639 + window.inner2 = (window.inner2 +
  640 + '<li class="cattitle"><h3><a href="' +
  641 + bobj.href + '">' +
  642 + bobj.content +
  643 + '</a></h3></li>');
  644 + } else {
  645 + if (bobj.hot === true) {
  646 + window.inner2 = (window.inner2 +
  647 + '<li class="catdetail"><a class="thirdcatelink hot" href="' +
  648 + bobj.href + '">' + bobj.content + '</a></li>');
  649 + } else {
  650 + window.inner2 = (window.inner2 +
  651 + '<li class="catdetail"><a class="thirdcatelink" href="' +
  652 + bobj.href + '">' + bobj.content + '</a></li>');
  653 + }
  654 +
  655 + }
  656 + }
  657 + for (c; c < window.targetArr3.length; c++) {
  658 + cobj = window.targetArr3[c] || {};
  659 + if (cobj.type === 'title') {
  660 + window.inner3 = (window.inner3 +
  661 + '<li class="cattitle"><h3><a href="' +
  662 + cobj.href +
  663 + '">' +
  664 + cobj.content +
  665 + '</a></h3></li>');
  666 + } else {
  667 + if (cobj.hot === true) {
  668 + window.inner3 = (window.inner3 +
  669 + '<li class="catdetail"><a class="thirdcatelink hot" href="' +
  670 + cobj.href + '">' +
  671 + cobj.content +
  672 + '</a></li>');
  673 + } else {
  674 + window.inner3 = (window.inner3 +
  675 + '<li class="catdetail"><a class="thirdcatelink" href="' +
  676 + cobj.href + '">' +
  677 + cobj.content +
  678 + '</a></li>');
  679 + }
  680 +
  681 + }
  682 + }
  683 + if (window.inner1 !== '') {
  684 + final1 = '<ul class="cate_row1 cate_row">' +
  685 + window.inner1 +
  686 + '</ul>';
  687 + }
  688 + if (window.inner2 !== '') {
  689 + final2 = '<ul class="cate_row2 cate_row">' +
  690 + window.inner2 +
  691 + '</ul>';
  692 + }
  693 + if (window.inner3 !== '') {
  694 + final3 = '<ul class="cate_row3 cate_row">' +
  695 + window.inner3 +
  696 + '</ul>';
  697 + }
  698 + window.finalresult = final1 + final2 + final3;
  699 + $('#' + window.wrapperindex).empty().append(window.finalresult);
  700 +}
  701 +
  702 +function actionNav() {
  703 + $('.categorywrapper').each(function(index) {
  704 + window.wrapperindex = $(this).attr('id');
  705 + window.newArr = [];
  706 + window.gindex = 0;
  707 + window.targetArr1 = [];
  708 + window.targetArr2 = [];
  709 + window.targetArr3 = [];
  710 + window.oh1 = 0;
  711 + window.oh2 = 0;
  712 + window.oh3 = 0;
  713 + window.valueIndex = 0;
  714 + window.nowIndex = 0;
  715 + window.inner1 = '';
  716 + window.inner2 = '';
  717 + window.inner3 = '';
  718 + createNewArray($(this).find('.category'));
  719 + createWrapper();
  720 + });
  721 +}
  722 +
  723 +
  724 +
505 /** 725 /**
506 * 查询跳转后保留关键字 726 * 查询跳转后保留关键字
507 * @return {[type]} [description] 727 * @return {[type]} [description]
@@ -1105,6 +1325,7 @@ function actionLoginInfo() { @@ -1105,6 +1325,7 @@ function actionLoginInfo() {
1105 * @return {[type]} [description] 1325 * @return {[type]} [description]
1106 */ 1326 */
1107 function init() { 1327 function init() {
  1328 + actionNav(); //处理导航
1108 actionExeTemplate(); //处理模板 1329 actionExeTemplate(); //处理模板
1109 actionInitCookie(); //初始化cookie 1330 actionInitCookie(); //初始化cookie
1110 actionExeCookieMap(); //格式化cookie 1331 actionExeCookieMap(); //格式化cookie
@@ -5,4 +5,5 @@ @@ -5,4 +5,5 @@
5 require('./reg'); 5 require('./reg');
6 require('./back'); 6 require('./back');
7 require('./login'); 7 require('./login');
8 -require('./reset');  
  8 +require('./reset');
  9 +require('./vertification');
  1 +/**
  2 + * 首页
  3 + * @author: bikai<kia.bi@yoho.cn>
  4 + * @date: 2016/1/18
  5 + */
  6 +
  7 +var $ = require('yoho.jquery'),
  8 + lazyLoad = require('yoho.lazyload');
  9 +
  10 +require('../common/slider');
  11 +
  12 +lazyLoad($('img.lazy'));
  13 +$('.slide-container').slider();
@@ -532,7 +532,7 @@ @@ -532,7 +532,7 @@
532 532
533 .third-nav-wrapper { 533 .third-nav-wrapper {
534 box-sizing: border-box; 534 box-sizing: border-box;
535 - height: 300px; 535 + height: 410px;
536 position: absolute; 536 position: absolute;
537 left: 0; 537 left: 0;
538 top: 38px; 538 top: 38px;
@@ -602,8 +602,8 @@ @@ -602,8 +602,8 @@
602 box-sizing: border-box; 602 box-sizing: border-box;
603 padding-left: 19px; 603 padding-left: 19px;
604 padding-right: 19px; 604 padding-right: 19px;
605 - width: 268px;  
606 - height: 100%; 605 + width: 337px;
  606 + height: 250px;
607 float: right; 607 float: right;
608 } 608 }
609 609
@@ -945,12 +945,12 @@ @@ -945,12 +945,12 @@
945 .showdetail img { 945 .showdetail img {
946 display: block; 946 display: block;
947 box-sizing: border-box; 947 box-sizing: border-box;
948 - width: 226px;  
949 - height: 200px; 948 + width: 337px;
  949 + height: 250px;
950 } 950 }
951 .showdetail .title { 951 .showdetail .title {
952 display: block; 952 display: block;
953 - margin-top: 17px; 953 + margin-top: 40px;
954 width: 100%; 954 width: 100%;
955 height: 15px; 955 height: 15px;
956 text-align: center; 956 text-align: center;
1 @charset "utf-8"; 1 @charset "utf-8";
2 2
3 -@import "compass", 3 +@import "compass",
4 "compass/reset", 4 "compass/reset",
5 "header", 5 "header",
6 "footer", 6 "footer",
@@ -9,7 +9,7 @@ @@ -9,7 +9,7 @@
9 "pager"; 9 "pager";
10 10
11 body { 11 body {
12 - font-family: arial,"Microsoft YaHei"; 12 + font-family: arial,"Microsoft YaHei";
13 } 13 }
14 14
15 @font-face { 15 @font-face {
@@ -38,10 +38,10 @@ body { @@ -38,10 +38,10 @@ body {
38 } 38 }
39 39
40 .clearfix:after { 40 .clearfix:after {
41 - clear: both; 41 + clear: both;
42 } 42 }
43 43
44 -.clearfix { 44 +.clearfix {
45 *zoom: 1; 45 *zoom: 1;
46 } 46 }
47 47
@@ -86,4 +86,4 @@ input,textarea { @@ -86,4 +86,4 @@ input,textarea {
86 } 86 }
87 } 87 }
88 88
89 -@import "home/index", "product/index", "guang/index", "passport/index", "error","order/index"; 89 +@import "home/index", "product/index", "guang/index", "passport/index", "error", "order/index", "sale/index";
  1 +.sale-page {
  2 + margin-top: 10px;
  3 +
  4 + .slide-container {
  5 + position: relative;
  6 + height: 450px;
  7 + overflow: hidden;
  8 + }
  9 +
  10 + .activity-entry {
  11 + margin: 10px 0;
  12 +
  13 + .entry-item {
  14 + display: block;
  15 + width: 377px;
  16 + margin-right: 10px;
  17 + padding: 24px 0;
  18 + background: #f5f5f5;
  19 +
  20 + &.first,
  21 + &.last {
  22 + width: 376px;
  23 + }
  24 +
  25 + &.last {
  26 + margin-right: 0;
  27 + }
  28 + }
  29 +
  30 + .entry-text {
  31 + padding-left: 160px;
  32 + font-size: 16px;
  33 + }
  34 +
  35 + .icon {
  36 + width: 72px;
  37 + height: 72px;
  38 + margin-left: 48px;
  39 + }
  40 +
  41 + .title {
  42 + font-size: 26px;
  43 + font-weight: bold;
  44 + line-height: 48px;
  45 + }
  46 + }
  47 +}
1 <?php 1 <?php
2 /** 2 /**
3 * 启动运行 3 * 启动运行
4 - * 4 + *
5 * @name Bootstrap 5 * @name Bootstrap
6 * @author fei.hong 6 * @author fei.hong
7 * @desc 所有在Bootstrap类中, 以_init开头的方法, 都会被Yaf调用, 7 * @desc 所有在Bootstrap类中, 以_init开头的方法, 都会被Yaf调用,
@@ -54,7 +54,7 @@ class Bootstrap extends Bootstrap_Abstract @@ -54,7 +54,7 @@ class Bootstrap extends Bootstrap_Abstract
54 // */ 54 // */
55 // public function _initPlugin(Dispatcher $dispatcher) 55 // public function _initPlugin(Dispatcher $dispatcher)
56 // { 56 // {
57 -// 57 +//
58 // } 58 // }
59 59
60 /** 60 /**
@@ -77,6 +77,7 @@ class Bootstrap extends Bootstrap_Abstract @@ -77,6 +77,7 @@ class Bootstrap extends Bootstrap_Abstract
77 case 'www': // 主站 77 case 'www': // 主站
78 case 'new': // 原新版 78 case 'new': // 原新版
79 case 'dev': // 开发环境 79 case 'dev': // 开发环境
  80 + case 'web':
80 break; 81 break;
81 case 'search': // 搜索 82 case 'search': // 搜索
82 $searchRequest = new Yaf\Request\Http('/product/search/index'); 83 $searchRequest = new Yaf\Request\Http('/product/search/index');
@@ -89,10 +90,10 @@ class Bootstrap extends Bootstrap_Abstract @@ -89,10 +90,10 @@ class Bootstrap extends Bootstrap_Abstract
89 $module = 'Product'; 90 $module = 'Product';
90 $url = strtolower($dispatcher->getRequest()->getRequestUri()); 91 $url = strtolower($dispatcher->getRequest()->getRequestUri());
91 //list列表的index 92 //list列表的index
92 - if(empty($url) || $url == '/index') {  
93 - $listRequest = new Yaf\Request\Http('/product/list/index');  
94 - $dispatcher->setRequest($listRequest);  
95 - } 93 + if(empty($url) || $url == '/index' || $url == '/') {
  94 + $listRequest = new Yaf\Request\Http('/product/list/index');
  95 + $dispatcher->setRequest($listRequest);
  96 + }
96 break; 97 break;
97 case 'sale'://促销 98 case 'sale'://促销
98 $module = 'Product'; 99 $module = 'Product';
@@ -135,7 +136,7 @@ class Bootstrap extends Bootstrap_Abstract @@ -135,7 +136,7 @@ class Bootstrap extends Bootstrap_Abstract
135 $layout = new TemplateLayout(); 136 $layout = new TemplateLayout();
136 $layout->setScriptPath($this->_config->application->template->path); 137 $layout->setScriptPath($this->_config->application->template->path);
137 $dispatcher->setView($layout); 138 $dispatcher->setView($layout);
138 - //} 139 + //}
139 } 140 }
140 141
141 // /** 142 // /**
@@ -18,4 +18,4 @@ class LifestyleController extends WebAction @@ -18,4 +18,4 @@ class LifestyleController extends WebAction
18 ); 18 );
19 $this->_view->display('index', $data); 19 $this->_view->display('index', $data);
20 } 20 }
21 -}  
  21 +}
@@ -79,8 +79,8 @@ class HomeModel @@ -79,8 +79,8 @@ class HomeModel
79 'is_new' => $val['is_new'] == 'Y' ? true : false, 79 'is_new' => $val['is_new'] == 'Y' ? true : false,
80 // 'subnav' => array() 80 // 'subnav' => array()
81 ); 81 );
  82 + $index_sub = 0;
82 foreach ($val['sub'] as $sub) { // 二级 83 foreach ($val['sub'] as $sub) { // 二级
83 - $index_sub = 0;  
84 $subnav = array( 84 $subnav = array(
85 'name' => $sub['sort_name'], 85 'name' => $sub['sort_name'],
86 'name_en' => $sub['sort_name_en'], 86 'name_en' => $sub['sort_name_en'],
@@ -205,6 +205,7 @@ class BackController extends WebAction { @@ -205,6 +205,7 @@ class BackController extends WebAction {
205 $code = AuthCode::encode ( $str, PassportModel::BACK_FIND_SECRET_KEY ); 205 $code = AuthCode::encode ( $str, PassportModel::BACK_FIND_SECRET_KEY );
206 $url = '/passport/back/backcode?code=' . base64_encode ( $code ); 206 $url = '/passport/back/backcode?code=' . base64_encode ( $code );
207 $this->redirect ( SITE_MAIN . $url ); 207 $this->redirect ( SITE_MAIN . $url );
  208 + return true;
208 } 209 }
209 } 210 }
210 //出错直接跳到找回密码页 211 //出错直接跳到找回密码页
@@ -2,16 +2,57 @@ @@ -2,16 +2,57 @@
2 // 前端开发添加的路由,对应需求 http://redmine.yoho.cn/issues/143, 后端开发完删除 2 // 前端开发添加的路由,对应需求 http://redmine.yoho.cn/issues/143, 后端开发完删除
3 // 首页 毕凯,赵彪 3 // 首页 毕凯,赵彪
4 // 列表页 王成龙 4 // 列表页 王成龙
5 -use Action\AbstractAction; 5 +use Action\WebAction;
6 use Plugin\Helpers; 6 use Plugin\Helpers;
7 7
8 -class Sale1Controller extends AbstractAction 8 +class Sale1Controller extends WebAction
9 { 9 {
10 public function indexAction() 10 public function indexAction()
11 { 11 {
12 $data = array( 12 $data = array(
13 - 'salePage' => true 13 + 'saleIndexPage' => true,
  14 + 'topBanner' => array(
  15 + 'list' => array(
  16 + array(
  17 + 'href' => 'http://www.yohobuy.com',
  18 + 'img' => 'http://img11.static.yhbimg.com/yhb-img01/2015/12/23/03/01cd0659953f9f213213839c971406413c.jpg?imageView/1/w/1150/h/450'
  19 + ),
  20 + array(
  21 + 'href' => 'http://www.yohobuy.com',
  22 + 'img' => 'http://img11.static.yhbimg.com/yhb-img01/2015/12/23/03/01c571ce38e5d6cf5a0077bd11593bbdfe.jpg?imageView/1/w/1150/h/450'
  23 + ),
  24 + array(
  25 + 'href' => 'http://www.yohobuy.com',
  26 + 'img' => 'http://img11.static.yhbimg.com/yhb-img01/2015/12/23/03/01cd0659953f9f213213839c971406413c.jpg?imageView/1/w/1150/h/450'
  27 + ),
  28 + array(
  29 + 'href' => 'http://www.yohobuy.com',
  30 + 'img' => 'http://img11.static.yhbimg.com/yhb-img01/2015/12/23/03/01c571ce38e5d6cf5a0077bd11593bbdfe.jpg?imageView/1/w/1150/h/450'
  31 + )
  32 + )
  33 + ),
  34 + 'activityEnter' => array(
  35 + array(
  36 + 'icon' => '',
  37 + 'title' => 'VIP会员专享',
  38 + 'desc' => 'Only for VIP',
  39 + 'link' => 'http://www.yohobuy.com'
  40 + ),
  41 + array(
  42 + 'icon' => '',
  43 + 'title' => '断码区',
  44 + 'desc' => 'Discount',
  45 + 'link' => 'http://www.yohobuy.com'
  46 + ),
  47 + array(
  48 + 'icon' => '',
  49 + 'title' => '最新降价',
  50 + 'desc' => 'Off Price',
  51 + 'link' => 'http://www.yohobuy.com'
  52 + )
  53 + )
14 ); 54 );
  55 + $this->setWebNavHeader();
15 $this->_view->display('index', $data); 56 $this->_view->display('index', $data);
16 } 57 }
17 58