Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
2
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
biao
9 years ago
Commit
e1bf1ba2de77d25c56d8b325cf9abe502885c4fa
1 parent
82095c65
更新频道选择页顶部导航
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
35 additions
and
44 deletions
static/js/category/brand.js
static/js/home/home.js
static/js/home/maybe-like.js
static/js/me/currency-new.js
template/m.yohobuy.com/actions/category/brand/index.phtml
template/m.yohobuy.com/partials/home/top_nav.phtml
yohobuy/m.yohobuy.com/application/models/Category/Brand.php
static/js/category/brand.js
View file @
e1bf1ba
...
...
@@ -183,5 +183,6 @@ if ($genderItem.length > 0) {
$genderItem
.
on
(
'touchstart'
,
function
()
{
$
(
'.genderNav ul .active'
).
removeClass
(
'active'
);
$
(
this
).
addClass
(
'active'
);
window
.
location
.
search
=
"channel="
+
(
$
(
this
).
data
(
'id'
)
+
1
);
});
}
...
...
static/js/home/home.js
View file @
e1bf1ba
...
...
@@ -189,7 +189,7 @@ window.reMarginFooter('.footer-tab');
exports
.
set
=
function
(
c
)
{
window
.
setCookie
(
'_Channel'
,
c
,
{
expires
:
365
,
domain
:
'.
m
.yohobuy.com'
domain
:
'.
dev
.yohobuy.com'
});
};
...
...
static/js/home/maybe-like.js
View file @
e1bf1ba
...
...
@@ -21,8 +21,8 @@ module.exports = function(specificGender) {
url
;
//The kidsType can be specified by the parameter. Add by @ZhaoBiao
var
kidsType
=
specificGender
===
'kidsType'
||
$
(
'.mobile-wrap'
).
hasClass
(
'kids-wrap'
)
?
true
:
false
,
lifestyleType
=
specificGender
===
'lifestyleType'
||
var
kidsType
=
specificGender
===
'kids'
||
$
(
'.mobile-wrap'
).
hasClass
(
'kids-wrap'
)
?
true
:
false
,
lifestyleType
=
specificGender
===
'lifestyle'
||
$
(
'.mobile-wrap'
).
hasClass
(
'lifestyle-wrap'
)
?
true
:
false
;
var
$curNav
,
...
...
@@ -148,6 +148,11 @@ module.exports = function(specificGender) {
}
}
// 优惠券页面直接加载你可能喜欢。add by @zhaobiao
if
(
specificGender
)
{
search
();
}
//srcoll to load more
$
(
window
).
scroll
(
function
()
{
window
.
requestAnimationFrame
(
scrollHandler
);
...
...
static/js/me/currency-new.js
View file @
e1bf1ba
...
...
@@ -4,13 +4,9 @@
* @date: 2015/12/30
*/
//var $ = require('jquery');
//
//function getGender () {
// // body...
//}
function
getGender
()
{
return
window
.
cookie
(
'_Channel'
);
}
require
(
'../home/maybe-like'
)();
require
(
'../home/maybe-like'
)(
getGender
());
...
...
template/m.yohobuy.com/actions/category/brand/index.phtml
View file @
e1bf1ba
...
...
@@ -2,7 +2,16 @@
<div
class=
"brand-page yoho-page"
>
{
{#
channel
}
}
{
{>
home/top_nav
}
}
<div
class=
"genderNav"
>
<ul>
{
{#
channels
}
}
<li
{
{#if
active
}
}class=
"active"
{
{/if
}
}
data-id=
"{{@index}}"
>
<span>
{
{name
}
}</span>
<span
class=
"split-border"
></span>
</li>
{
{/channels
}
}
</ul>
</div>
<div
class=
"newbrand-search re-pos-search"
>
<div
class=
"search-box clearfix"
>
...
...
template/m.yohobuy.com/partials/home/top_nav.phtml
deleted
100644 → 0
View file @
82095c6
<div class="genderNav">
<ul>
<li class="active">
<span>Boy</span>
<span class="split-border"></span>
</li>
<li>
<span>Girl</span>
<span class="split-border"></span>
</li>
<li>
<span>Kid</span>
<span class="split-border"></span>
</li>
<li>
<span>Lifestyle</span>
<span class="split-border"></span>
</li>
</ul>
</div>
yohobuy/m.yohobuy.com/application/models/Category/Brand.php
View file @
e1bf1ba
...
...
@@ -8,7 +8,7 @@ use Plugin\Helpers;
/**
* 品牌相关的模板数据模型
*
*
* @name BrandModel
* @package Models/Category
* @copyright yoho.inc
...
...
@@ -29,7 +29,7 @@ class BrandModel
/**
* 根据频道获取品牌一览数据
*
*
* @param int $channel 1表示男生频道, 2表示女生频道, 3表示潮童频道, 4表示创意生活频道
* @return array
*/
...
...
@@ -40,20 +40,20 @@ class BrandModel
// 设置品牌一览顶部频道导航
$channels
=
array
(
1
=>
array
(
'name'
=>
'Boy'
array
(
'name'
=>
'Boy'
),
2
=>
array
(
'name'
=>
'Girl'
array
(
'name'
=>
'Girl'
),
3
=>
array
(
'name'
=>
'Kid'
array
(
'name'
=>
'Kid'
),
4
=>
array
(
'name'
=>
'Lifestyle'
array
(
'name'
=>
'Lifestyle'
)
);
$channels
[
$channel
][
'active'
]
=
true
;
$channels
[
$channel
-
1
][
'active'
]
=
true
;
$result
[
'channels'
]
=
$channels
;
/* 根据频道调用接口 */
...
...
@@ -109,7 +109,7 @@ class BrandModel
/**
* 获取搜索的品牌列表
*
*
* @param int $channel 1表示男生频道, 2表示女生频道, 3表示潮童频道, 4表示创意生活频道
* @return array
*/
...
...
Please
register
or
login
to post a comment