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
5f48e9d8abe2238bf9b86f50232c5b101899fd63
2 parents
a2345c77
30d9260f
Merge branch 'feature/guang2' into 'release/5.8'
comments See merge request
!631
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
6 deletions
apps/guang/controllers/detail.js
apps/guang/models/detail.js
config/common.js
apps/guang/controllers/detail.js
View file @
5f48e9d
...
...
@@ -159,7 +159,7 @@ const index = (req, res, next) => {
co
(
function
*
()
{
let
detail
=
yield
req
.
ctx
(
DetailModel
).
packageData
(
id
,
isApp
,
isWeixin
,
channel
,
isShare
);
let
commentsTotal
=
yield
req
.
ctx
(
DetailModel
).
commentsTotal
({
article_id
:
id
});
let
commentsTotal
=
yield
req
.
ctx
(
DetailModel
).
commentsTotal
({
article_id
:
id
,
udid
:
udid
});
let
praise
=
yield
req
.
ctx
(
DetailModel
).
getArticlePraiseAndFavor
({
uid
:
uid
,
id
:
id
,
...
...
@@ -316,7 +316,7 @@ const mini = (req, res, next) => {
co
(
function
*
()
{
let
detail
=
yield
req
.
ctx
(
DetailModel
).
packageData
(
id
,
isApp
);
let
commentsTotal
=
yield
req
.
ctx
(
DetailModel
).
commentsTotal
({
article_id
:
id
});
let
commentsTotal
=
yield
req
.
ctx
(
DetailModel
).
commentsTotal
({
article_id
:
id
,
udid
:
udid
});
let
praise
=
yield
req
.
ctx
(
DetailModel
).
getArticlePraiseAndFavor
({
uid
:
uid
,
id
:
id
,
...
...
@@ -454,10 +454,12 @@ const foryoho = (req, res, next) => {
* @param {*} next
*/
const
getComments
=
(
req
,
res
,
next
)
=>
{
let
udid
=
req
.
sessionID
||
require
(
'yoho-md5'
)(
req
.
ip
)
||
'yoho'
;
req
.
ctx
(
DetailModel
).
comments
({
article_id
:
req
.
query
.
article_id
,
page
:
req
.
query
.
page
page
:
req
.
query
.
page
,
udid
:
udid
}).
then
(
result
=>
{
return
res
.
render
(
'info/comments'
,
{
comments
:
result
,
...
...
apps/guang/models/detail.js
View file @
5f48e9d
...
...
@@ -357,7 +357,8 @@ class DetailModel extends global.yoho.BaseModel {
return
serviceAPI
.
get
(
`
$
{
URI_PACKAGE_COMMENTS
}
getList
`
,
{
article_id
:
params
.
article_id
,
page
:
params
.
page
,
limit
:
params
.
limit
||
10
limit
:
params
.
limit
||
20
,
udid
:
params
.
udid
}).
then
(
result
=>
{
return
_
.
get
(
result
,
'data.list'
,
[]);
});
...
...
@@ -371,7 +372,8 @@ class DetailModel extends global.yoho.BaseModel {
return
serviceAPI
.
get
(
`
$
{
URI_PACKAGE_COMMENTS
}
getList
`
,
{
article_id
:
params
.
article_id
,
page
:
1
,
limit
:
1
limit
:
1
,
udid
:
params
.
udid
}).
then
(
result
=>
{
return
_
.
get
(
result
,
'data.total'
,
0
);
});
...
...
config/common.js
View file @
5f48e9d
...
...
@@ -22,7 +22,7 @@ const domains = {
module
.
exports
=
{
app
:
'h5'
,
appVersion
:
'5.
7.1
'
,
// 调用api的版本
appVersion
:
'5.
8.0
'
,
// 调用api的版本
port
:
6001
,
siteUrl
:
'//m.yohobuy.com'
,
assetUrl
:
'//127.0.0.1:5001'
,
...
...
Please
register
or
login
to post a comment