|
@@ -1081,6 +1081,7 @@ func returnFront(m *Member, key string) error {
|
|
|
|
|
|
//更新cookie sessoin
|
|
|
func UpdateCookieSession(action *xweb.Action, loginType string, flag bool, r map[string]interface{}) {
|
|
|
+ log.Println(r)
|
|
|
freeze := IntAll(r["i_freeze"])
|
|
|
action.Session().Set("i_freeze", freeze)
|
|
|
if r["s_nickname"] == nil || r["s_nickname"].(string) == "" {
|
|
@@ -1119,7 +1120,7 @@ func UpdateSession(action *xweb.Action, r map[string]interface{}) {
|
|
|
if r["s_nickname"] != nil && r["s_nickname"].(string) != "" {
|
|
|
setSessMap["nickName"] = r["s_nickname"]
|
|
|
}
|
|
|
- setSessMap["userId"] = r["_id"]
|
|
|
+ setSessMap["userId"] = BsonIdToSId(r["_id"])
|
|
|
setSessMap["s_m_openid"] = r["s_m_openid"]
|
|
|
setSessMap["userType"] = IntAllDef(r["i_type"], 2)
|
|
|
setSessMap["userInfo"] = &r
|
|
@@ -1159,7 +1160,7 @@ func UpdateSession(action *xweb.Action, r map[string]interface{}) {
|
|
|
action.SetSession("identWay", IntAll(r["i_identificationway"])) //认证状态
|
|
|
action.SetSession("opLocDistrict", r["opLocDistrict"]) //行政区划代码
|
|
|
**/
|
|
|
- action.Session().UpdateByCustomField("id", r["_id"], "", &setSessMap)
|
|
|
+ action.Session().UpdateByCustomField("id", BsonIdToSId(r["_id"]), "", &setSessMap)
|
|
|
}, func(e interface{}) {
|
|
|
log.Println("登录报错", e)
|
|
|
})
|