代码调整

This commit is contained in:
2026-06-03 23:13:12 +08:00
parent c47f12a740
commit 7444fc5c48
9 changed files with 31 additions and 900 deletions
-10
View File
@@ -6,7 +6,6 @@ import (
"errors"
"fmt"
"stat/api/proto"
"stat/common"
"stat/common/log"
"stat/common/stdLog"
"stat/common/utils"
@@ -115,15 +114,6 @@ func AgentLogin(ctx context.Context, ip string, param proto.AgentLoginReq) (code
imgCodeByte := statg.VerifyIMGStore.Get(param.ImgID, true)
if bytes.Equal(imgCodeByte, imgs) {
channelInfo.ShowMagic += 1
doc := bson.M{"$set": bson.M{channelmod.FN.ChannelInfo.ShowMagic: channelInfo.ShowMagic}}
if err = channelmod.UpdateOneChannelInfo(ctx, bson.M{}, doc); err != nil {
code = stdLog.Failure
return code, channelInfo
}
code = stdLog.VerifySmsCodeFailed
return
} else if bytes.Equal(imgCodeByte, common.ArrayReverseByte(imgs)) {
channelInfo.ShowMagic = 1
} else {
code = stdLog.VerifySmsCodeFailed
+2
View File
@@ -9,6 +9,7 @@ import (
"os"
"regexp"
"stat/api/proto"
"stat/common/log"
"stat/common/utils"
downloadinfo "stat/models/downloadinfo"
"stat/models/versionMod"
@@ -80,6 +81,7 @@ func GetH5Config(ctx context.Context, req *proto.H5ConfigReq, userAgent string,
}
cacheSer.Writers.LandPageClickWriter.Add(downloadInfo)
origin, target, config := GetAppConfig(req.AppId)
log.Info("GetH5Config", log.Any("origin", origin), log.Any("target", target))
if origin == "" || target == "" || config == "" {
return nil, "madou.mobileconfig"
}