|
@@ -71,20 +71,21 @@ func (i *Info) Clue() {
|
|
if infoMap["source"] == nil {
|
|
if infoMap["source"] == nil {
|
|
return entity.NewResultSales{Data: nil, Error_msg: Error_msg_1002}
|
|
return entity.NewResultSales{Data: nil, Error_msg: Error_msg_1002}
|
|
}
|
|
}
|
|
|
|
+ //获取用户id
|
|
|
|
+ sessVal := i.Session().GetMultiple()
|
|
//验证
|
|
//验证
|
|
phone := qu.ObjToString(infoMap["phone"]) //手机号
|
|
phone := qu.ObjToString(infoMap["phone"]) //手机号
|
|
- if !phoneReg.MatchString(phone) {
|
|
|
|
|
|
+ if phone == "" {
|
|
|
|
+ phone = qu.InterfaceToStr(sessVal["phone"])
|
|
|
|
+ infoMap["phone"] = sessVal["phone"]
|
|
|
|
+ }
|
|
|
|
+ if phone != "" && !phoneReg.MatchString(phone) {
|
|
return entity.NewResultSales{Error_code: -1, Error_msg: "手机号格式有误", Data: false}
|
|
return entity.NewResultSales{Error_code: -1, Error_msg: "手机号格式有误", Data: false}
|
|
}
|
|
}
|
|
mail := qu.ObjToString(infoMap["mail"]) //邮箱
|
|
mail := qu.ObjToString(infoMap["mail"]) //邮箱
|
|
if mail != "" && !emailReg.MatchString(mail) {
|
|
if mail != "" && !emailReg.MatchString(mail) {
|
|
return entity.NewResultSales{Error_code: -1, Error_msg: "邮箱格式有误", Data: false}
|
|
return entity.NewResultSales{Error_code: -1, Error_msg: "邮箱格式有误", Data: false}
|
|
}
|
|
}
|
|
- //获取用户id
|
|
|
|
- sessVal := i.Session().GetMultiple()
|
|
|
|
- if phone == "" {
|
|
|
|
- infoMap["phone"] = sessVal["phone"]
|
|
|
|
- }
|
|
|
|
userId := qu.ObjToString(sessVal["userId"])
|
|
userId := qu.ObjToString(sessVal["userId"])
|
|
if userId != "" {
|
|
if userId != "" {
|
|
infoMap["userid"] = userId
|
|
infoMap["userid"] = userId
|