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

View File

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