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
陈峰
6 years ago
Commit
e220b3392a4713022db31a1868e1fb44a76fcf4c
1 parent
e0e59035
guang remove sharecode
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
115 deletions
apps/guang/models/detail.js
apps/guang/views/action/info/index.hbs
apps/mip/models/guang.js
utils/guang-process.js
apps/guang/models/detail.js
View file @
e220b33
...
...
@@ -267,7 +267,6 @@ class DetailModel extends global.yoho.BaseModel {
promises
.
push
(
this
.
_getLeftNav
(
navGender
),
this
.
_getShareData
(
id
)
);
}
...
...
@@ -314,46 +313,6 @@ class DetailModel extends global.yoho.BaseModel {
});
}
if
(
isShare
&&
datas
[
5
])
{
if
(
datas
[
5
].
wechatShareImgUrl
)
{
datas
[
5
].
wechatShareImgUrl
=
datas
[
5
].
wechatShareImgUrl
.
substring
(
datas
[
5
].
wechatShareImgUrl
.
indexOf
(
'//'
));
if
(
datas
[
5
].
wechatShareImgUrl
.
indexOf
(
'?'
)
===
-
1
)
{
datas
[
5
].
wechatShareImgUrl
=
datas
[
5
].
wechatShareImgUrl
+
'?imageView2/2/interlace/1/q/75'
;
}
}
else
if
(
datas
[
5
].
qqShareImgUrl
)
{
datas
[
5
].
qqShareImgUrl
=
datas
[
5
].
qqShareImgUrl
.
substring
(
datas
[
5
].
qqShareImgUrl
.
indexOf
(
'//'
));
if
(
datas
[
5
].
qqShareImgUrl
.
indexOf
(
'?'
)
===
-
1
)
{
datas
[
5
].
qqShareImgUrl
=
datas
[
5
].
wechatShareImgUrl
+
'?imageView2/2/interlace/1/q/75'
;
}
}
else
if
(
datas
[
5
].
showShareImgUrl
)
{
datas
[
5
].
showShareImgUrl
=
datas
[
5
].
showShareImgUrl
.
substring
(
datas
[
5
].
showShareImgUrl
.
indexOf
(
'//'
));
if
(
datas
[
5
].
showShareImgUrl
.
indexOf
(
'?'
)
===
-
1
)
{
datas
[
5
].
showShareImgUrl
=
datas
[
5
].
showShareImgUrl
+
'?imageView2/2/interlace/1/q/75'
;
}
}
let
preCount
=
0
;
let
i
;
for
(
i
=
0
;
i
<
getArticleContent
.
length
;
i
++
)
{
if
(
getArticleContent
[
i
].
singleImage
||
getArticleContent
[
i
].
text
||
getArticleContent
[
i
].
smallPic
)
{
preCount
=
i
+
1
;
}
}
getArticleContent
.
splice
(
preCount
,
0
,
{
shareCode
:
datas
[
5
]
});
}
if
(
datas
[
0
])
{
result
.
getAuthor
=
datas
[
0
].
data
;
}
...
...
apps/guang/views/action/info/index.hbs
View file @
e220b33
...
...
@@ -73,14 +73,6 @@
</div>
{{/if}}
{{#if
shareCode
}}
<div
class=
"share-code"
>
{{#
shareCode
}}
<img
class=
"wei-share"
src=
"
{{
image2
codeShare
q
=
60
}}
"
></img>
{{/
shareCode
}}
</div>
{{/if}}
{{#
video
}}
<video
src=
"
{{
src
}}
"
controls=
"controls"
poster=
"
{{
image2
cover_image
q
=
60
}}
"
preload=
"none"
>
不好意思,您的浏览器不支持此视频!
</video>
{{/
video
}}
...
...
@@ -256,6 +248,10 @@
if
(
isWechat
||
isqq
||
isWeibo
)
{
document
.
getElementById
(
'guang-header'
).
classList
.
remove
(
'hide'
);
document
.
getElementById
(
'yoho-header'
).
classList
.
add
(
'hide'
);
const
$header
=
document
.
getElementById
(
'yoho-header'
);
if
(
$header
)
{
$header
.
classList
.
add
(
'hide'
);
}
}
</script>
...
...
apps/mip/models/guang.js
View file @
e220b33
...
...
@@ -241,7 +241,6 @@ class DetailModel extends global.yoho.BaseModel {
promises
.
push
(
this
.
_getLeftNav
(
navGender
),
this
.
_getShareData
(
id
)
);
}
...
...
@@ -276,46 +275,6 @@ class DetailModel extends global.yoho.BaseModel {
});
}
if
(
isShare
&&
datas
[
5
])
{
if
(
datas
[
5
].
wechatShareImgUrl
)
{
datas
[
5
].
wechatShareImgUrl
=
datas
[
5
].
wechatShareImgUrl
.
substring
(
datas
[
5
].
wechatShareImgUrl
.
indexOf
(
'//'
));
if
(
datas
[
5
].
wechatShareImgUrl
.
indexOf
(
'?'
)
===
-
1
)
{
datas
[
5
].
wechatShareImgUrl
=
datas
[
5
].
wechatShareImgUrl
+
'?imageView2/2/interlace/1/q/75'
;
}
}
else
if
(
datas
[
5
].
qqShareImgUrl
)
{
datas
[
5
].
qqShareImgUrl
=
datas
[
5
].
qqShareImgUrl
.
substring
(
datas
[
5
].
qqShareImgUrl
.
indexOf
(
'//'
));
if
(
datas
[
5
].
qqShareImgUrl
.
indexOf
(
'?'
)
===
-
1
)
{
datas
[
5
].
qqShareImgUrl
=
datas
[
5
].
wechatShareImgUrl
+
'?imageView2/2/interlace/1/q/75'
;
}
}
else
if
(
datas
[
5
].
showShareImgUrl
)
{
datas
[
5
].
showShareImgUrl
=
datas
[
5
].
showShareImgUrl
.
substring
(
datas
[
5
].
showShareImgUrl
.
indexOf
(
'//'
));
if
(
datas
[
5
].
showShareImgUrl
.
indexOf
(
'?'
)
===
-
1
)
{
datas
[
5
].
showShareImgUrl
=
datas
[
5
].
showShareImgUrl
+
'?imageView2/2/interlace/1/q/75'
;
}
}
let
preCount
=
0
;
let
i
;
for
(
i
=
0
;
i
<
getArticleContent
.
length
;
i
++
)
{
if
(
getArticleContent
[
i
].
singleImage
||
getArticleContent
[
i
].
text
||
getArticleContent
[
i
].
smallPic
)
{
preCount
=
i
+
1
;
}
}
getArticleContent
.
splice
(
preCount
,
0
,
{
shareCode
:
datas
[
5
]
});
}
if
(
datas
[
0
])
{
result
.
getAuthor
=
datas
[
0
].
data
;
}
...
...
utils/guang-process.js
View file @
e220b33
...
...
@@ -334,30 +334,6 @@ const processArticleDetail = (articleContent, isApp, gender, isWeixin, isqq, isW
});
}
// 分享?
if
(
_
.
get
(
value
,
'shareCode'
,
false
))
{
let
shareCode
=
false
;
if
(
isWeixin
)
{
shareCode
=
_
.
get
(
value
,
'shareCode.wechatShareImgUrl'
,
false
);
}
if
(
isqq
)
{
shareCode
=
_
.
get
(
value
,
'shareCode.qqShareImgUrl'
,
false
);
}
if
(
isWeibo
)
{
shareCode
=
_
.
get
(
value
,
'shareCode.showShareImgUrl'
,
false
);
}
if
(
shareCode
)
{
finalDetail
.
push
({
shareCode
:
[{
codeShare
:
shareCode
}]
});
}
}
// 改变关联商品显示形式,false:默认单列多行,true:改成俩列多行
let
changeDisplayType
=
_
.
get
(
value
,
'goods.display_template'
)
===
'2'
;
...
...
Please
register
or
login
to post a comment