Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuy-node
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
1
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
htoooth
9 years ago
Commit
3d5ecf638d0f33a8613c1c3b740837248d0a8a35
1 parent
28626806
add stats data
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
apps/product/models/detail-service.js
apps/product/models/detail-service.js
View file @
3d5ecf6
...
...
@@ -9,6 +9,7 @@
const
Promise
=
require
(
'bluebird'
);
const
co
=
Promise
.
coroutine
;
const
moment
=
require
(
'moment'
);
const
url
=
require
(
'url'
);
const
_
=
require
(
'lodash'
);
const
helpers
=
global
.
yoho
.
helpers
;
...
...
@@ -729,7 +730,7 @@ const _detailDataPkg = (origin, uid, vipLevel) => {
}
// 分享相关,产品的链接
result
.
weixinUrl
=
helpers
.
urlFormat
(
origin
.
productUrl
,
{},
'item'
)
;
result
.
weixinUrl
=
origin
.
productUrl
;
result
.
shareTitle
=
result
.
name
;
result
.
shareImg
=
'http:'
+
result
.
img
;
// 分享图片必须使用http
result
.
shareDesc
=
result
.
phrase
;
...
...
@@ -777,9 +778,9 @@ const _detailDataPkg = (origin, uid, vipLevel) => {
}
statGoodsInfo
.
imageUrl
=
result
.
img
;
statGoodsInfo
.
productUrl
=
result
.
weixinUrl
;
statGoodsInfo
.
productUrl
=
helpers
.
urlFormat
(
url
.
parse
(
origin
.
productUrl
).
pathname
,
{},
'item'
)
;
statGoodsInfo
.
smallSortId
=
result
.
smallSortId
;
statGoodsInfo
.
soldOut
=
parseInt
(
soldOut
)
;
statGoodsInfo
.
soldOut
=
soldOut
?
1
:
0
;
return
{
goodsInfo
:
result
,
...
...
Please
register
or
login
to post a comment