|
@@ -20,6 +20,7 @@ import (
|
|
|
"qfw/coreconfig"
|
|
|
. "qfw/coreutil"
|
|
|
. "qfw/util"
|
|
|
+ credit "qfw/util/credit"
|
|
|
"qfw/util/elastic"
|
|
|
. "qfw/util/mongodb"
|
|
|
msg "qfw/util/msg"
|
|
@@ -85,7 +86,6 @@ func autoAuth(uid, uname, s_avatar, entid, promotion_id string) {
|
|
|
if len(s_action) == 2 { //已经认证过
|
|
|
return
|
|
|
}
|
|
|
- fmt.Println("222222222222222222222", s_action)
|
|
|
entName := ObjToString((*ent)["EntName"])
|
|
|
email := ObjToString((*ent)["Nb_email"])
|
|
|
t := time.Now().Local().Unix()
|
|
@@ -876,12 +876,16 @@ func (m *Member) Bindmail() error {
|
|
|
}
|
|
|
bol := Update("user", M{"_id": ObjectIdHex(m.GetSession("userId").(string))}, M{"$set": updateMap}, false, false)
|
|
|
if bol {
|
|
|
+ //绑邮箱送积分
|
|
|
+ credit.InCreditA(usid, credit.A_BYX, IntAll(m.GetSession("credit_a")))
|
|
|
//邮箱绑定认证
|
|
|
if contype == "1" {
|
|
|
r := *FindById("enterprise", entid, nil)
|
|
|
ac := ObjToString(r["s_action"])
|
|
|
if len(r) > 0 && ac == "" {
|
|
|
autoAuth(usid, uname, avatar, entid, proid)
|
|
|
+ //认证送积分
|
|
|
+ credit.InCreditA(usid, credit.A_RZ, IntAll(m.GetSession("credit_a")))
|
|
|
//发系统消息
|
|
|
msg := &msg.Msg{
|
|
|
Msgtype: 1,
|
|
@@ -1048,6 +1052,8 @@ func (m *Member) Updatephone() error {
|
|
|
if bol {
|
|
|
result = "y"
|
|
|
encryPhone = newPhone
|
|
|
+ //绑定手机送积分
|
|
|
+ credit.InCreditA(ObjToString(m.GetSession("userId")), credit.A_BSJ, IntAll(m.GetSession("credit_a")))
|
|
|
UpdateCookieSession(m.Action, m.GetSession("loginType").(string), false, *FindById("user", m.GetSession("userId").(string), nil))
|
|
|
} else {
|
|
|
result = "n"
|