Authored by uedxwg

页面通用导航,帮助中心

/**
H/**
* 页面公共逻辑
* @author: xuqi<qi.xu@yoho.cn>
* @date: 2015/10/21
*/
var $ = require('jquery');
var $footer = $('#yoho-footer'),
var $ = require('jquery'),
$footer = $('#yoho-footer'),
$header = $('.yoho-header');
function cookie(name) {
... ... @@ -176,6 +175,10 @@ $header.on('touchstart', 'a', function() {
$(this).removeClass('highlight');
});
$('.nav-home').on('touchstart', function() {
$('.homebuttom').toggleClass('none');
});
(function() {
var lastTime = 0,
prefixes = 'webkit moz ms o'.split(' '),
... ...
... ... @@ -124,3 +124,43 @@
}
}
}
.homebuttom{
display: block;
width: 100%;
height: 90rem / $pxConvertRem;
overflow: hidden;
@include background-image(linear-gradient(#323232, #414141));
border-top: 1px solid #444;
color: #fff;
// position: absolute;
// top: 90rem / $pxConvertRem;
// left: 0;
// z-index: 10;
ul{
width: 100%;
height: 90%;
overflow: hidden;
padding-top: 12rem / $pxConvertRem;
li{
width: 25%;
height: 100%;
overflow: hidden;
float: left;
text-align: center;
i{
width: 100%;
height: 40%;
overflow: hidden;
display: block;
}
span{
width: 100%;
height: auto;
overflow: hidden;
display: block;
line-height: 40rem / $pxConvertRem;
}
}
}
}
\ No newline at end of file
... ...
... ... @@ -2,28 +2,6 @@
width: 100%;
height: auto;
overflow: hidden;
.helpSearch{
width: 90%;
height: 84rem / $pxConvertRem;
overflow: hidden;
position: relative;
margin: 0 auto;
input{
width: 100%;
height: 100%;
overflow: hidden;
border:none;
font-size: 54em / $pxConvertRem;
}
i{
height: 100%;
line-height: 88rem / $pxConvertRem;
position: absolute;
right: 20rem / $pxConvertRem;
top: 0;
color: #e0e0e0;
}
}
ul{
width: 100%;
height: auto;
... ... @@ -31,7 +9,7 @@
display: block;
border-top: 1px solid #e0e0e0;
li{
width: 95%;
width: 100%;
height: 80rem / $pxConvertRem;
line-height: 84rem / $pxConvertRem;
overflow: hidden;
... ... @@ -43,10 +21,11 @@
border-bottom:none;
}
span{
width: 88%;
width: 85%;
height: 100%;
overflow: hidden;
float: left;
padding-left: 5%;
}
i{
color: #e0e0e0;
... ...
{{> layout/header}}
<div class="iHelp">
<div class="helpSearch">
<input type="text" placeholder="查找关键字">
<i class="iconfont">&#xe60f;</i>
</div>
<ul>
{{# iHelp}}
<li><a href="{{ url }}"><span>{{ name }}</span><i class="iconfont num">&#xe604;</i></a></li>
... ...
... ... @@ -49,4 +49,4 @@
<span>X</span>
</div>
{{/if}}
{{> layout/page_header}}
\ No newline at end of file
{{> layout/page_header}}
\ No newline at end of file
... ...
... ... @@ -4,13 +4,34 @@
<a href="{{#if backUrl}}{{backUrl}}{{^}}javascript:history.go(-1);{{/if}}" class="iconfont nav-back">&#xe610;</a>
{{/navBack}}
{{#navHome}}
<a href="{{.}}" class="iconfont nav-home">&#xe611;</a>
<a class="iconfont nav-home">&#xe611;</a>
{{/navHome}}
{{#navTitle}}
<p class="nav-title">{{.}}</p>
{{/navTitle}}
{{# navBtn}}
<span class="nav-btn">{{.}}</span>
<!-- <span class="nav-btn">{{.}}</span> -->
<i class="iconfont nav-home">&#xe638;</i>
{{/ navBtn}}
</header>
<div class="homebuttom none">
<ul>
<li>
<i class="iconfont">&#xe62e;</i>
<span>首页</span>
</li>
<li>
<i class="iconfont">&#xe62e;</i>
<span>分类</span>
</li>
<li>
<i class="iconfont">&#xe62e;</i>
<span>购物车</span>
</li>
<li>
<i class="iconfont">&#xe62e;</i>
<span>我的</span>
</li>
</ul>
</div>
{{/pageHeader}}
\ No newline at end of file
... ...
... ... @@ -41,7 +41,7 @@ class HomeController extends AbstractAction
{
// 设置网站标题
$this->setTitle('个人中心');
$this->setNavHeader('个人中心', SITE_MAIN . '/?go=1');
$this->setNavHeader('个人中心', SITE_MAIN . '/?go=1', '', true);
$data = array(
'myIndexPage' => true,
... ... @@ -871,18 +871,18 @@ class HomeController extends AbstractAction
$this->_view->display('order-detail', array('orderDetail' => $data, 'orderDetailPage' => true));
}
// /**
// * 帮助列表页
// */
// public function helpAction()
// {
// $this->setTitle('帮助中心');
// $this->setNavHeader('帮助中心');
// $data = array(
// 'iHelp' => array(
// array('name' => '新用户注册', 'url' => 'http://m.dev.yohobuy.com/'),
// )
// );
// $this->_view->display('i-help', $data);
// }
/**
* 帮助列表页
*/
public function helpAction()
{
$this->setTitle('帮助中心');
$this->setNavHeader('帮助中心');
$data = array(
'iHelp' => array(
array('name' => '新用户注册', 'url' => 'http://m.dev.yohobuy.com/'),
)
);
$this->_view->display('i-help', $data);
}
}
... ...