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
Plain Diff
Browse Files
Authored by
李靖
8 years ago
Commit
301510b66d559eced5f661ff1f3b5bf666b6eba8
2 parents
1bcb638f
f3f54fc7
Merge branch 'feature/mip' of git.yoho.cn:fe/yohobuywap-node into feature/mip
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
11 deletions
apps/mip/mip-utils.js
apps/mip/views/action/guang/detail.hbs
utils/guang-process.js
apps/mip/mip-utils.js
View file @
301510b
...
...
@@ -65,7 +65,7 @@ module.exports = {
// mip-iframe
$
(
'iframe'
).
each
(
function
()
{
let
$this
=
$
(
this
);
let
mipIframe
=
`
<
mip
-
iframe
layout
=
"responsive"
width
=
"350"
height
=
"263"
src
=
"${$this.attr('src')}"
><
/mip-iframe>`; /
/
eslint
-
disable
-
line
let
mipIframe
=
`
<
mip
-
iframe
layout
=
"responsive"
width
=
"350"
height
=
"263"
src
=
"${$this.attr('src')}"
class
=
"${$this.attr('class') || ''}"
><
/mip-iframe>`; /
/
eslint
-
disable
-
line
$this
.
replaceWith
(
mipIframe
);
});
...
...
apps/mip/views/action/guang/detail.hbs
View file @
301510b
...
...
@@ -24,8 +24,11 @@
{{/if}}
{{#if
bigImage
}}
<div
class=
"big-pic"
>
<mip-img
class=
"pic"
src=
"
{{
image2
bigImage
q
=
60
}}
"
>
</mip-img>
{{#if
isGif
}}
<mip-anim
class=
"pic"
src=
"
{{
image2
bigImage
q
=
60
}}
"
></mip-anim>
{{else}}
<mip-img
class=
"pic"
src=
"
{{
image2
bigImage
q
=
60
}}
"
></mip-img>
{{/if}}
{{#if
tagList
}}
<div
class=
"tag-list-box"
>
{{#
each
tagList
}}
...
...
@@ -49,8 +52,11 @@
{{#if
smallImage
}}
<div
class=
"small-pic"
>
{{#
smallImage
}}
<mip-img
class=
"pic"
src=
"
{{
image2
src
q
=
60
}}
"
>
</mip-img>
{{#if
isGif
}}
<mip-anim
class=
"pic"
src=
"
{{
image2
src
q
=
60
}}
"
></mip-anim>
{{else}}
<mip-img
class=
"pic"
src=
"
{{
image2
src
q
=
60
}}
"
></mip-img>
{{/if}}
{{/
smallImage
}}
</div>
{{/if}}
...
...
@@ -83,7 +89,7 @@
{{#if
moreLink
}}
<mip-link
class=
"more-goods"
href=
"
{{
moreLink
}}
"
>
更多商品
</mip-link>
{{/if}}
{{#if
recommendProducts
}}
{{#if
recommendProducts
}}
<div
class=
"recommend-goods"
>
<div
class=
"good-scroll"
>
{{#
each
recommendProducts
}}
...
...
utils/guang-process.js
View file @
301510b
...
...
@@ -104,7 +104,7 @@ const formatArticle = (articleData, showTag, isApp, showAuthor, uid) => {
};
let
originUrl
=
helpers
.
urlFormat
(
colparam
.
urlpath
||
'/author/index'
,
null
,
'guang'
);
// 跳转回的链接
// 根据用户是否登录做处理的链接
let
collectUrl
=
'javascript:;'
;
// eslint-disable-line
let
collectUrl
=
'javascript:;'
;
// eslint-disable-line
if
(
!
uid
)
{
let
playUrlEncode
=
`
$
{
originUrl
}
$
{
colparam
.
param
}
`
.
replace
(
/
\/
/g
,
'\\\/'
);
...
...
@@ -247,7 +247,8 @@ const processArticleDetail = (articleContent, isApp, gender, isWeixin, isqq, isW
finalDetail
.
push
({
bigImage
:
helpers
.
image
(
_
.
get
(
value
,
'singleImage.data[0].src'
,
''
),
640
,
640
),
noLazy
:
index
<=
3
,
tagList
:
tagList
tagList
:
tagList
,
isGif
:
/
\.
gif/i
.
test
(
_
.
get
(
value
,
'singleImage.data[0].src'
,
''
))
});
}
...
...
@@ -256,12 +257,14 @@ const processArticleDetail = (articleContent, isApp, gender, isWeixin, isqq, isW
finalDetail
.
push
({
smallImage
:
[
{
src
:
helpers
.
image
(
_
.
get
(
value
,
'smallPic.data[0].src'
,
''
),
315
,
420
)
src
:
helpers
.
image
(
_
.
get
(
value
,
'smallPic.data[0].src'
,
''
),
315
,
420
),
isGif
:
/
\.
gif/i
.
test
(
_
.
get
(
value
,
'smallPic.data[0].src'
,
''
))
},
{
src
:
helpers
.
image
(
_
.
get
(
value
,
'smallPic.data[1].src'
,
''
),
315
,
420
)
src
:
helpers
.
image
(
_
.
get
(
value
,
'smallPic.data[1].src'
,
''
),
315
,
420
),
isGif
:
/
\.
gif/i
.
test
(
_
.
get
(
value
,
'smallPic.data[0].src'
,
''
))
}
]
,
]
});
}
...
...
Please
register
or
login
to post a comment