From b823ca3d9f2e6dd6cdc2d388576d02c73d5f9896 Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期一, 01 十二月 2025 13:20:45 +0800
Subject: [PATCH] release: @life-payment/core v0.0.4
---
apps/taro/src/hooks/user.ts | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/apps/taro/src/hooks/user.ts b/apps/taro/src/hooks/user.ts
index ed8986e..0125a2e 100644
--- a/apps/taro/src/hooks/user.ts
+++ b/apps/taro/src/hooks/user.ts
@@ -174,12 +174,12 @@
const { wxCode, wxOpenId } = useUser();
const { getLifePayWxIndentity } = useLifePayWxIndentity();
- async function ensureOpenId() {
+ async function ensureOpenId(): Promise<string> {
if (wxOpenId.value) {
return wxOpenId.value;
} else {
let rea = await getLifePayWxIndentity(wxCode.value);
- return rea.openId ? rea.openId : wxOpenId.value;
+ return rea.openId ? rea.openId : await ensureOpenId();
}
}
--
Gitblit v1.9.1