wcj 5 年之前
父节点
当前提交
9a67c722f6
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      common/src/qfw/util/jy/jy.go

+ 3 - 3
common/src/qfw/util/jy/jy.go

@@ -163,7 +163,7 @@ func SendSMS(tplcode /*模板代码*/, mobile /*手机号码*/ string, param map
 
 //发送验证码
 func SendPhoneIdentCode(phone string, session *httpsession.Session) bool {
-	lastSentTime, _ := session.Get("identCodeTime").(int64)
+	lastSentTime := util.Int64All(session.Get("identCodeTime"))
 	//60秒之内不允许重复发
 	if lastSentTime > 0 && time.Now().Unix()-lastSentTime <= 60 {
 		return false
@@ -182,8 +182,8 @@ func SendPhoneIdentCode(phone string, session *httpsession.Session) bool {
 
 //短信验证码校验
 func CheckPhoneIdent(session *httpsession.Session, code string) string {
-	identCodeKey, _ := session.Get("identCodeValue").(string)
-	if identCodeKey != "" && identCodeKey == code {
+	identCodeValue, _ := session.Get("identCodeValue").(string)
+	if identCodeValue != "" && identCodeValue == code {
 		identCodeKey, _ := session.Get("identCodeKey").(string)
 		ClearPhoneIdentSession(session)
 		return identCodeKey