wcj 5 years ago
parent
commit
a7f965159f
1 changed files with 10 additions and 0 deletions
  1. 10 0
      common/src/qfw/util/jy/jy.go

+ 10 - 0
common/src/qfw/util/jy/jy.go

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