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
789628333a36e00068decc0ccace5b78a2ae92ff
1 parent
301510b6
图片高宽
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
10 deletions
apps/mip/css/guang/detail.css
apps/mip/views/action/guang/detail.hbs
utils/guang-process.js
apps/mip/css/guang/detail.css
View file @
7896283
...
...
@@ -57,13 +57,17 @@
background-color
:
#fff
;
float
:
left
;
margin-bottom
:
20px
;
box-sizing
:
border-box
;
width
:
100%
;
}
.guang-content
p
{
padding
:
5px
0
;
}
.guang-content
.pic
{
clear
:
both
;
width
:
100%
;
margin
:
0
auto
;
display
:
block
;
max-width
:
100%
;
}
.related-goods
{
float
:
left
;
...
...
apps/mip/views/action/guang/detail.hbs
View file @
7896283
...
...
@@ -3,7 +3,7 @@
{{#
author
}}
<div
class=
"editor-info"
data-id=
{{
id
}}
>
<mip-link
href=
{{
url
}}
>
<mip-img
class=
"pic"
src=
{{
image2
avatar
mode
=
2
q
=
60
}}
>
<mip-img
class=
"pic"
width=
"45"
height=
"45"
src=
{{
image2
avatar
mode
=
2
q
=
60
}}
>
</mip-img
>
<div
class=
"name"
>
{{
name
}}
</div>
<div
class=
"intro"
>
{{
intro
}}
</div>
...
...
@@ -25,9 +25,9 @@
{{#if
bigImage
}}
<div
class=
"big-pic"
>
{{#if
isGif
}}
<mip-anim
class=
"pic"
src=
"
{{
image2
bigImage
q
=
60
}}
"
></mip-anim>
<mip-anim
class=
"pic"
width=
"
{{
width
}}
"
height=
"
{{
height
}}
"
src=
"
{{
image2
bigImage
q
=
60
}}
"
></mip-anim>
{{else}}
<mip-img
class=
"pic"
src=
"
{{
image2
bigImage
q
=
60
}}
"
></mip-img>
<mip-img
class=
"pic"
width=
"
{{
width
}}
"
height=
"
{{
height
}}
"
src=
"
{{
image2
bigImage
q
=
60
}}
"
></mip-img>
{{/if}}
{{#if
tagList
}}
<div
class=
"tag-list-box"
>
...
...
@@ -53,9 +53,9 @@
<div
class=
"small-pic"
>
{{#
smallImage
}}
{{#if
isGif
}}
<mip-anim
class=
"pic"
src=
"
{{
image2
src
q
=
60
}}
"
></mip-anim>
<mip-anim
class=
"pic"
width=
"160"
height=
"160"
src=
"
{{
image2
src
q
=
60
}}
"
></mip-anim>
{{else}}
<mip-img
class=
"pic"
src=
"
{{
image2
src
q
=
60
}}
"
></mip-img>
<mip-img
class=
"pic"
width=
"160"
height=
"160"
src=
"
{{
image2
src
q
=
60
}}
"
></mip-img>
{{/if}}
{{/
smallImage
}}
</div>
...
...
@@ -95,7 +95,7 @@
{{#
each
recommendProducts
}}
<div
class=
"good-item"
>
<mip-link
href=
"
{{
href
}}
"
>
<mip-img
class=
"pic"
src=
"
{{
image2
pic_url
w
=
152
h
=
204
}}
"
>
<mip-img
class=
"pic"
width=
"100"
height=
"134"
src=
"
{{
image2
pic_url
w
=
152
h
=
204
}}
"
>
</mip-img>
</mip-link>
<p
class=
"price"
>
¥
{{
price
}}
</p>
...
...
utils/guang-process.js
View file @
7896283
...
...
@@ -248,7 +248,9 @@ const processArticleDetail = (articleContent, isApp, gender, isWeixin, isqq, isW
bigImage
:
helpers
.
image
(
_
.
get
(
value
,
'singleImage.data[0].src'
,
''
),
640
,
640
),
noLazy
:
index
<=
3
,
tagList
:
tagList
,
isGif
:
/
\.
gif/i
.
test
(
_
.
get
(
value
,
'singleImage.data[0].src'
,
''
))
isGif
:
/
\.
gif/i
.
test
(
_
.
get
(
value
,
'singleImage.data[0].src'
,
''
)),
width
:
_
.
get
(
value
,
'singleImage.data[0].width'
,
0
)
/
2
,
height
:
_
.
get
(
value
,
'singleImage.data[0].height'
,
0
)
/
2
,
});
}
...
...
@@ -258,11 +260,11 @@ const processArticleDetail = (articleContent, isApp, gender, isWeixin, isqq, isW
smallImage
:
[
{
src
:
helpers
.
image
(
_
.
get
(
value
,
'smallPic.data[0].src'
,
''
),
315
,
420
),
isGif
:
/
\.
gif/i
.
test
(
_
.
get
(
value
,
'smallPic.data[0].src'
,
''
))
isGif
:
/
\.
gif/i
.
test
(
_
.
get
(
value
,
'smallPic.data[0].src'
,
''
))
,
},
{
src
:
helpers
.
image
(
_
.
get
(
value
,
'smallPic.data[1].src'
,
''
),
315
,
420
),
isGif
:
/
\.
gif/i
.
test
(
_
.
get
(
value
,
'smallPic.data[0].src'
,
''
))
isGif
:
/
\.
gif/i
.
test
(
_
.
get
(
value
,
'smallPic.data[0].src'
,
''
))
,
}
]
});
...
...
Please
register
or
login
to post a comment