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
zhangxiaoru
9 years ago
Commit
212face07714d1938528175129b03f843e2a1a4d
2 parents
8e28f684
4e8a9d54
editorial
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
57 additions
and
29 deletions
apps/product/models/item-handler.js
apps/product/views/action/item.hbs
config/common.js
public/js/plugins/upload.js
public/scss/product/_item.css
apps/product/models/item-handler.js
View file @
212face
...
...
@@ -184,7 +184,7 @@ const setSeoInfo = (goodInfo, nav) => {
* @return { Object } 面包屑导航数据
*/
const
setPathNav
=
(
data
,
name
,
channel
)
=>
{
let
resData
=
{}
;
let
navs
=
[]
;
let
link
=
channel
,
gender
;
...
...
@@ -203,11 +203,11 @@ const setPathNav = (data, name, channel) => {
break
;
}
navs
.
push
({
link
:
helpers
.
urlFormat
(
`
/
$
{
link
}
`
),
name
:
`
$
{
_
.
toUpper
(
channel
)}
首页`
});
if
(
!
_
.
isEmpty
(
data
))
{
let
navs
=
[{
link
:
helpers
.
urlFormat
(
`
/
$
{
link
}
`
),
name
:
`
$
{
_
.
toUpper
(
channel
)}
首页`
}];
let
sort
=
_
.
get
(
data
,
'sort[0]'
,
{});
if
(
!
_
.
isEmpty
(
sort
))
{
...
...
@@ -222,27 +222,27 @@ const setPathNav = (data, name, channel) => {
// 二级分类
if
(
!
_
.
isEmpty
(
sort
.
sub
))
{
let
subSort
=
sort
.
sub
[
0
];
navs
.
push
({
link
:
helpers
.
urlFormat
(
'/product/list'
,
{
msort
:
sort
.
sort_id
,
misort
:
s
ort
.
sub
.
sort_id
,
misort
:
s
ubSort
.
sort_id
,
gender
:
gender
}),
name
:
sort
.
sub
[
0
].
sort_name
,
pathTitle
:
sort
.
sub
[
0
].
sort_name
name
:
subSort
.
sort_name
,
pathTitle
:
subSort
.
sort_name
});
}
}
navs
.
push
({
name
:
name
,
pathTitle
:
name
});
resData
.
nav
=
navs
;
}
return
resData
;
navs
.
push
({
name
:
name
,
pathTitle
:
name
});
return
{
nav
:
navs
};
};
/**
...
...
apps/product/views/action/item.hbs
View file @
212face
...
...
@@ -202,7 +202,7 @@
{{#
basic
}}
<li>
<label
class=
"title"
>
{{
key
}}
<span></span></label>
:
<span
class=
"info"
>
{{
value
}}
</span>
:
<span
class=
"info"
>
{{
value
}}
</span>
</li>
{{/
basic
}}
</ul>
...
...
@@ -211,7 +211,7 @@
{{#
comfort
}}
<li>
<label
class=
"title"
>
{{
name
}}
<span></span></label>
:
<span
class=
"min-des info"
>
{{
minDes
}}
</span>
:
<span
class=
"min-des info"
>
{{
minDes
}}
</span>
{{#
blocks
}}
<span
class=
"comfort-block
{{#if
cur
}}
cur
{{/if}}
"
></span>
{{/
blocks
}}
...
...
config/common.js
View file @
212face
...
...
@@ -22,10 +22,13 @@ module.exports = {
},
cookieDomain
:
'yohoblk.com'
,
domains
:
{
// singleApi: 'http://192.168.102.31:8092/brower',
api
:
'http://testapi.yoho.cn:28078/'
,
service
:
'http://testservice.yoho.cn:28077/'
,
singleApi
:
'http://192.168.102.31:8092/'
singleApi
:
'http://192.168.102.31:8092/'
,
api
:
'http://api-test2.yohops.com:9999/'
,
service
:
'http://service-test2.yohops.com:9999/'
,
// api: 'http://api.yoho.yohoops.org/',
// service: 'http://service.yoho.yohoops.org/',
search
:
'http://192.168.102.216:8080/yohosearch/'
},
useOneapm
:
false
,
useCache
:
false
,
...
...
@@ -36,6 +39,17 @@ module.exports = {
timeout
:
1000
,
retries
:
0
},
interfaceShunt
:
{
useInterfaceShunt
:
false
,
tencentServers
:
{
api
:
[
'123.206.1.98'
,
'123.206.2.80'
],
service
:
[
'123.206.1.98'
,
'123.206.2.80'
]
},
awsServers
:
{
api
:
'app-java-168863769.cn-north-1.elb.amazonaws.com.cn'
,
service
:
'service-yoho-579825100.cn-north-1.elb.amazonaws.com.cn'
}
},
loggers
:
{
infoFile
:
{
name
:
'info'
,
...
...
@@ -103,13 +117,24 @@ if (isProduction) {
useCache
:
true
,
pay
:
{
serviceNotify
:
'http://service.yoho.cn/'
},
interfaceShunt
:
{
useInterfaceShunt
:
false
,
tencentServers
:
{
api
:
[
'123.206.1.98'
,
'123.206.2.80'
],
service
:
[
'123.206.1.98'
,
'123.206.2.80'
]
},
awsServers
:
{
api
:
'app-java-168863769.cn-north-1.elb.amazonaws.com.cn'
,
service
:
'service-yoho-579825100.cn-north-1.elb.amazonaws.com.cn'
}
}
});
}
else
if
(
isTest
)
{
Object
.
assign
(
module
.
exports
,
{
appName
:
'www.yohoblk.com for test'
,
domains
:
{
singleApi
:
'http://192.168.102.31:8092/
brower
'
,
singleApi
:
'http://192.168.102.31:8092/'
,
api
:
'http://testapi.yoho.cn:28078/'
,
service
:
'http://testservice.yoho.cn:28077/'
,
search
:
'http://192.168.102.216:8080/yohosearch/'
...
...
public/js/plugins/upload.js
View file @
212face
...
...
@@ -48,6 +48,7 @@ function getResponse(cb) {
if
(
num
>
20
||
res
)
{
uping
=
false
;
$filename
.
val
(
''
);
clearInterval
(
inter
);
}
...
...
@@ -63,9 +64,11 @@ function getResponse(cb) {
}
$filename
.
change
(
function
()
{
uping
=
true
;
$upload
.
submit
();
getResponse
(
callback
);
if
(
$
(
this
).
val
())
{
uping
=
true
;
$upload
.
submit
();
getResponse
(
callback
);
}
});
exports
.
up
=
up
;
...
...
public/scss/product/_item.css
View file @
212face
...
...
@@ -317,7 +317,7 @@
height
:
12px
;
border
:
1px
solid
#1d1d1d
;
display
:
inline-block
;
margin
:
0
4
px
;
margin
:
0
3
px
;
position
:
relative
;
top
:
1px
;
}
...
...
@@ -428,7 +428,7 @@
}
img
{
margin-top
:
-
7
px
;
margin-top
:
-
5
px
;
display
:
inline-block
;
border
:
1px
solid
#fff
;
border-radius
:
50%
;
...
...
@@ -477,7 +477,7 @@
.cn
{
font-size
:
14px
;
line-height
:
24px
;
line-height
:
24px
;
}
.en
{
...
...
Please
register
or
login
to post a comment