Authored by wangqing

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

{{> layout/header}}
<div class="sale-page yoho-page">
<h1>折扣页面</h1>
<div class="sale-page yoho-page center-content">
{{#topBanner}}
{{> index/slide-banner}}
{{/topBanner}}
{{> sale/activity-entry}}
</div>
{{> layout/footer}}
... ...
<div class="slide-container {{#if pagination}}slide-thumb-container{{/if}}">
<div class="slide-wrapper">
<div class="slide-wrapper">
<ul>
{{# list}}
<li style="background:{{bgColor}}">
<li style="{{#if bgColor}}background:{{bgColor}}{{/if}}">
<a href="{{href}}" target= "_blank">
<img class="lazy" data-original="{{img}}" alt="">
</a>
... ... @@ -13,7 +13,7 @@
</div>
{{/ tips}}
</li>
{{/ list}}
{{/ list}}
</ul>
<div class="slide-switch">
<a class="prev" href="javascript:;">
... ... @@ -31,11 +31,11 @@
{{# pagination}}
<li>
<a href="{{href}}" target="_blank"></a>
<img src="{{img}}" alt="">
<img src="{{img}}" alt="">
</li>
{{/ pagination}}
</ul>
</div>
{{/if}}
</div>
<div class="slide-container-placeholder {{#if pagination}}slide-thumb-container-placeholder{{/if}}"></div>
\ No newline at end of file
<div class="slide-container-placeholder {{#if pagination}}slide-thumb-container-placeholder{{/if}}"></div>
... ...
... ... @@ -68,6 +68,13 @@
</script>
{{/if}}
{{!-- SALE --}}
{{#if saleIndexPage}}
<script>
seajs.use('js/sale/index');
</script>
{{/if}}
{{!-- 登录注册找回密码--}}
{{#if loginPage}}
<script>
... ...
<div class="activity-entry clearfix">
{{#activityEnter}}
<a class="entry-item pull-left {{#if @first}}first{{/if}} {{#if @last}}last{{/if}}" href="link">
<img class="icon pull-left" src="{{icon}}">
<div class="entry-text">
<span class="title">{{title}}</span>
<p class="desc">{{desc}}</p>
</div>
</a>
{{/activityEnter}}
</div>
... ...
... ... @@ -3837,7 +3837,8 @@ define("js/passport/entry", ["jquery","jquery.placeholder"], function(require, e
require("js/passport/reg");
require("js/passport/back");
require("js/passport/login");
require("js/passport/reset");
require("js/passport/reset");
require("js/passport/vertification");
});
define("js/passport/reg", ["jquery"], function(require, exports, module){
/*
... ... @@ -5345,3 +5346,106 @@ $('#pwd, #repwd').keydown(function(e) {
});
});
define("js/passport/vertification", ["jquery"], function(require, exports, module){
/**
* 验证手机
* @author: xuqi<qi.xu@yoho.cn>
* @date: 2015/12/14
*/
var $ = require("jquery");
var $sc = $('#send-captcha'),
$msgTip = $('#captcha-tip'),
$errTip = $('#err-tip'),
$next = $('#next-step'),
seconds,
itime;
$sc.click(function() {
$.post('/passport/register/authcode', {
mobile: $('#mobile').val(),
area: $('#area').val(),
captcha: $('#captchaPic').val(),
project: 'repassword'
}, function(jsonData) {
if (jsonData.code === 200) {
$errTip.hide();
if ($(this).hasClass('disable')) {
return;
}
seconds = 60;
//$sc.addClass('disable').prop('disabled', true);
$sc.addClass('disable').attr('disabled', true);
$msgTip.removeClass('hide');
$sc.val(seconds-- + '秒后可重新操作');
itime = setInterval(function() {
if (seconds === 0) {
clearInterval(itime);
//$sc.val('发送验证码').removeClass('disable').prop('disabled', false);
$sc.val('发送验证码').removeClass('disable').removeAttr('disabled');
} else {
$sc.val(seconds-- + '秒后可重新操作');
}
}, 1000);
} else {
$(this).addClass('error');
$errTip.removeClass('hide').text('发送失败');
}
});
});
if ($(this).hasClass('disable')) {
return;
}
seconds = 60;
//$sc.addClass('disable').prop('disabled', true);
$sc.addClass('disable').attr('disabled', true);
$msgTip.removeClass('hide');
$sc.val(seconds-- + '秒后可重新操作');
itime = setInterval(function() {
if (seconds === 0) {
clearInterval(itime);
//$sc.val('发送验证码').removeClass('disable').prop('disabled', false);
$sc.val('发送验证码').removeClass('disable').removeAttr('disabled');
} else {
$sc.val(seconds-- + '秒后可重新操作');
}
}, 1000);
$('#captcha').keyup(function() {
var v = $.trim($(this).val());
if (v !== '') {
//添加验证码正确验证
//$next.removeClass('disable').prop('disabled', false);
$next.removeClass('disable').removeAttr('disabled');
} else {
//$next.addClass('disable').prop('disabled', true);
$next.addClass('disable').attr('disabled', true);
}
}).blur(function() {
var v = $.trim($(this).val());
if (v === '') {
//添加验证码正确验证
$(this).addClass('error');
$errTip.removeClass('hide');
} else {
$(this).removeClass('error');
$errTip.addClass('hide');
}
}).focus(function() {
$(this).removeClass('error');
});
});
... ...
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() {
}
//YAS统计代码
(function(w, d, s, j, f) {
var a = d.createElement(s);
var m = d.getElementsByTagName(s)[0];
w.YohoAcquisitionObject = f;
w[f] = function() {
w[f].p = arguments;
};
a.async = 1;
a.src = j;
m.parentNode.insertBefore(a, m);
})(window, document, 'script', 'http://cdn.yoho.cn/yas-jssdk/1.0.14/yas.js', '_yas');
//(function(w, d, s, j, f) {
// var a = d.createElement(s);
// var m = d.getElementsByTagName(s)[0];
//
// w.YohoAcquisitionObject = f;
//
// w[f] = function() {
// w[f].p = arguments;
// };
//
// a.async = 1;
// a.src = j;
// m.parentNode.insertBefore(a, m);
//})(window, document, 'script', 'http://cdn.yoho.cn/yas-jssdk/1.0.14/yas.js', '_yas');
(function() {
var uid = getUid();
... ...
... ... @@ -5,4 +5,5 @@
require('./reg');
require('./back');
require('./login');
require('./reset');
\ No newline at end of file
require('./reset');
require('./vertification');
\ No newline at end of file
... ...
/**
* 首页
* @author: bikai<kia.bi@yoho.cn>
* @date: 2016/1/18
*/
var $ = require('yoho.jquery'),
lazyLoad = require('yoho.lazyload');
require('../common/slider');
lazyLoad($('img.lazy'));
$('.slide-container').slider();
... ...
@charset "utf-8";
@import "compass",
@import "compass",
"compass/reset",
"header",
"footer",
... ... @@ -9,7 +9,7 @@
"pager";
body {
font-family: arial,"Microsoft YaHei";
font-family: arial,"Microsoft YaHei";
}
@font-face {
... ... @@ -38,10 +38,10 @@ body {
}
.clearfix:after {
clear: both;
clear: both;
}
.clearfix {
.clearfix {
*zoom: 1;
}
... ... @@ -86,4 +86,4 @@ input,textarea {
}
}
@import "home/index", "product/index", "guang/index", "passport/index", "error","order/index";
@import "home/index", "product/index", "guang/index", "passport/index", "error", "order/index", "sale/index";
... ...
.sale-page {
margin-top: 10px;
.slide-container {
position: relative;
height: 450px;
overflow: hidden;
}
.activity-entry {
margin: 10px 0;
.entry-item {
display: block;
width: 377px;
margin-right: 10px;
padding: 24px 0;
background: #f5f5f5;
&.first,
&.last {
width: 376px;
}
&.last {
margin-right: 0;
}
}
.entry-text {
padding-left: 160px;
font-size: 16px;
}
.icon {
width: 72px;
height: 72px;
margin-left: 48px;
}
.title {
font-size: 26px;
font-weight: bold;
line-height: 48px;
}
}
}
... ...
<?php
/**
* 启动运行
*
*
* @name Bootstrap
* @author fei.hong
* @desc 所有在Bootstrap类中, 以_init开头的方法, 都会被Yaf调用,
... ... @@ -54,7 +54,7 @@ class Bootstrap extends Bootstrap_Abstract
// */
// public function _initPlugin(Dispatcher $dispatcher)
// {
//
//
// }
/**
... ... @@ -77,6 +77,7 @@ class Bootstrap extends Bootstrap_Abstract
case 'www': // 主站
case 'new': // 原新版
case 'dev': // 开发环境
case 'web':
break;
case 'search': // 搜索
$searchRequest = new Yaf\Request\Http('/product/search/index');
... ... @@ -89,10 +90,10 @@ class Bootstrap extends Bootstrap_Abstract
$module = 'Product';
$url = strtolower($dispatcher->getRequest()->getRequestUri());
//list列表的index
if(empty($url) || $url == '/index') {
$listRequest = new Yaf\Request\Http('/product/list/index');
$dispatcher->setRequest($listRequest);
}
if(empty($url) || $url == '/index' || $url == '/') {
$listRequest = new Yaf\Request\Http('/product/list/index');
$dispatcher->setRequest($listRequest);
}
break;
case 'sale'://促销
$module = 'Product';
... ... @@ -135,7 +136,7 @@ class Bootstrap extends Bootstrap_Abstract
$layout = new TemplateLayout();
$layout->setScriptPath($this->_config->application->template->path);
$dispatcher->setView($layout);
//}
//}
}
// /**
... ...
... ... @@ -18,4 +18,4 @@ class LifestyleController extends WebAction
);
$this->_view->display('index', $data);
}
}
\ No newline at end of file
}
... ...
... ... @@ -79,8 +79,8 @@ class HomeModel
'is_new' => $val['is_new'] == 'Y' ? true : false,
// 'subnav' => array()
);
$index_sub = 0;
foreach ($val['sub'] as $sub) { // 二级
$index_sub = 0;
$subnav = array(
'name' => $sub['sort_name'],
'name_en' => $sub['sort_name_en'],
... ...
... ... @@ -205,6 +205,7 @@ class BackController extends WebAction {
$code = AuthCode::encode ( $str, PassportModel::BACK_FIND_SECRET_KEY );
$url = '/passport/back/backcode?code=' . base64_encode ( $code );
$this->redirect ( SITE_MAIN . $url );
return true;
}
}
//出错直接跳到找回密码页
... ...
... ... @@ -2,16 +2,57 @@
// 前端开发添加的路由,对应需求 http://redmine.yoho.cn/issues/143, 后端开发完删除
// 首页 毕凯,赵彪
// 列表页 王成龙
use Action\AbstractAction;
use Action\WebAction;
use Plugin\Helpers;
class Sale1Controller extends AbstractAction
class Sale1Controller extends WebAction
{
public function indexAction()
{
$data = array(
'salePage' => true
'saleIndexPage' => true,
'topBanner' => array(
'list' => array(
array(
'href' => 'http://www.yohobuy.com',
'img' => 'http://img11.static.yhbimg.com/yhb-img01/2015/12/23/03/01cd0659953f9f213213839c971406413c.jpg?imageView/1/w/1150/h/450'
),
array(
'href' => 'http://www.yohobuy.com',
'img' => 'http://img11.static.yhbimg.com/yhb-img01/2015/12/23/03/01c571ce38e5d6cf5a0077bd11593bbdfe.jpg?imageView/1/w/1150/h/450'
),
array(
'href' => 'http://www.yohobuy.com',
'img' => 'http://img11.static.yhbimg.com/yhb-img01/2015/12/23/03/01cd0659953f9f213213839c971406413c.jpg?imageView/1/w/1150/h/450'
),
array(
'href' => 'http://www.yohobuy.com',
'img' => 'http://img11.static.yhbimg.com/yhb-img01/2015/12/23/03/01c571ce38e5d6cf5a0077bd11593bbdfe.jpg?imageView/1/w/1150/h/450'
)
)
),
'activityEnter' => array(
array(
'icon' => '',
'title' => 'VIP会员专享',
'desc' => 'Only for VIP',
'link' => 'http://www.yohobuy.com'
),
array(
'icon' => '',
'title' => '断码区',
'desc' => 'Discount',
'link' => 'http://www.yohobuy.com'
),
array(
'icon' => '',
'title' => '最新降价',
'desc' => 'Off Price',
'link' => 'http://www.yohobuy.com'
)
)
);
$this->setWebNavHeader();
$this->_view->display('index', $data);
}
... ...