New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
原先作为sessionId的依据为FromUserName,应考虑到多个商家可能出现用户id重复的问题 #29
Conversation
var openid = message.FromUserName; | ||
var userOpenid = message.FromUserName; | ||
var serviceOpenid = message.ToUserName; | ||
var _str = serviceOpenid + ":" + userOpenid; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不用hash吧?
@@ -138,7 +138,13 @@ var respond = function (handler) { | |||
if (req.sessionStore) { | |||
var storage = req.sessionStore; | |||
var _end = res.end; | |||
var openid = message.FromUserName; | |||
var userOpenid = message.FromUserName; | |||
var serviceOpenid = message.ToUserName; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
缩进还是不对的。
var openid = message.FromUserName; | ||
var userOpenid = message.FromUserName; | ||
var SPOpenid = message.ToUserName; | ||
var mixId = SPOpenid + ":" + userOpenid; | ||
res.end = function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
var openid = message.FromUserName + ':' + message.ToUserName;
只改这一句就好了
原先作为sessionId的依据为FromUserName,应考虑到多个商家可能出现用户id重复的问题
原先作为sessionId的依据为FromUserName,考虑到多个商家可能出现用户id重复的问题,修改为 ToUserName + ":" + FromUse...rName 比较适合