This commit is contained in:
suyl
2021-07-15 11:44:18 +08:00
parent 3c67bc1b65
commit b3901e6a7c

View File

@@ -111,10 +111,11 @@ func (c *Auth2Controller) Login() {
params.AuthSecret = GetComposedCode(&c.Controller, params.AuthSecret) params.AuthSecret = GetComposedCode(&c.Controller, params.AuthSecret)
} }
if params.AuthType == weixin.AuthTypeWxApp { if params.AuthType == weixin.AuthTypeWxApp {
configs, _ := dao.QueryConfigs(dao.GetDB(), "checkversion", model.ConfigTypeSys, "") if configs, _ := dao.QueryConfigs(dao.GetDB(), "checkversion", model.ConfigTypeSys, ""); len(configs) > 0 {
if params.Version == "" || configs[0].Value != params.Version { if params.Version == "" || configs[0].Value != params.Version {
return nil, "", fmt.Errorf("当前APP版本过旧数据显示有错误请到'京西菜市'公众号下载最新版本APP") return nil, "", fmt.Errorf("当前APP版本过旧数据显示有错误请到'京西菜市'公众号下载最新版本APP")
} }
}
params.AuthSecret = GetComposedCode2(&c.Controller, params.AuthSecret) params.AuthSecret = GetComposedCode2(&c.Controller, params.AuthSecret)
} }
ctx := auth2.NewContext(c.Ctx.ResponseWriter, c.Ctx.Request) ctx := auth2.NewContext(c.Ctx.ResponseWriter, c.Ctx.Request)