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
14e9e276
Commit
14e9e276
authored
Mar 16, 2016
by
strong
Browse files
Options
Browse Files
Download
Plain Diff
Merge commit '
9df1cb01
'
parents
c0c3fbff
9df1cb01
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
forumShare.js
app/controllers/mobile/forumShare.js
+6
-5
httpService.js
app/service/httpService.js
+1
-0
No files found.
app/controllers/mobile/forumShare.js
View file @
14e9e276
...
...
@@ -293,11 +293,10 @@ function getWXV2(res, title, desc, link, imgUrl, mid,ent_code, id,type,forumThre
//微信分享接口V2
router
.
get
(
'/sharev2.js'
,
function
(
req
,
res
,
next
)
{
//记录分享日志
delete
req
.
session
.
shareLog
;
//新的分享对象
var
_v
=
new
Date
().
getTime
();
//用于sharelog 版本号
var
share_log
=
{
_v
:
_v
};
req
.
session
.
shareLog
=
{
_v
:
_v
};
req
.
session
.
shareLog
=
{
_v
:
_v
};
//新的分享对象
console
.
log
(
'forumshare 1'
,
req
.
session
.
shareLog
);
var
rs
=
{},
type
=
req
.
query
.
type
,
id
=
req
.
query
.
id
,
...
...
@@ -423,7 +422,8 @@ router.get('/sharev2.js', function(req, res, next) {
share_log
.
type
=
2
;
share_log
.
info
=
id
;
//替换分享log内容
if
(
req
.
session
.
shareLog
.
_v
===
_v
){
if
(
!
req
.
session
.
shareLog
||
!
req
.
session
.
shareLog
.
_v
||
_v
>=
req
.
session
.
shareLog
.
_v
){
console
.
log
(
'forumshare 2'
,
share_log
);
req
.
session
.
shareLog
=
share_log
;
}
if
(
forumInfo
.
share_type
&&
forumInfo
.
share_type
==
1
){
...
...
@@ -452,7 +452,8 @@ router.get('/sharev2.js', function(req, res, next) {
share_log
.
info
=
thread
.
info
.
_id
||
thread
.
info
;
share_log
.
thread_type
=
thread
.
pid
?
4
:
thread
.
type
;
//替换分享log内容
if
(
req
.
session
.
shareLog
.
_v
===
_v
){
if
(
!
req
.
session
.
shareLog
||
!
req
.
session
.
shareLog
.
_v
||
_v
>=
req
.
session
.
shareLog
.
_v
){
console
.
log
(
'forumshare 3'
,
share_log
);
req
.
session
.
shareLog
=
share_log
;
}
//组装分享路径与判断分享类型
...
...
app/service/httpService.js
View file @
14e9e276
...
...
@@ -142,6 +142,7 @@ exports.createLog = function(req,source,info,type,thread_type,thread,p_thread) {
};
exports
.
createShareLog
=
function
(
req
,
share_type
)
{
console
.
log
(
'forumshare 4'
,
req
.
session
.
shareLog
);
var
logObj
=
req
.
session
.
shareLog
||
{};
logObj
.
source
=
req
.
session
.
mobileForumUser
.
source
;
logObj
.
mid
=
req
.
session
.
openUser
.
mid
;
...
...
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