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
yyq
9 years ago
Commit
65384b17a651ee09beef398166014a3725fd785c
2 parents
956ec7f0
3dc8d089
Merge branch 'release/1.0' of git.yoho.cn:fe/yoho-blk into release/1.0
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
56 additions
and
34 deletions
apps/editorial/models/editorial.js
apps/product/controllers/list.js
apps/product/models/search.js
apps/product/models/shop-service.js
apps/product/views/partial/list/filter.hbs
config/common.js
public/js/editorial/detail.page.js
public/js/product/list/list-search.js
public/js/shopping/order.page.js
public/scss/product/_list.css
apps/editorial/models/editorial.js
View file @
65384b1
...
...
@@ -160,7 +160,7 @@ const _processHeadData = (list) => {
isLike
:
data
.
isPraise
,
isCollected
:
data
.
isFavor
,
likeNum
:
data
.
praiseNum
,
weixinUrl
:
`
http
:
//
guang.m.yohobuy.com/info/index?id=${data.id}
`
weixinUrl
:
`
http
:
//
m.yohoblk.com/${data.id}.html
`
};
}
...
...
@@ -229,6 +229,7 @@ const _getRelatedData = (idList) => {
productSkn
:
data
.
product_skn
});
});
return
productList
;
}
else
{
logger
.
error
(
'推荐商品 cood 不是 200'
);
...
...
@@ -358,7 +359,6 @@ const _processContentData = (list) => {
delete
related
.
relatedGroup
[
key
];
}
});
}
...
...
apps/product/controllers/list.js
View file @
65384b1
...
...
@@ -103,8 +103,9 @@ const list = {
data
.
filter
.
groupSort
=
DataHelper
.
sortConvert
(
sortData
.
data
.
sort
);
retData
.
filter
=
DataHelper
.
filterHandle
(
data
.
filter
,
q
);
retData
.
filter
.
showPrice
=
data
.
total
>
10
;
retData
.
filter
.
showInfo
=
(
retData
.
filter
.
style
&&
retData
.
filter
.
style
.
length
>
0
)
||
(
data
.
standard
&&
data
.
standard
.
length
>
0
);
//eslint-disable-line
// retData.filter.showInfo = (retData.filter.style && retData.filter.style.length > 0)
// || (data.standard && data.standard.length > 0); //eslint-disable-line
}
retData
.
navPath
=
{
...
...
apps/product/models/search.js
View file @
65384b1
...
...
@@ -35,24 +35,24 @@ function _paramHanlde(obj) {
// obj.standard = JSON.stringify(standards);
// }
let
_gender
;
if
(
obj
.
yh_channel
)
{
switch
(
obj
.
yh_channel
)
{
case
'men'
:
_gender
=
'1,3'
;
break
;
case
'women'
:
_gender
=
'2,3'
;
break
;
default
:
break
;
}
}
// let _gender;
//
// if (obj.yh_channel) {
// switch (obj.yh_channel) {
// case 'men':
// _gender = '1,3';
// break;
// case 'women':
// _gender = '2,3';
// break;
// default:
// break;
// }
// }
if
(
obj
.
gender
||
_gender
)
{
obj
.
gender
=
obj
.
gender
||
_gender
;
}
// if (obj.gender || _gender) {
// obj.gender = obj.gender || _gender;
// }
return
obj
;
}
...
...
apps/product/models/shop-service.js
View file @
65384b1
...
...
@@ -157,15 +157,16 @@ const ShopService = {
}
info
.
resources
=
resources
;
info
.
menus
=
shopMenu
(
domain
,
resources
.
navigationBar
);
}
else
{
}
if
(
info
.
brandId
)
{
let
brandInfo
=
yield
BrandService
.
getBrandInfo
(
info
.
brandId
,
uid
);
info
.
name
=
brandInfo
.
brandName
;
info
.
name
=
info
.
name
||
brandInfo
.
brandName
;
// info.info = brandInfo.brandIntro;
info
.
btnName
=
'品牌介绍'
;
info
.
isFavorite
=
brandInfo
.
isFavorite
===
'Y'
;
info
.
banner
=
info
.
brandBanner
;
info
.
isFavorite
=
info
.
isFavorite
||
(
brandInfo
.
isFavorite
===
'Y'
);
info
.
banner
=
info
.
banner
||
info
.
brandBanner
;
}
return
info
;
})();
...
...
apps/product/views/partial/list/filter.hbs
View file @
65384b1
...
...
@@ -171,7 +171,7 @@
<div
class=
"style-body nano"
>
<div
class=
"nano-content"
>
{{#
each
style
}}
<div
class=
"input-radio"
data-value=
"
{{
styleId
}}
"
>
<div
class=
"input-radio
{{#if
checked
}}
default-check
{{/if}}
"
data-value=
"
{{
styleId
}}
"
>
{{>
icon
/
radio
}}
<label>
{{
styleName
}}
</label>
</div>
...
...
config/common.js
View file @
65384b1
...
...
@@ -48,7 +48,8 @@ module.exports = {
name
:
'error'
,
level
:
'error'
,
filename
:
'logs/error.log'
,
handleExceptions
:
true
handleExceptions
:
true
,
maxFiles
:
7
},
udp
:
{
// send by udp
measurement
:
'yohoblk_pc_log'
,
...
...
@@ -110,10 +111,10 @@ if (isProduction) {
Object
.
assign
(
module
.
exports
,
{
appName
:
'www.yohoblk.com for test'
,
domains
:
{
singleApi
:
'http://192.168.102.31:8092/brower'
,
singleApi
:
process
.
env
.
TEST_SINGLEAPI
||
'http://192.168.102.31:8092/brower'
,
api
:
process
.
env
.
TEST_API
||
'http://testapi.yoho.cn:28078/'
,
service
:
process
.
env
.
TEST_SERVICE
||
'http://testservice.yoho.cn:28077/'
,
search
:
'http://192.168.102.216:8080/yohosearch/'
search
:
process
.
env
.
TEST_SEARCH
||
'http://192.168.102.216:8080/yohosearch/'
},
useOneapm
:
true
,
useCache
:
true
,
...
...
public/js/editorial/detail.page.js
View file @
65384b1
...
...
@@ -254,3 +254,12 @@ if ($('.chapter-right').find('a').text() === '') {
}
$
(
'.comments-list'
).
find
(
'li:last'
).
css
(
'border-bottom'
,
'none'
);
// $('.good-info').find('.price')
$
(
'.good-info'
).
each
(
function
()
{
var
$this
=
$
(
this
).
find
(
'.price'
);
if
(
$this
.
text
().
indexOf
(
'.'
)
<
0
)
{
$this
.
html
(
$this
.
text
()
+
'.00'
);
}
});
...
...
public/js/product/list/list-search.js
View file @
65384b1
...
...
@@ -342,6 +342,10 @@ var YohoListPage = {
$
(
'.style-body .input-radio'
,
this
.
rootDoc
).
check
({
type
:
'radio'
});
$
(
'.style-body .input-radio.default-check'
,
this
.
rootDoc
).
check
({
type
:
'radio'
,
checked
:
true
});
YohoListPage
.
mulitStyle
=
false
;
$
(
'.style-mulit-btn .btn'
).
addClass
(
'white'
);
},
...
...
@@ -357,6 +361,7 @@ var YohoListPage = {
filterBrand
:
function
(
letter
)
{
$
(
'.yoho-product-list .brand-list .input-radio'
).
each
(
function
()
{
var
first
=
$
(
this
).
data
(
'word'
).
toString
();
// eslint-disable-line
var
name
=
$
(
this
).
find
(
'label'
).
text
().
toLowerCase
();
first
=
first
.
toLowerCase
();
if
(
letter
===
'0-9'
)
{
...
...
@@ -366,7 +371,7 @@ var YohoListPage = {
$
(
this
).
show
();
}
}
else
{
if
(
!
letter
||
first
===
letter
)
{
if
(
!
letter
||
first
===
letter
||
name
.
indexOf
(
letter
)
===
0
)
{
$
(
this
).
show
();
}
else
{
$
(
this
).
hide
();
...
...
@@ -449,7 +454,7 @@ var YohoListPage = {
},
go
:
function
(
q
)
{
var
qs
=
$
.
extend
(
common
.
queryString
(),
q
);
var
qs
=
$
.
extend
(
common
.
queryString
(),
q
,
{
page
:
q
.
page
||
1
}
);
location
.
search
=
$
.
param
(
qs
);
},
...
...
public/js/shopping/order.page.js
View file @
65384b1
...
...
@@ -37,6 +37,8 @@ var balanceTpl = require('../../tpl/shopping/balance.hbs');
var
pkgCache
=
{};
var
suredCoin
=
0
;
var
$pkgList
;
require
(
'yoho-jquery-placeholder'
);
...
...
@@ -218,8 +220,10 @@ $coinSure.click(function() {
return
;
}
suredCoin
=
getCoinUsed
();
// 切换显示
compute
(
getCoinUsed
()
);
compute
(
suredCoin
);
toggleCoinPanel
();
});
...
...
@@ -257,7 +261,7 @@ $('.print-price-radio').check({
$
(
'#balance-list'
).
on
(
'click'
,
'#submit-order'
,
function
()
{
var
reqParam
=
{
address_id
:
$
(
'.address.focus'
).
data
(
'id'
),
use_yoho_coin
:
getCoinUsed
()
,
use_yoho_coin
:
suredCoin
,
remark
:
$
(
'#remark-content'
).
val
(),
isPrintPrice
:
$printPrice
.
printPrice
};
...
...
public/scss/product/_list.css
View file @
65384b1
...
...
@@ -385,13 +385,14 @@
}
.goods-img-list
{
margin
:
2px
10px
;
margin
:
2px
0
2px
10px
;
float
:
left
;
.goods-img-col
{
display
:
inline-block
;
vertical-align
:
top
;
width
:
60px
;
margin-right
:
10px
;
}
img
{
...
...
Please
register
or
login
to post a comment