Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuywap-node
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
李靖
8 years ago
Commit
17cfaa9e1f95207e06eccb8883d336d40372cbcc
1 parent
a7d4be19
模版化,按钮优化等
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
19 additions
and
23 deletions
apps/guang/views/partial/good.hbs
apps/product/models/search.js
apps/product/models/similar.js
apps/product/views/action/similar/index.hbs
doraemon/views/partial/common/goods.hbs
doraemon/views/partial/common/similar.hbs
doraemon/views/partial/product/recommend-goods.hbs
public/js/common.js
public/scss/common/_good.css
apps/guang/views/partial/good.hbs
View file @
17cfaa9
...
...
@@ -35,10 +35,7 @@
<p
class=
"out-tag"
>
已售罄
</p>
{{/
is_solded
}}
{{#if
similar
}}
<div
class=
"similar-c"
>
<div
class=
"bg"
></div>
<a
href=
"//m.yohobuy.com/product/similar?skn=
{{
id
}}
"
>
找相似
</a>
</div>
{{>
common
/
similar
}}
{{/if}}
</div>
<div
class=
"good-detail-text"
>
...
...
apps/product/models/search.js
View file @
17cfaa9
...
...
@@ -302,9 +302,7 @@ const getSearchData = (params) => {
const
getFilterData
=
(
params
)
=>
{
return
_searchGoods
(
params
).
then
((
result
)
=>
{
if
(
result
&&
result
.
code
===
200
)
{
return
productProcess
.
processFilter
(
result
.
data
.
filter
||
[],
{
showSimilar
:
true
});
return
productProcess
.
processFilter
(
result
.
data
.
filter
||
[]);
}
else
{
logger
.
error
(
'get filter data api return code is not 200'
);
return
[];
...
...
apps/product/models/similar.js
View file @
17cfaa9
...
...
@@ -4,7 +4,7 @@ const utils = '../../../utils';
const
_
=
require
(
'lodash'
);
const
productProcess
=
require
(
`
$
{
utils
}
/product-process`
)
;
module
.
exports
=
class
extends
global
.
yoho
.
BaseModel
{
class
SimilarModel
extends
global
.
yoho
.
BaseModel
{
constructor
(
ctx
)
{
super
(
ctx
);
}
...
...
@@ -37,4 +37,7 @@ module.exports = class extends global.yoho.BaseModel {
return
resu
;
});
}
};
}
module
.
exports
=
SimilarModel
;
...
...
apps/product/views/action/similar/index.hbs
View file @
17cfaa9
...
...
@@ -58,7 +58,7 @@
<span
class=
"old"
>
¥
{{
round
.
}}
</span>
{{/
market_price
}}
</div>
<a
class=
"btn"
href=
"/
/m.yohobuy.com/
product/similar?skn=
{{
product_skn
}}
"
>
找相似
</a>
<a
class=
"btn"
href=
"/product/similar?skn=
{{
product_skn
}}
"
>
找相似
</a>
</div>
</div>
{{/
list
}}
...
...
doraemon/views/partial/common/goods.hbs
View file @
17cfaa9
...
...
@@ -53,10 +53,7 @@
</div>
{{/ noStorage}} --}}
{{#if
similar
}}
<div
class=
"similar-c"
>
<div
class=
"bg"
></div>
<a
href=
"//m.yohobuy.com/product/similar?skn=
{{
product_skn
}}
"
>
找相似
</a>
</div>
{{>
common
/
similar
}}
{{/if}}
</div>
<div
class=
"good-detail-text"
>
...
...
doraemon/views/partial/common/similar.hbs
0 → 100644
View file @
17cfaa9
<div
class=
"similar-c"
>
<div
class=
"bg"
></div>
<a
href=
"/product/similar?skn=
{{
product_skn
}}
"
>
找相似
</a>
</div>
\ No newline at end of file
...
...
doraemon/views/partial/product/recommend-goods.hbs
View file @
17cfaa9
...
...
@@ -72,10 +72,7 @@
</div>
{{/ noStorage}} --}}
{{#if
similar
}}
<div
class=
"similar-c"
>
<div
class=
"bg"
></div>
<a
href=
"//m.yohobuy.com/product/similar?skn=
{{
product_skn
}}
"
>
找相似
</a>
</div>
{{>
common
/
similar
}}
{{/if}}
</div>
<div
class=
"good-detail-text"
>
...
...
public/js/common.js
View file @
17cfaa9
...
...
@@ -303,7 +303,7 @@ $('.nav-home').on('touchstart', function() {
});
// 商品列表找相似按钮
$
(
'
*
'
).
on
(
'touchstart'
,
'.similar-btn'
,
function
()
{
$
(
'
body
'
).
on
(
'touchstart'
,
'.similar-btn'
,
function
()
{
let
$thisP
=
$
(
this
).
parents
(
'.good-info'
);
$thisP
.
find
(
'.similar-c'
).
toggle
();
...
...
public/scss/common/_good.css
View file @
17cfaa9
...
...
@@ -275,12 +275,12 @@
.similar-btn
{
color
:
#b0b0b0
;
width
:
40px
;
height
:
40px
;
line-height
:
40px
;
width
:
50px
;
height
:
80px
;
line-height
:
100px
;
text-align
:
center
;
position
:
absolute
;
bottom
:
-
1
0px
;
bottom
:
-
2
0px
;
right
:
0
;
font-weight
:
bold
;
}
...
...
Please
register
or
login
to post a comment