aa
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package controllers
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"git.rosy.net.cn/baseapi/platformapi/weixinapi"
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/business/auth2"
|
||||
@@ -26,6 +27,7 @@ type User2Controller struct {
|
||||
// @Param payload formData string true "json数据,User对象(手机号必填)"
|
||||
// @Param mobileVerifyCode formData string false "手机验证码(通过auth2.SendVerifyCode获得)(mobileVerifyCode与authToken不能同时为空)"
|
||||
// @Param authToken formData string false "之前通过login得到的认证TOKEN(mobileVerifyCode与authToken不能同时为空)"
|
||||
// @Param version formData string false "当app登录时,需要传版本号"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /RegisterUser [post]
|
||||
@@ -40,6 +42,11 @@ func (c *User2Controller) RegisterUser() {
|
||||
} else if params.Token != "" {
|
||||
manTokenInfo, err = auth2.GetTokenInfo(params.Token)
|
||||
}
|
||||
if configs, _ := dao.QueryConfigs(dao.GetDB(), "checkversion", model.ConfigTypeSys, ""); len(configs) > 0 {
|
||||
if params.Version == "" || configs[0].Value != params.Version {
|
||||
return nil, "", fmt.Errorf("当前APP版本过旧,数据显示有错误,请到'京西菜市'公众号下载最新版本APP!")
|
||||
}
|
||||
}
|
||||
if err == nil {
|
||||
if err = jxutils.Strings2Objs(params.Payload, &user); err == nil {
|
||||
user.Type = 0
|
||||
|
||||
Reference in New Issue
Block a user