|
@@ -710,8 +710,8 @@ func mailStep(sess *httpsession.Session, step int, mail, code, doType string) (s
|
|
|
|
|
|
//手机号占用查询(绑定)
|
|
|
func bindPhoneIsOccupy(phone, unionid string) bool {
|
|
|
- //已经绑定过
|
|
|
- if util.MQFW.Count("user", map[string]interface{}{"i_appid": 2, "s_m_phone": phone}) > 0 {
|
|
|
+ //已经有微信账户绑定过
|
|
|
+ if util.MQFW.Count("user", map[string]interface{}{"i_appid": 2, "s_m_phone": phone, "s_phone": map[string]interface{}{"$exists": 0}}) > 0 {
|
|
|
return true
|
|
|
}
|
|
|
//是否存在手机号用户
|
|
@@ -719,7 +719,7 @@ func bindPhoneIsOccupy(phone, unionid string) bool {
|
|
|
"i_appid": 2,
|
|
|
"s_phone": phone,
|
|
|
}); pUserNum > 0 {
|
|
|
- //存在手机号用户,但次手机号未绑定微信,或绑定微信和当前账户绑定微信一致
|
|
|
+ //存在手机号用户,但此手机号未绑定微信,或绑定微信和当前账户绑定微信一致
|
|
|
if pUserNum == 1 && pUserNum == util.MQFW.Count("user", map[string]interface{}{
|
|
|
"i_appid": 2,
|
|
|
"s_phone": phone,
|