Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yoho-blk
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
1
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
htoooth
9 years ago
Commit
96f48c4c55c59bbf5c7082e87102d21603e32f54
2 parents
4eb4514f
ba7cb364
Merge remote-tracking branch 'origin/release/1.0' into release/1.0
Hide whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
245 additions
and
200 deletions
apps/brand/controllers/brand.js
apps/brand/models/brand.js
apps/brand/views/action/index.hbs
apps/brand/views/partial/list.hbs
apps/editorial/controllers/editorial.js
apps/editorial/models/editorial.js
apps/editorial/views/action/detail.hbs
apps/editorial/views/action/index.hbs
apps/editorial/views/partial/article-related.hbs
apps/editorial/views/partial/msg.hbs
apps/editorial/views/partial/related-goods.hbs
apps/product/models/helpers.js
apps/product/models/shop-service.js
apps/product/views/action/shop-index.hbs
apps/product/views/partial/list/shop-menu.hbs
config/common.js
public/js/brand/index.page.js
public/js/editorial/detail.page.js
public/js/product/shop.page.js
public/scss/brand/_brand.css
public/scss/components/_pagination.css
public/scss/editorial/_detail.css
public/scss/editorial/_index.css
public/scss/editorial/_msg.css
public/scss/editorial/_related-goods.css
public/scss/product/_list.css
public/scss/product/_shop.css
public/tpl/product/shop-goods.hbs
apps/brand/controllers/brand.js
View file @
96f48c4
...
...
@@ -15,13 +15,17 @@ const brand = require('../models/brand');
const
index
=
(
req
,
res
,
next
)
=>
{
let
channel
=
req
.
cookies
.
_Channel
||
'men'
;
let
contentCode
=
''
;
let
name
=
''
;
if
(
channel
===
'women'
)
{
contentCode
=
'527079e6c46d0f125eb46b835968971b'
;
name
=
'WOMEN首页'
;
}
else
if
(
channel
===
'lifestyle'
)
{
contentCode
=
'94b5ed607b6d565ffc29c2c04be121dc'
;
name
=
'LIFT STYLE首页'
;
}
else
{
contentCode
=
'81886aaa5e82e3741bc1ba1e04ec7706'
;
name
=
'MEN首页'
;
}
let
appType
=
1
;
...
...
@@ -34,9 +38,9 @@ const index = (req, res, next) => {
brand
:
{
nav
:
[
{
link
:
'
//guang.yohobuy.com/index/index?type=0
'
,
link
:
'
www.yohobuy.com
'
,
pathTitle
:
'首页'
,
name
:
'MEN首页'
name
:
name
},
{
link
:
''
,
...
...
apps/brand/models/brand.js
View file @
96f48c4
...
...
@@ -37,6 +37,12 @@ const _processListData = (list) => {
}
else
{
listKey
.
push
(
index
);
}
// listData.push({
// key: index,
// brands: value
// });
});
listKey
.
sort
();
...
...
apps/brand/views/action/index.hbs
View file @
96f48c4
...
...
@@ -19,7 +19,7 @@
<div
class=
"brands-category"
>
<div
class=
"category-nav"
>
{{#
each
category
}}
<a
href=
"#
{{
key
}}
"
>
{{
key
}}
</a>
<a
href=
"#
{{
key
}}
"
class=
"
{{
key
}}
"
>
{{
key
}}
</a>
{{/
each
}}
</div>
</div>
...
...
apps/brand/views/partial/list.hbs
View file @
96f48c4
{{#
each
category
}}
<dl
class=
"clearfix"
name=
"
{{
key
}}
"
>
<dt>
{{
key
}}
</dt>
<dd>
<dd
class=
"brand-tabs"
>
<ul
class=
"clearfix"
>
{{#
each
brands
}}
<li>
...
...
apps/editorial/controllers/editorial.js
View file @
96f48c4
...
...
@@ -8,6 +8,7 @@
const
editorialModel
=
require
(
'../models/editorial'
);
const
md5
=
require
(
'md5'
);
/**
* 资讯首页数据
* @param req
...
...
@@ -17,12 +18,11 @@ const md5 = require('md5');
const
index
=
(
req
,
res
,
next
)
=>
{
let
pageNum
=
req
.
query
.
page
||
1
;
let
limit
=
req
.
query
.
limit
||
20
;
let
type
=
req
.
query
.
type
||
0
;
let
appType
=
1
;
// let gender = req.query.brand || 1;
editorialModel
.
getIndexData
(
type
,
pageNum
,
limit
,
appType
).
then
((
result
)
=>
{
editorialModel
.
getIndexData
(
pageNum
,
limit
,
appType
).
then
((
result
)
=>
{
// console.log(result.msg)
res
.
display
(
'index'
,
{
module
:
'editorial'
,
...
...
@@ -40,12 +40,11 @@ const index = (req, res, next) => {
name
:
'Editorial资讯'
}
],
msgTypes
:
result
.
msgTypes
,
msg
:
result
.
msg
.
tabs
,
msg
:
result
.
tabs
,
paginationOpts
:
{
page
:
pageNum
,
limit
:
20
,
total
:
result
.
msg
.
total
,
total
:
result
.
total
,
queryParams
:
req
.
query
}
},
...
...
@@ -117,7 +116,8 @@ const list = (req, res) => {
*/
const
detail
=
(
req
,
res
,
next
)
=>
{
let
id
=
req
.
params
.
id
;
let
clientType
=
'pc'
;
// let clientType = 'pc';
editorialModel
.
getDetailData
(
id
).
then
((
result
)
=>
{
res
.
display
(
'detail'
,
{
...
...
@@ -127,7 +127,7 @@ const detail = (req, res, next) => {
editorialDetail
:
{
nav
:
[
{
link
:
'
/editorial?type=0
'
,
link
:
'
#
'
,
pathTitle
:
'首页'
,
name
:
'MEN首页'
},
...
...
apps/editorial/models/editorial.js
View file @
96f48c4
...
...
@@ -16,27 +16,6 @@ const logger = global.yoho.logger;
// const helpers = global.yoho.helpers;
/**
* 资讯首页tab数据处理
* @param type
* @returns {*}
*/
const
_processNavData
=
(
list
,
type
)
=>
{
let
formatData
=
[];
list
=
list
||
[];
list
=
camelCase
(
list
);
_
.
forEach
(
list
,
(
data
,
index
)
=>
{
data
.
url
=
`
/
editorial
?
type
=
$
{
data
.
id
}
`
;
data
.
isActive
=
index
===
parseInt
(
type
,
10
);
formatData
.
push
(
data
);
});
return
formatData
;
};
/**
* 首页、列表页列表数据处理
* @param type
* @param pageNum
...
...
@@ -74,27 +53,10 @@ const _processListData = (list) => {
});
listData
.
tabs
=
list
.
list
.
artList
;
// console.log(listData)
return
listData
;
};
/**
* 资讯首页tab
* @param type
*/
const
_getResources
=
(
type
,
appType
)
=>
{
return
serviceAPI
.
get
(
'guang/api/v1/category/get'
,
{
app_type
:
appType
}).
then
((
result
)
=>
{
if
(
result
&&
result
.
code
===
200
)
{
return
_processNavData
(
result
.
data
,
type
);
}
else
{
logger
.
error
(
'Information page navigation data return code is not 200'
);
return
{};
}
});
};
/**
* 首页、列表页列表相关
...
...
@@ -103,9 +65,8 @@ const _getResources = (type, appType) => {
* @param limit
* @returns {*}
*/
const
_getBreakingSort
=
(
type
,
pageNum
,
limit
,
appType
)
=>
{
const
getIndexData
=
(
pageNum
,
limit
,
appType
)
=>
{
return
serviceAPI
.
get
(
'guang/api/*/article/getList'
,
{
sort_id
:
type
,
page
:
pageNum
,
limit
:
limit
,
app_type
:
appType
...
...
@@ -120,23 +81,6 @@ const _getBreakingSort = (type, pageNum, limit, appType) => {
};
/**
* 首页接口
* @param type
* @param pageNum
* @param limit
* @returns {*}
*/
const
getIndexData
=
(
type
,
pageNum
,
limit
,
appType
)
=>
{
return
Promise
.
all
([
_getResources
(
type
,
appType
),
_getBreakingSort
(
type
,
pageNum
,
limit
,
appType
)])
.
then
((
result
)
=>
{
return
{
msgTypes
:
result
[
0
],
msg
:
result
[
1
]
};
});
};
/**
* 列表页接口
* @param type
* @param pageNum
...
...
@@ -266,10 +210,9 @@ const _processHeadData = (list) => {
* @param id
* @returns {*}
*/
const
_getRelatedData
=
()
=>
{
// console.log(idList);
const
_getRelatedData
=
(
idList
)
=>
{
return
api
.
get
(
''
,
{
qu
rey
:
'51162882'
,
qu
ery
:
idList
,
method
:
'app.search.li'
}).
then
((
result
)
=>
{
let
productList
=
[];
...
...
@@ -277,17 +220,15 @@ const _getRelatedData = () => {
if
(
result
&&
result
.
code
===
200
)
{
_
.
forEach
(
result
.
data
.
product_list
,
function
(
data
)
{
console
.
log
(
data
.
product_name
);
// productList.push({
// name: data.product_name,
// price: data.sales_price,
// id: data.product_id,
// cnAlphabet: data.cn_alphabet
// });
productList
.
push
({
name
:
data
.
product_name
,
price
:
data
.
sales_price
,
id
:
data
.
product_id
,
cnAlphabet
:
data
.
cn_alphabet
});
});
console
.
log
(
productList
);
return
productList
;
}
else
{
logger
.
error
(
'推荐商品 cood 不是 200'
);
...
...
@@ -306,8 +247,7 @@ const _processContentData = (list) => {
list
=
camelCase
(
list
);
let
contentData
=
{
contents
:
[],
collecation
:
[]
contents
:
[]
};
_
.
forEach
(
list
,
function
(
value
)
{
...
...
@@ -327,8 +267,13 @@ const _processContentData = (list) => {
contentData
.
contents
=
list
;
let
idList
=
''
;
let
sknList
=
''
;
let
formatData
=
[];
// let recoLength = '';
let
related
=
{
relatedReco
:
[],
relatedGroup
:
[]
};
_
.
forEach
(
contentData
.
contents
,
function
(
value
)
{
...
...
@@ -337,45 +282,52 @@ const _processContentData = (list) => {
_
.
forEach
(
value
.
goods
.
data
,
function
(
data
)
{
idList
+=
data
.
id
+
','
;
// idList = '51152761';
formatData
.
push
(
data
);
related
.
relatedReco
.
push
(
data
);
});
}
//
console.log(idList)
//
recoLength = idList.length / 9;
if
(
value
.
goodsGroup
)
{
// _.forEach(value.goodsGroup.data, function(data) {
// // console.log(data)
// // _.forEach(data.list, function(value) {
// // sknList += value.id + ',';
_
.
forEach
(
value
.
goodsGroup
.
data
,
function
(
data
)
{
_
.
forEach
(
data
.
list
,
function
(
obj
)
{
idList
+=
obj
.
id
+
','
;
// // formatData.push(value
);
related
.
relatedGroup
.
push
(
obj
);
// // });
// });
});
});
}
});
// console.log(idList)
_getRelatedData
(
idList
).
then
((
result
)
=>
{
_getRelatedData
().
then
((
result
)
=>
{
// console.log(result)
if
(
related
.
relatedReco
)
{
_
.
forEach
(
related
.
relatedReco
,
function
(
data
,
index
)
{
_
.
forEach
(
formatData
,
function
(
data
,
index
)
{
// console.log(formatData)
data
=
_
.
assign
(
data
,
result
[
index
]);
data
[
index
]
=
_
.
assign
(
result
[
index
]);
});
}
});
if
(
related
.
relatedGroup
)
{
_
.
forEach
(
related
.
relatedGroup
,
function
(
data
,
index
)
{
data
=
_
.
assign
(
data
,
result
[
index
]);
});
}
// console.log(formatData)
return
formatData
;
return
related
;
}).
then
(()
=>
{
contentData
.
contents
.
push
({
related
:
related
});
return
contentData
;
});
return
contentData
;
...
...
@@ -478,6 +430,20 @@ const _getRelateBrand = (id) => {
});
};
const
_getArticlePre
=
(
id
)
=>
{
return
serviceAPI
.
get
(
'guang/api/*/article/getArticlePre'
,
{
id
:
id
}).
then
((
result
)
=>
{
if
(
result
&&
result
.
code
===
200
)
{
console
.
log
(
result
);
return
result
;
}
else
{
logger
.
error
(
'上一篇不是200'
);
return
{};
}
});
};
/**
* 资讯收藏
* @param uid
...
...
@@ -572,7 +538,6 @@ const addComment = (id, uid, comment) => {
const
shareData
=
()
=>
{
return
serviceAPI
.
get
(
'/guang/api/*/share/guang'
,
{}).
then
((
result
)
=>
{
if
(
result
&&
result
.
code
===
200
)
{
console
.
log
(
34346
);
return
camelCase
(
result
.
data
);
}
else
{
logger
.
error
(
'Related brand return code is not 200'
);
...
...
@@ -592,6 +557,7 @@ const getDetailData = (id) => {
_getArticleData
(
id
),
_getContentData
(
id
),
_getCommentsData
(
id
),
_getArticlePre
(
id
),
_getRelateBrand
(
id
)]);
let
res
=
yield
_processHeadData
([
result
[
0
],
result
[
1
],
result
[
3
]]);
...
...
apps/editorial/views/action/detail.hbs
View file @
96f48c4
...
...
@@ -42,8 +42,8 @@
</div>
{{/
text
}}
{{#
goods
}}
<div
class=
"related-reco"
>
{{#
related
}}
<div
class=
"related-reco related-collo"
>
<div
class=
"article-title"
>
<div
class=
"title-line"
></div>
<div
class=
"text-center"
>
...
...
@@ -53,16 +53,17 @@
</div>
</div>
<div
class=
"related-goods"
>
{{#
data
}}
<div
class=
"related-goods collocation"
>
{{#
relatedReco
}}
{{>
related-goods
}}
{{/
data
}}
{{/
relatedReco
}}
</div>
</div>
{{/
goods
}}
{{!-- {{# goodsGroup}}
<div class="related-reco">
{{!-- {{#if relatedGroup}} --}}
<div
class=
"related-reco related-group"
>
<div
class=
"article-title"
>
<div
class=
"title-line"
></div>
<div
class=
"text-center"
>
...
...
@@ -72,15 +73,13 @@
</div>
</div>
<div class="related-goods">
{{# data}}
{{# list}}
{{> related-goods}}
{{/ list}}
{{/ data}}
<div
class=
"related-goods goods"
>
{{#
relatedGroup
}}
{{>
related-goods
}}
{{/
relatedGroup
}}
</div>
</div>
{{/
goodsGroup}} --
}}
{{/
related
}}
{{/
content
}}
{{#if
brands
}}
...
...
apps/editorial/views/action/index.hbs
View file @
96f48c4
...
...
@@ -3,13 +3,8 @@
{{>
path-nav
}}
<div
class=
"index-content"
>
<ul
class=
"msg-nav"
>
{{#
msgTypes
}}
<li
data-type=
"
{{
id
}}
"
{{#if
isActive
}}
class=
"active"
{{/if}}
>
<a
class=
"pjax-link"
href=
"
{{
url
}}
"
>
{{
name
}}
</a>
</li>
{{/
msgTypes
}}
</ul>
<span
class=
"nav-title inline-block"
><b>
最新
</b>
资讯
</span>
<div
id=
"msg-list"
class=
"msg-list"
>
{{#
msg
}}
...
...
apps/editorial/views/partial/article-related.hbs
deleted
100644 → 0
View file @
4eb4514
<div
class=
"article-title"
>
<div
class=
"title-line"
></div>
<div
class=
"text-center"
>
<div
class=
"text"
>
<span>
{{
relatedTitle
}}
</span>
</div>
</div>
</div>
\ No newline at end of file
apps/editorial/views/partial/msg.hbs
View file @
96f48c4
<div
class=
"content-msg clearfix"
data-id=
"
{{
id
}}
"
>
<div
class=
"msg-left"
>
{{
categoryName
}}
</div>
<div
class=
"msg-left"
>
<i
class=
"iconfont"
>

</i>
<b
class=
"time-word"
>
{{
publishTime
}}
</b>
</div>
<div
class=
"msg-right"
>
<a
class=
"msg-title"
href=
"/editorial/
{{
id
}}
.html"
target=
"_blank"
>
{{
title
}}
</a>
<a
href=
"/editorial/
{{
id
}}
.html"
target=
"_blank"
>
...
...
@@ -7,10 +7,6 @@
</a>
<div
class=
"content"
>
{{
intro
}}
</div>
<div
class=
"msg-app"
>
<span
class=
"time"
>
<i
class=
"iconfont"
>

</i>
<b
class=
"time-word"
>
{{
publishTime
}}
</b>
</span>
<span
class=
"like-comment"
>
<i
class=
"iconfont like-icon
{{#if
isPraise
}}
liked
{{/if}}
"
>

</i>
<b
class=
"like-num"
>
{{
praiseNum
}}
</b>
...
...
apps/editorial/views/partial/related-goods.hbs
View file @
96f48c4
<div
class=
"good
s
-info"
data-skn=
"
{{
skn
}}
"
>
<div
class=
"good-info"
data-skn=
"
{{
skn
}}
"
>
<a
href=
"
{{
link
}}
"
target=
"_blank"
>
<img
class=
"thumb"
src=
"
{{
image
src
219
295
}}
"
>
</a>
...
...
apps/product/models/helpers.js
View file @
96f48c4
...
...
@@ -51,7 +51,7 @@ const helpers = {
let
other
=
false
;
_
.
forEach
(
brands
,
(
b
)
=>
{
let
name
=
b
.
brandNameEn
||
b
.
brandName
;
let
name
=
b
.
brand
Alif
||
b
.
brand
NameEn
||
b
.
brandName
;
let
char
=
name
.
toLowerCase
().
charAt
(
0
);
if
((
char
>=
'a'
&&
char
<=
'z'
)
||
(
char
>=
'A'
&&
char
<=
'Z'
))
{
...
...
@@ -240,6 +240,12 @@ const helpers = {
sorts
[
0
].
sub
[
0
].
checked
=
true
;
}
if
(
q
.
misort
)
{
sorts
[
0
].
sub
.
forEach
(
s
=>
{
s
.
checked
=
s
.
categoryId
===
q
.
misort
;
});
}
sorts
=
sorts
[
0
].
sub
;
}
...
...
apps/product/models/shop-service.js
View file @
96f48c4
...
...
@@ -19,14 +19,18 @@ const _ = require('lodash');
* @param domain
* @returns {*[]}
*/
function
shopMenu
(
domain
)
{
function
shopMenu
(
domain
,
customMenu
)
{
let
menus
=
[
{
id
:
'index'
,
name
:
'店铺首页'
,
href
:
`
/
product
/
shop
/
$
{
domain
}
`
},
{
id
:
'all'
,
name
:
'全部商品'
,
href
:
`
/
product
/
shop
/
$
{
domain
}
/list`, icon: ''}
,
{
id
:
'hot'
,
name
:
'人气单品'
,
href
:
`
/
product
/
shop
/
$
{
domain
}
/list
?
order=s_n_desc`}
,
{
id
:
'new'
,
name
:
'新品上架'
,
href
:
`
/
product
/
shop
/
$
{
domain
}
/list
?
order=s_t_desc`
}
{
id
:
'index'
,
name
:
'店铺首页'
,
url
:
`
/
product
/
shop
/
$
{
domain
}
`
},
{
id
:
'all'
,
name
:
'全部商品'
,
url
:
`
/
product
/
shop
/
$
{
domain
}
/list`, icon: ''}
,
{
id
:
'hot'
,
name
:
'人气单品'
,
url
:
`
/
product
/
shop
/
$
{
domain
}
/list
?
order=s_n_desc`}
,
{
id
:
'new'
,
name
:
'新品上架'
,
url
:
`
/
product
/
shop
/
$
{
domain
}
/list
?
order=s_t_desc`
}
];
if
(
customMenu
&&
customMenu
.
length
>
0
)
{
menus
=
_
.
concat
(
menus
,
customMenu
);
}
return
menus
;
}
...
...
@@ -134,10 +138,10 @@ const ShopService = {
info
.
sorts
=
sorts
;
if
(
resources
.
shopTopBanner
)
{
// eslint-disable-line
info
.
banner
=
resources
.
shopTopBanner
.
detail
Src
;
// eslint-disable-line
info
.
banner
=
resources
.
shopTopBanner
.
shop
Src
;
// eslint-disable-line
}
info
.
resources
=
resources
;
info
.
menus
=
shopMenu
(
domain
);
info
.
menus
=
shopMenu
(
domain
,
resources
.
navigationBar
);
}
else
{
let
brandId
=
domainInfo
.
id
;
let
brandInfo
=
yield
BrandService
.
getBrandInfo
(
brandId
,
uid
);
...
...
apps/product/views/action/shop-index.hbs
View file @
96f48c4
...
...
@@ -42,7 +42,7 @@
<div
class=
"goods-wrap"
>
{{#
each
newProducts
}}
<div
class=
"goods-info"
data-skn=
"
{{
productSkn
}}
"
>
<a
href=
""
target=
"_blank"
>
<a
href=
"
/product/pro_
{{
productId
}}
_
{{
goodsId
}}
/
{{
cnAlphabet
}}
.html
"
target=
"_blank"
>
<img
class=
"lazy thumb"
data-original=
"
{{
src
}}
"
style=
"display: block;"
>
</a>
<div
class=
"desc"
>
...
...
@@ -66,7 +66,7 @@
<div
class=
"goods-wrap"
>
{{#
each
hotProducts
}}
<div
class=
"goods-info"
data-skn=
"
{{
productSkn
}}
"
>
<a
href=
""
target=
"_blank"
>
<a
href=
"
/product/pro_
{{
productId
}}
_
{{
goodsId
}}
/
{{
cnAlphabet
}}
.html
"
target=
"_blank"
>
<img
class=
"lazy thumb"
data-original=
"
{{
src
}}
"
style=
"display: block;"
>
</a>
<div
class=
"desc"
>
...
...
apps/product/views/partial/list/shop-menu.hbs
View file @
96f48c4
...
...
@@ -3,7 +3,7 @@
<ul
class=
"shop-menu"
>
{{#
each
menus
}}
<li>
<a
href=
"
{{
href
}}
"
>
<a
href=
"
{{
url
}}
"
>
{{
name
}}
{{#
icon
}}
<i
class=
"iconfont"
>

</i>
...
...
config/common.js
View file @
96f48c4
...
...
@@ -22,8 +22,8 @@ module.exports = {
},
cookieDomain
:
'yohoblk.com'
,
domains
:
{
api
:
'http://devapi.yoho.cn:58078/'
,
// devapi.yoho.cn:58078 testapi.yoho.cn:28078 devapi.yoho.cn:58078
service
:
'http://devservice.yoho.cn:58077/'
,
// testservice.yoho.cn:28077 devservice.yoho.cn:58077
api
:
'http://dev-api.yohops.com:9999/'
,
// devapi.yoho.cn:58078 testapi.yoho.cn:28078 devapi.yoho.cn:58078
service
:
'http://dev-service.yohops.com:9999/'
,
// testservice.yoho.cn:28077 devservice.yoho.cn:58077
search
:
'http://192.168.102.216:8080/yohosearch/'
},
useOneapm
:
false
,
...
...
public/js/brand/index.page.js
View file @
96f48c4
...
...
@@ -45,3 +45,14 @@ $category.click(function() {
},
200
);
return
false
;
});
$
(
'.brand-tabs'
).
each
(
function
()
{
var
tab
;
if
(
$
(
this
).
find
(
'li'
).
length
===
0
)
{
tab
=
$
(
this
).
siblings
(
'dt'
).
text
();
$
(
this
).
parent
(
'dl'
).
hide
();
$
(
'.category-nav'
).
find
(
'.'
+
tab
).
hide
();
}
});
...
...
public/js/editorial/detail.page.js
View file @
96f48c4
...
...
@@ -185,3 +185,11 @@ $('#comment-info').trigger('keyup');
if
(
tag
===
0
)
{
$
(
'.article-tag'
).
hide
();
}
if
(
$
(
'.collocation'
).
find
(
'.good-info'
).
length
===
0
)
{
$
(
'.related-collo'
).
hide
();
}
if
(
$
(
'.goods'
).
find
(
'.good-info'
).
length
===
0
)
{
$
(
'.related-group'
).
hide
();
}
...
...
public/js/product/shop.page.js
View file @
96f48c4
var
lazyload
=
require
(
'yoho-jquery-lazyload'
);
var
Dialog
=
require
(
'../plugins/dialog'
).
Dialog
;
var
tplFn
=
require
(
'../../tpl/product/shop-goods.hbs'
);
require
(
'../common/header'
);
...
...
@@ -16,6 +17,11 @@ $(function() {
var
total
=
parseInt
(
$
(
'.total-page'
,
$order
).
text
(),
10
);
var
page
=
1
;
var
orderBy
;
var
infoDaialog
=
new
Dialog
({
className
:
'brand-info-dialog'
,
content
:
$
(
'.brand-info-wrapper'
).
html
(),
keep
:
true
});
function
refreshProducts
(
data
)
{
$
(
'.cur-page'
,
$order
).
text
(
page
);
...
...
@@ -35,8 +41,9 @@ $(function() {
$
(
$nextPage
).
click
(
function
()
{
if
(
!
$
(
this
).
hasClass
(
'disable'
)
&&
page
<
total
)
{
page
+=
1
;
$
.
get
(
'/product/shop/query/all'
,
{
page
:
page
++
,
page
:
page
,
shopId
:
shopId
},
function
(
data
)
{
refreshProducts
(
data
);
...
...
@@ -46,8 +53,9 @@ $(function() {
$
(
$prePage
).
click
(
function
()
{
if
(
!
$
(
this
).
hasClass
(
'disable'
)
&&
page
>
1
)
{
page
-=
1
;
$
.
get
(
'/product/shop/query/all'
,
{
page
:
page
--
,
page
:
page
,
shopId
:
shopId
},
function
(
data
)
{
refreshProducts
(
data
);
...
...
@@ -88,5 +96,12 @@ $(function() {
refreshProducts
(
data
);
});
});
$
(
'#brand-info'
).
click
(
function
()
{
infoDaialog
.
show
();
$
(
'.brand-info'
).
addClass
(
'nano'
);
$
(
'.brand-info'
).
nanoScroller
();
});
});
...
...
public/scss/brand/_brand.css
View file @
96f48c4
...
...
@@ -126,6 +126,9 @@
line-height
:
60px
;
text-align
:
center
;
font-size
:
16px
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
overflow
:
hidden
;
}
}
}
...
...
public/scss/components/_pagination.css
View file @
96f48c4
div
.blk-pagination
{
width
:
500px
;
padding
:
0
;
text-align
:
center
;
a
{
display
:
inline-block
;
...
...
public/scss/editorial/_detail.css
View file @
96f48c4
...
...
@@ -101,18 +101,35 @@
.related-goods
{
padding-top
:
60px
;
}
.goods-info
{
width
:
219px
;
margin-right
:
0
;
float
:
left
;
margin-right
:
20px
;
img
{
.good-info
{
width
:
219px
;
height
:
295px
;
float
:
left
;
margin
:
0
20px
15px
0
;
img
{
width
:
219px
;
height
:
295px
;
}
.name
{
font-size
:
12px
;
line-height
:
30px
;
height
:
30px
;
overflow
:
hidden
;
display
:
block
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
}
.price
{
display
:
block
;
line-height
:
30px
;
height
:
30px
;
text-align
:
center
;
}
}
}
.related-brand
{
...
...
@@ -431,7 +448,23 @@
}
}
.blk-pagination
{
width
:
400px
;
.good-info
{
width
:
219px
;
margin-right
:
0
;
float
:
left
;
margin-right
:
20px
;
img
{
width
:
219px
;
height
:
295px
;
}
.name
{
font-size
:
12px
;
line-height
:
30px
;
height
:
30px
;
overflow
:
hidden
;
display
:
block
;
}
}
}
...
...
public/scss/editorial/_index.css
View file @
96f48c4
.editorial-index-page
{
.msg-nav
{
height
:
40px
;
.nav-title
{
margin-top
:
35px
;
font-size
:
14px
;
font-weight
:
700
;
border-bottom
:
1px
solid
#eee
;
padding-left
:
300px
;
padding-bottom
:
5px
;
overflow
:
hidden
;
li
{
float
:
left
;
height
:
30px
;
width
:
120px
;
line-height
:
40px
;
text-align
:
center
;
font-size
:
14px
;
display
:
list-item
;
list-style-type
:
none
;
color
:
#999
;
a
{
display
:
block
;
height
:
100%
;
width
:
100%
;
text-decoration
:
none
;
color
:
#999
;
}
width
:
100%
;
height
:
30px
;
&
.active
{
a
{
color
:
#000
;
}
}
b
{
font-size
:
18px
;
margin-right
:
5px
;
}
}
...
...
@@ -44,4 +24,5 @@
@import
"msg"
;
@import
"list"
;
@import
"detail"
;
@import
"related-goods"
;
@import
"article-related"
;
...
...
public/scss/editorial/_msg.css
View file @
96f48c4
...
...
@@ -11,6 +11,7 @@
line-height
:
30px
;
text-align
:
center
;
border-bottom
:
1px
solid
#bbb
;
color
:
#a0a0a0
;
}
.msg-right
{
...
...
@@ -74,7 +75,6 @@
}
.like-comment
{
margin-left
:
40px
;
color
:
#a6a6a6
;
cursor
:
pointer
;
font-size
:
14px
;
...
...
public/scss/editorial/_related-goods.css
0 → 100644
View file @
96f48c4
.good-info
{
width
:
219px
;
margin-right
:
0
;
float
:
left
;
margin-right
:
20px
;
img
{
width
:
219px
;
height
:
295px
;
}
.name
{
font-size
:
12px
;
line-height
:
30px
;
height
:
30px
;
overflow
:
hidden
;
display
:
block
;
}
}
...
...
public/scss/product/_list.css
View file @
96f48c4
...
...
@@ -42,6 +42,9 @@
font-weight
:
700
;
margin-left
:
10px
;
display
:
inline-block
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
max-width
:
200px
;
}
.input-radio
label
.round-color
{
margin-left
:
0
;
...
...
@@ -281,6 +284,9 @@
.goods-brand
{
font-weight
:
700
;
padding
:
10px
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
}
.goods-img
{
...
...
public/scss/product/_shop.css
View file @
96f48c4
...
...
@@ -113,7 +113,7 @@
margin
:
25px
10px
;
border-width
:
1px
;
.
name
{
.
desc
{
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
...
...
public/tpl/product/shop-goods.hbs
View file @
96f48c4
...
...
@@ -5,7 +5,7 @@
</a>
<div
class=
"desc"
>
<a
class=
"name"
href=
"
{{
this
.
url
}}
"
target=
"_blank"
>
{{
productName
}}
</a>
<p
class=
"price"
>
¥
{{
salesPrice
}}
</p>
<p
class=
"price"
>
¥
{{
salesPrice
}}
</p>
</div>
</div>
{{/
each
}}
...
...
Please
register
or
login
to post a comment