|
@@ -499,30 +499,11 @@ func (l *Login) WxLogin() {
|
|
|
//保存a_m_openid[微信公众号用户首次登录or绑定app、保存此字段]
|
|
|
if _, ok := (*user)["a_m_openid"]; !ok {
|
|
|
upSet["a_m_openid"] = u.OpenId
|
|
|
+ upSet["l_a_registedate"] = time.Now().Unix()
|
|
|
upSet["o_jy.i_apppush"] = 1
|
|
|
}
|
|
|
- //旧用户i_mode转换
|
|
|
- if o_jy, ok := (*user)["o_jy"].(map[string]interface{}); ok {
|
|
|
- if i_mode_obj, i_mode_exists := o_jy["i_mode"]; i_mode_exists {
|
|
|
- i_mode := qutil.IntAll(i_mode_obj)
|
|
|
- wxpush, mailpush := 0, 0
|
|
|
- if i_mode == 2 {
|
|
|
- mailpush = 1
|
|
|
- } else if i_mode == 3 {
|
|
|
- wxpush = 1
|
|
|
- mailpush = 1
|
|
|
- } else {
|
|
|
- wxpush = 1
|
|
|
- }
|
|
|
- upSet["o_jy.i_wxpush"] = wxpush
|
|
|
- upSet["o_jy.i_mailpush"] = mailpush
|
|
|
- }
|
|
|
- }
|
|
|
go mongodb.UpdateById("user", BsonIdToSId((*user)["_id"]), map[string]interface{}{
|
|
|
"$set": upSet,
|
|
|
- "$unset": map[string]interface{}{
|
|
|
- "o_jy.i_mode": "",
|
|
|
- },
|
|
|
})
|
|
|
returnSign = afterLogin(*user, l.Session(), rid, oid, phoneType, channel, deviceId, 2, false)
|
|
|
return 1
|