|
@@ -182,13 +182,14 @@ func SendPhoneIdentCode(phone string, session *httpsession.Session) bool {
|
|
|
}
|
|
|
|
|
|
//短信验证码校验
|
|
|
-func CheckPhoneIdent(session *httpsession.Session, code string) bool {
|
|
|
+func CheckPhoneIdent(session *httpsession.Session, code string) string {
|
|
|
identCodeKey, _ := session.Get("identCodeValue").(string)
|
|
|
if identCodeKey != "" && identCodeKey == code {
|
|
|
+ identCodeKey, _ := session.Get("identCodeKey").(string)
|
|
|
ClearPhoneIdentSession(session)
|
|
|
- return true
|
|
|
+ return identCodeKey
|
|
|
}
|
|
|
- return false
|
|
|
+ return ""
|
|
|
}
|
|
|
|
|
|
//删除短信验证码有关的session
|