Authored by liuyue

Merge branch 'feature/supplement' into 'web'

Feature/supplement

数据结构文档补充;回到顶部按钮逻辑;页面公共底部字体
Review by:@刘玥

See merge request !85
... ... @@ -683,6 +683,265 @@
}
}
### 热销排行
{
hotrankPage: true, //引用hotrank.js
hotrank: [
{
slide: {
//大图列表
list: [
{
'href': '',
'img': ''
},
...
]
}
},
{
popular: { //人气单品
name: '', //楼层标题
list: [
{
href: '', //链接
img: '', //图片
title: '', //商品名称
price: '', //商品原价
sPrice: '', //商品现价
rank: '' //排行
}
...
]
}
}
{
hotBrands: { //同上logo品牌 ajax数据
name: '' //楼层标题
}
},
{
hotWeek: { //一周热卖
name: '' //楼层标题
nav: [ //一周热卖导航
{
textCn' => 'TOP100', //导航名称
'url' => '',
'sid' => 1 //对应ajax发送id
}
],
list: [ //同上面商品数据
{
...
}
...
]
}
}
]
}
### 商品详情页
{
detail: {
banner: {
bgColor: '',
bgImg: '',
homeUrl: '',
logo: '',
coled: true
},
pathNav: [...],
goodInfo: {
skn: '',
tags: [
{
isNew: true
},
{
isReNew: true
},
{
isSale: true
},
{
isNewFestival: true
},
{
isLimit: true
},
{
isYearEndPromotion: true
},
{
isYearMidPromotion: true
},
{
isFew: true
}
],
img: '',
name: '',
brandUrl: '',
brandName: '',
marketPrice: 999,
salePrice: 777,
activity: [
{
url: '',
activityImg: ''
},
{
type: '加价购',
des: ''
},
...
],
colors: [
{
focus: true,
disable: true,
title: '',
src: '',
thumbs: [
{
url: '',
img: '', //左侧缩略图
shower: '' //缩略图的大图显示
},
...
],
size: [
{
skn: '',
title: '',
name: ''
num: 20
}
]
}
],
coled: true,
goCartUrl: '' //去购物车结算
},
description: {
basic: [
{
key: '材质',
value: 'xxx'
},
...
],
comfort: [
{
name: '硬度',
minDes: '软',
blocks: [
{
cur: true
},
//n个等级
...
],
maxDes: ''
},
...
]
},
material: {
detail: [
{
img: '',
name: '',
enName: '',
text: ''
},
...
],
wash: [
{
img: '',
name: ''
},
...
]
},
size: {
thead: [
{
width: '130',
name: ''
},
...
],
tbody: [
[
... //每行数据
],
...
],
sizeImg: ''
},
reference: [
thead: [
{
width: '',
name: ''
},
...
],
tbody: [
[
'header-img-url', .., ..
],
...
]
],
details: '', //html
consultComment: {
consultNum: 0,
commentNum: 2,
comments: [
{
avatar: '',
userName: '',
color: '',
size: '',
date: '',
comment: ''
},
...
],
hasMoreComments: true,
commentUrl: '',
consults: [
{
avatar: '',
question: '',
date: '',
answer: ''
}
],
hasMoreConsults: true
},
recentView: [
{
url: '',
img: '',
name: '',
marketPrice: '',
salePrice: ''
},
...
]
}
}
## 逛
### 【公用】资讯
... ... @@ -930,64 +1189,4 @@
coverHref' => '/passport', //右侧封面跳转链接
coverImg' => '##', //右侧封面地址
}
}
## Product
### 热销排行
{
hotrankPage: true, //引用hotrank.js
hotrank: [
{
slide: {
//大图列表
list: [
{
'href': '',
'img': ''
},
...
]
}
},
{
popular: { //人气单品
name: '', //楼层标题
list: [
{
href: '', //链接
img: '', //图片
title: '', //商品名称
price: '', //商品原价
sPrice: '', //商品现价
rank: '' //排行
}
...
]
}
}
{
hotBrands: { //同上logo品牌 ajax数据
name: '' //楼层标题
}
},
{
hotWeek: { //一周热卖
name: '' //楼层标题
nav: [ //一周热卖导航
{
textCn' => 'TOP100', //导航名称
'url' => '',
'sid' => 1 //对应ajax发送id
}
],
list: [ //同上面商品数据
{
...
}
...
]
}
}
]
}
\ No newline at end of file
}
\ No newline at end of file
... ...
... ... @@ -5,7 +5,7 @@
<div class="brand-banner" style="background:{{bgColor}}{{#if bgImg}} url({{bgImg}}){{/if}}">
<div class="center-content clearfix">
<a class="pull-left" href="{{homeUrl}}">
<img src="{{logo}}" alt="{{alt}}">
<img src="{{logo}}">
</a>
<div class="opt pull-right">
... ... @@ -97,9 +97,9 @@
<ul class="activity">
{{#each activity}}
<li>
{{#if sizeImg}}
{{#if activityImg}}
<a class="img-link" href="{{url}}">
<img src="{{sizeImg}}">
<img src="{{activityImg}}">
</a>
{{^}}
<span class="ac-type">{{type}}</span>
... ...
... ... @@ -154,17 +154,17 @@
<div class="promise">
<div class="center-content clearfix">
<div class="left">
<span class="iconfont rgbf">g</span>
<span class="iconfont rgbf">&#xe62f;</span>
<span class="red">100%</span>
<span class="rgbf">品牌授权正品</span>
</div>
<div class="left">
<span class="iconfont rgbf">L</span>
<span class="iconfont rgbf">&#xe630;</span>
<span class="red">7天</span>
<span class="rgbf">无理由退换货</span>
</div>
<div class="left">
<span class="iconfont rgbf">p</span>
<span class="iconfont rgbf">&#xe61c;</span>
<span class="rgbf">客服电话:</span>
<span class="red">400-889-9646</span>
&nbsp;&nbsp;
... ... @@ -176,7 +176,7 @@
</div>
<div class="right subscribe footer-right">
<input id="subscriber-box" class="rgb6 top" name="subscriberBox"value="订阅我们的邮件">
<a id="subscriber-btn" href="javascript:void(0);" class="ifont rgbf">m</a>
<a id="subscriber-btn" href="javascript:void(0);" class="iconfont rgbf">&#xe61b;</a>
</div>
</div>
</div>
... ... @@ -343,7 +343,7 @@
</div>
</div>
</div>
<div class="return-top">
<div class="return-top hide">
<span class="iconfont">&#xe610;</span>
</div>
</div>
\ No newline at end of file
... ...
... ... @@ -2,7 +2,7 @@
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>
Created by FontForge 20120731 at Wed Dec 23 15:19:53 2015
Created by FontForge 20120731 at Fri Dec 25 14:41:29 2015
By Ads
</metadata>
<defs>
... ... @@ -16,10 +16,10 @@ Created by FontForge 20120731 at Wed Dec 23 15:19:53 2015
ascent="896"
descent="-128"
x-height="792"
bbox="0 -214 1172.1 864"
bbox="0 -214 1172.1 894"
underline-thickness="50"
underline-position="-100"
unicode-range="U+0078-E62E"
unicode-range="U+0078-E630"
/>
<missing-glyph horiz-adv-x="374"
d="M34 0v682h272v-682h-272zM68 34h204v614h-204v-614z" />
... ... @@ -159,5 +159,13 @@ t28.5 -4.5t28.5 -6.5t27.5 -8.5t27.5 -9.5q83 -33 149 -99v0zM258 49q53 -53 118.5 -
q-66 -26 -118 -78.5t-78.5 -118t-26.5 -134.5t26.5 -134.5t78.5 -118.5v0zM748 602l69 -72l-531 -530l-70 70zM748 602z" />
<glyph glyph-name="uniE62E" unicode="&#xe62e;" horiz-adv-x="1025"
d="M491 6q9 -10 21.5 -10t21.5 10l357 407q4 5 5.5 9.5t0 8t-6 5.5t-11.5 2h-133q-14 0 -23.5 9.5t-9.5 22.5v261q0 9 -4.5 16.5t-12.5 11.5t-17 4h-333q-14 0 -24 -9.5t-10 -22.5v-261q0 -13 -9.5 -22.5t-23.5 -9.5h-133q-14 0 -17.5 -7.5t5.5 -17.5z" />
<glyph glyph-name="uniE62F" unicode="&#xe62f;"
d="M512 809v0q-58 0 -112.5 -12t-105.5 -38t-80.5 -44t-77.5 -51v-450q0 -57 19.5 -110.5t49 -93.5t69 -76t75.5 -59.5t73.5 -43t57 -28t32.5 -12.5q13 4 32.5 12.5t57 28t73.5 43t75.5 59.5t69 76t49 93.5t19.5 110.5v450q-48 33 -77.5 51t-80.5 44t-105.5 38t-112.5 12z
M808 214q0 -76 -36.5 -138t-112.5 -117q-39 -28 -78.5 -49.5t-68.5 -32.5q-74 29 -147 82q-76 55 -112.5 117t-36.5 138v421q87 53 146.5 75t149.5 23q90 -1 149.5 -23t146.5 -75v-421zM512 671q-46 0 -81.5 -6t-67.5 -18.5t-83 -37.5v-399q0 -35 12.5 -68.5t30 -57.5
t44 -46t47 -35.5t46 -26t34 -16t18.5 -6.5q10 3 18.5 6.5t34 16t46 26t47 35.5t44 46t30 57.5t12.5 68.5v399q-74 37 -119.5 49.5t-112.5 12.5v0zM667 515v-47h-105v-67h92v-61h-92v-77h116v-57h-332v57h42v168h64v-168h46v205h-138v61h307v-14z" />
<glyph glyph-name="uniE630" unicode="&#xe630;" horiz-adv-x="1163"
d="M295 196q67 0 114 -47t47 -113.5t-47 -114t-114 -47.5t-114 47.5t-47 113.5q0 44 21.5 81t58.5 58.5t81 21.5zM917 196q67 0 114 -47t47 -114q0 -32 -12.5 -62t-34 -51.5t-51.5 -34.5t-63 -13q-66 0 -113.5 47.5t-47.5 113.5q0 79 62 127q44 34 99 34zM400 894v-99h-210
v0l-187 -294v-372h95q27 56 80 90.5t117 34.5q43 0 82 -16t68.5 -44t46.5 -65h228q27 56 80 90.5t117 34.5q22 0 43 -4.5t39.5 -12t36 -18.5t32 -25t26.5 -30.5t20 -34.5h46v765h-760zM400 452h-283l159 250l124 1v-251v0zM893 701l-131 -276l-63 31l101 206h-105v68h198
v-29v0z" />
</font>
</defs></svg>
... ...
... ... @@ -10,8 +10,6 @@ require('./footer');
require('./simple-header');
require('./header');
function cookie(name) {
var cookies = document.cookie,
cookieVal,
... ...
... ... @@ -6,6 +6,8 @@
var $ = require('yoho.jquery');
var $returnTop = $('.return-top');
var apiDomain;
/**
... ... @@ -126,6 +128,39 @@ function actionhomeFootChange() {
});
}
function rePosReturn() {
if ($(window).height() < $(document).height()) {
$returnTop.removeClass('hide');
} else {
$returnTop.addClass('hide');
}
}
//返回顶部
$returnTop.click(function() {
$('html,body').animate({
scrollTop: 0
}, 500);
});
$(window).scroll(function() {
if ($(window).scrollTop() === 0) {
$returnTop.addClass('hide');
} else {
$returnTop.removeClass('hide');
}
});
rePosReturn();
//如果初始是隐藏的,监听图片加载,重新确定return-top的高度
if ($returnTop.hasClass('hide')) {
$('img').load(rePosReturn);
}
//初始化
actionSubscription();
actionhomeFootChange();
//暴露给有可能通AJAX改变内容的页面去用
window.rePosReturnTop = rePosReturn;
... ...
... ... @@ -211,8 +211,6 @@
.footerbottom {
width: 100%;
}
.promise {
... ... @@ -224,7 +222,17 @@
line-height: 30px;
font-size: 12px;
font-weight: bold;
.iconfont {
display: inline-block;
font-weight: normal;
font-size: 24px;
vertical-align: middle;
margin-right: 5px;
line-height: 24px;
}
}
}
.subscribe {
... ... @@ -243,7 +251,7 @@
a {
margin-left: 10px;
font-size: 18px;
font-size: 20px;
line-height: 32px;
opacity: 0.5;
filter: alpha(opacity=50);
... ...
... ... @@ -51,7 +51,7 @@ class ItemController extends AbstractAction
'activity' => array(
array(
'url' => '',
'sizeImg' => 'http://img11.static.yhbimg.com/productbanner/2015/12/11/00/01ba262a2fbac23b022eeace17cf5c3685.jpg'
'activityImg' => 'http://img11.static.yhbimg.com/productbanner/2015/12/11/00/01ba262a2fbac23b022eeace17cf5c3685.jpg'
),
array(
'type' => '加价购',
... ...