Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pisns-forum-api
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
scrmGroup
pisns-forum-api
Commits
c6affd53
Commit
c6affd53
authored
Apr 15, 2015
by
邓军
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修正微信接口,加上MID
parent
871b2fd9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
forumShare.js
app/controllers/mobile/forumShare.js
+6
-5
No files found.
app/controllers/mobile/forumShare.js
View file @
c6affd53
...
@@ -16,8 +16,8 @@ module.exports = function(app) {
...
@@ -16,8 +16,8 @@ module.exports = function(app) {
app
.
use
(
'/v1/forum'
,
router
);
app
.
use
(
'/v1/forum'
,
router
);
};
};
function
getWX
(
res
,
title
,
desc
,
link
,
imgUrl
)
{
function
getWX
(
res
,
title
,
desc
,
link
,
imgUrl
,
mid
)
{
link
=
config
.
service
+
link
;
link
=
config
.
service
+
link
+
"&mid="
+
mid
;
res
.
writeHead
(
200
,
{
res
.
writeHead
(
200
,
{
'Content-Type'
:
'text/javascript'
,
'Content-Type'
:
'text/javascript'
,
'Cache-Control'
:
'no-cache'
,
'Cache-Control'
:
'no-cache'
,
...
@@ -59,6 +59,7 @@ router.get('/:ent_code/share.js', function(req, res, next) {
...
@@ -59,6 +59,7 @@ router.get('/:ent_code/share.js', function(req, res, next) {
var
rs
=
{};
var
rs
=
{};
var
type
=
req
.
query
.
type
;
var
type
=
req
.
query
.
type
;
var
id
=
req
.
query
.
id
;
var
id
=
req
.
query
.
id
;
var
mid
=
req
.
session
.
openUser
.
mid
||
0
;
var
ent_code
=
req
.
params
.
ent_code
;
var
ent_code
=
req
.
params
.
ent_code
;
var
link
=
'/app/forum/'
+
ent_code
+
'/index/'
;
var
link
=
'/app/forum/'
+
ent_code
+
'/index/'
;
if
(
type
)
{
if
(
type
)
{
...
@@ -81,7 +82,7 @@ router.get('/:ent_code/share.js', function(req, res, next) {
...
@@ -81,7 +82,7 @@ router.get('/:ent_code/share.js', function(req, res, next) {
}
}
}
}
link
=
link
+
'index.html?infoId='
+
id
;
link
=
link
+
'index.html?infoId='
+
id
;
getWX
(
res
,
title
,
desc
,
link
,
imgUrl
);
getWX
(
res
,
title
,
desc
,
link
,
imgUrl
,
mid
);
}
else
{
}
else
{
cont
(
err
);
cont
(
err
);
}
}
...
@@ -144,7 +145,7 @@ router.get('/:ent_code/share.js', function(req, res, next) {
...
@@ -144,7 +145,7 @@ router.get('/:ent_code/share.js', function(req, res, next) {
imgUrl
=
sc
[
i
].
meta_value
;
imgUrl
=
sc
[
i
].
meta_value
;
}
}
}
}
getWX
(
res
,
title
,
desc
,
link
,
imgUrl
);
getWX
(
res
,
title
,
desc
,
link
,
imgUrl
,
mid
);
}
else
{
}
else
{
cont
(
err
);
cont
(
err
);
}
}
...
@@ -166,7 +167,7 @@ router.get('/:ent_code/share.js', function(req, res, next) {
...
@@ -166,7 +167,7 @@ router.get('/:ent_code/share.js', function(req, res, next) {
//key = 'photo';
//key = 'photo';
}
}
getWX
(
res
,
forumShare
.
title
,
forumShare
.
description
,
link
,
forumShare
.
icon
);
getWX
(
res
,
forumShare
.
title
,
forumShare
.
description
,
link
,
forumShare
.
icon
,
mid
);
});
});
}
}
}).
fail
(
function
(
cont
,
err
)
{
}).
fail
(
function
(
cont
,
err
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment