fix: 修复公众号登录初始化失败(PowerWeChat 日志写入权限)
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 7m29s
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 7m29s
NewOfficialAccountAppFromConfig 未设置 Log.Stdout=true,PowerWeChat SDK 默认尝试在工作目录创建 wechat/info.log 文件,容器环境无写权限导致 NewOfficialAccount 返回 permission denied,触发 1181 配置不可用错误。 支付配置已有此修复(NewPaymentAppFromConfig),公众号配置漏掉了。 Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -34,6 +34,11 @@ func NewOfficialAccountAppFromConfig(wechatConfig *model.WechatConfig, cache ker
|
||||
AppID: wechatConfig.OaAppID,
|
||||
Secret: wechatConfig.OaAppSecret,
|
||||
Cache: cache,
|
||||
// 禁止 PowerWeChat SDK 在当前目录创建 wechat/ 日志文件夹
|
||||
// 容器内工作目录通常无写权限,会导致 "mkdir wechat: permission denied"
|
||||
Log: officialAccount.Log{
|
||||
Stdout: true,
|
||||
},
|
||||
}
|
||||
|
||||
if wechatConfig.OaToken != "" {
|
||||
|
||||
Reference in New Issue
Block a user