|
@@ -68,7 +68,7 @@ func (this *UserCommonController) Login() {
|
|
|
}
|
|
|
userByps, err := models.GetWxUserItemByMobile(mobile)
|
|
|
if err != nil {
|
|
|
- br.Msg = "获取信息失败"
|
|
|
+ br.Msg = "该账号不是专栏作者,请使用验证码登录。"
|
|
|
br.ErrMsg = "获取信息失败,Err:" + err.Error()
|
|
|
return
|
|
|
}
|
|
@@ -1950,12 +1950,19 @@ func (this *UserController) EmailBinding() {
|
|
|
// @Param request body models.SetUserPasswordReq true "type json string"
|
|
|
// @Success 200 {object}
|
|
|
// @router /set_pass [post]
|
|
|
-func (this *UserCommonController) SetPass() {
|
|
|
+func (this *UserController) SetPass() {
|
|
|
br := new(models.BaseResponse).Init()
|
|
|
defer func() {
|
|
|
this.Data["json"] = br
|
|
|
this.ServeJSON()
|
|
|
}()
|
|
|
+ user := this.User
|
|
|
+ if user == nil {
|
|
|
+ br.Msg = "请登录"
|
|
|
+ br.ErrMsg = "请登录,用户信息为空"
|
|
|
+ br.Ret = 408
|
|
|
+ return
|
|
|
+ }
|
|
|
var req models.SetUserPasswordReq
|
|
|
err := json.Unmarshal(this.Ctx.Input.RequestBody, &req)
|
|
|
if err != nil {
|
|
@@ -2004,13 +2011,6 @@ func (this *UserCommonController) SetPass() {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- user, err := models.GetWxUserItemByMobile(mobile)
|
|
|
- if err != nil {
|
|
|
- br.Msg = "获取信息失败"
|
|
|
- br.ErrMsg = "获取信息失败,Err:" + err.Error()
|
|
|
- return
|
|
|
- }
|
|
|
-
|
|
|
specialAuthorCheck := services.GetYanxuanSpecialAuthorInfo(user) //用户是否没开通研选专栏以及,专栏信息是否完善
|
|
|
if !specialAuthorCheck.IsAuthor {
|
|
|
br.Msg = "该账号不是专栏作者,请使用验证码登录。"
|
|
@@ -2157,7 +2157,7 @@ func (this *UserCommonController) ReSetPass() {
|
|
|
|
|
|
user, err := models.GetWxUserItemByMobile(mobile)
|
|
|
if err != nil {
|
|
|
- br.Msg = "获取信息失败"
|
|
|
+ br.Msg = "该账号不是专栏作者,请使用验证码登录。"
|
|
|
br.ErrMsg = "获取信息失败,Err:" + err.Error()
|
|
|
return
|
|
|
}
|