1
This commit is contained in:
@@ -38,12 +38,16 @@ func GetComposedCode2(c *web.Controller, code string) (composedCode string) {
|
||||
composedCode = code
|
||||
referer := c.Ctx.Request.UserAgent()
|
||||
index := strings.Index(referer, "//")
|
||||
globals.SugarLogger.Debugf("====GetComposedCode2==== %s", referer)
|
||||
if index > 0 {
|
||||
list := strings.Split(referer[index+2:], "/")
|
||||
globals.SugarLogger.Debugf("====GetComposedCode2===list= %s", utils.Format4Output(list, false))
|
||||
if len(list) >= 2 {
|
||||
composedCode = weixin.ComposeJsCode(list[1], code)
|
||||
}
|
||||
}
|
||||
globals.SugarLogger.Debugf("====composedCode===list= %s", utils.Format4Output(composedCode, false))
|
||||
|
||||
return composedCode
|
||||
}
|
||||
|
||||
@@ -123,7 +127,7 @@ func (c *Auth2Controller) Login() {
|
||||
if params.AuthType == weixin.AuthTypeMini {
|
||||
params.AuthSecret = GetComposedCode(&c.Controller, params.AuthSecret)
|
||||
}
|
||||
if params.AuthType == weixin.AuthTypeWxApp {
|
||||
if params.AuthType == weixin.AuthTypeWxApp || params.AuthType == weixin.AuthTypeWxAppCaishi {
|
||||
//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!")
|
||||
|
||||
Reference in New Issue
Block a user