...
|
...
|
@@ -34,7 +34,7 @@ func (l *MiniUserLoginLogic) MiniUserLogin(req *types.MiniUserLoginRequest) (res |
|
|
var (
|
|
|
loginInfo *domain.LoginInfo
|
|
|
token string
|
|
|
loginCreator domain.LoginCreator = WXStuClientLogin{l: l}
|
|
|
loginCreator domain.LoginCreator = WxClientLogin{l: l}
|
|
|
)
|
|
|
switch req.LoginType {
|
|
|
case domain.LoginTypeWechatLogin:
|
...
|
...
|
@@ -73,11 +73,11 @@ func (l *MiniUserLoginLogic) MiniUserLogin(req *types.MiniUserLoginRequest) (res |
|
|
return
|
|
|
}
|
|
|
|
|
|
type WXStuClientLogin struct {
|
|
|
type WxClientLogin struct {
|
|
|
l *MiniUserLoginLogic
|
|
|
}
|
|
|
|
|
|
func (c WXStuClientLogin) WechatPhoneLogin(r domain.WechatLoginRequest) (*domain.LoginInfo, error) {
|
|
|
func (c WxClientLogin) WechatPhoneLogin(r domain.WechatLoginRequest) (*domain.LoginInfo, error) {
|
|
|
code := r.Code
|
|
|
miniprogram := wechat.NewWechat().GetMiniProgram(&miniConfig.Config{
|
|
|
AppID: c.l.svcCtx.Config.Wechat.AppID,
|
...
|
...
|
@@ -108,15 +108,15 @@ func (c WXStuClientLogin) WechatPhoneLogin(r domain.WechatLoginRequest) (*domain |
|
|
return response, nil
|
|
|
}
|
|
|
|
|
|
func (c WXStuClientLogin) WechatLogin(r domain.WechatLoginRequest) (*domain.LoginInfo, error) {
|
|
|
func (c WxClientLogin) WechatLogin(r domain.WechatLoginRequest) (*domain.LoginInfo, error) {
|
|
|
return nil, nil
|
|
|
}
|
|
|
|
|
|
func (c WXStuClientLogin) PhonePasswordLogin(phone string, password string) (*domain.LoginInfo, error) {
|
|
|
func (c WxClientLogin) PhonePasswordLogin(phone string, password string) (*domain.LoginInfo, error) {
|
|
|
panic("implement me")
|
|
|
}
|
|
|
|
|
|
func (c WXStuClientLogin) PhoneSmsCodeLogin(phone string, code string) (*domain.LoginInfo, error) {
|
|
|
func (c WxClientLogin) PhoneSmsCodeLogin(phone string, code string) (*domain.LoginInfo, error) {
|
|
|
var (
|
|
|
users []*domain.User
|
|
|
err error
|
...
|
...
|
|