微信授权链路诊断 print 清理

授权链路已跑通(commit 625f504),撤掉 a060f29 加的临时诊断 print
+ 本次 shim 的 install 成功日志。AccreditLoginHandler / WeChatManager /
WXOpenURLShim 三处共 13 行 print 一次性清干净,行为不变。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
joywayer
2026-06-23 17:24:59 +08:00
co-authored by Claude Opus 4.7
parent 625f504b85
commit 053232ed26
3 changed files with 1 additions and 17 deletions
@@ -21,14 +21,12 @@ public enum AccreditLoginHandler {
public static func register(on bridge: any BridgeProtocol) {
bridge.register("accreditlogin") { _, callback in
print("[Bridge] accreditlogin H5 调用命中 ✅")
callback?(.string("Response from accreditlogin"))
// 7 callback sharelogin
Task { @MainActor in
do {
let user = try await WeChatAuth.authorize()
print("[Bridge] accreditlogin 拿到 user,发 sharelogin 反向 callback")
bridge.call("sharelogin", data: .object([
// 1:1 contract §3.2 [10] / msext NewRootVC.m:2428
"openid": .string(user.openid),
@@ -40,10 +38,8 @@ public enum AccreditLoginHandler {
"unionid": .string(user.unionid)
]), callback: nil)
} catch WeChatAuthError.userCancelled {
print("[Bridge] accreditlogin 用户取消授权(errCode -2")
// msext alert sharelogin
} catch {
print("[Bridge] accreditlogin 失败:\(error)")
// msext H5
}
}