|
|
@@ -2,12 +2,15 @@ package service
|
|
|
|
|
|
import (
|
|
|
"fmt"
|
|
|
- "github.com/mojocn/base64Captcha"
|
|
|
+ "strconv"
|
|
|
"time"
|
|
|
"video_course/errors"
|
|
|
"video_course/global"
|
|
|
+ "video_course/lib/session"
|
|
|
"video_course/model"
|
|
|
rdb "video_course/repository/redis"
|
|
|
+
|
|
|
+ "github.com/mojocn/base64Captcha"
|
|
|
)
|
|
|
|
|
|
var store = base64Captcha.DefaultMemStore
|
|
|
@@ -123,7 +126,8 @@ func (a Auth) GenVFCode(codeTypeInt int, phone string, ip string,
|
|
|
|
|
|
func (a Auth) PhoneSignIn(phone string, smsCode string, ip string) (
|
|
|
sess *model.Session, err error) {
|
|
|
-
|
|
|
+ sm := session.GetSessionManager()
|
|
|
+ s_, err := sm.CreateSession(strconv.Itoa(userId), src, time.Now().Add(time.Hour*24*5))
|
|
|
//sess = NewSession
|
|
|
//
|
|
|
//gorm.VFCodeDAO{}.CheckVFCode(model.VFCodeCodeTypeLogin, phone, code)
|