zhengyiming
2025-06-11 91f00f1df35a964d69f48b9f71b484e2d4ef357e
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();
    }
  }