zhengyiming
4 天以前 9453bef1fc4a3121b28ffa6617f0fbfc81d9f634
apps/taro/src/subpackages/recharge/phoneBillRecharge/InnerPage.vue
@@ -1,10 +1,10 @@
<template>
  <ContentScrollView :paddingH="false" style="background-color: #fff">
  <ContentScrollView hasPaddingTop style="background-color: transparent">
    <PhoneBillRecharge
      @goPay="goPay"
      :isDev="isDev"
      @paySuccess="handePaySuccess"
      :openId="wxOpenId"
      :getOpenId="ensureOpenId"
      :isInWeChat="isInWeChat"
      :isInAlipay="isInAlipay"
      :isH5="isWeb"
@@ -12,6 +12,7 @@
      :isFocus="isFocus"
      :showAliPay="!isInWeChat"
      :showWeixinPay="isInWeChat"
      @missName="handleMissName"
    />
  </ContentScrollView>
</template>
@@ -21,8 +22,9 @@
import { BlLifeRecharge } from '@life-payment/core-vue';
import Taro from '@tarojs/taro';
import { isInAlipay, isInWeChat, isH5, isWeb } from '@/utils/env';
import { useUser, useFocus } from '@/hooks';
import { useUser, useFocus, useEnsureOpenId } from '@/hooks';
import { WXPayAppId } from '@/constants';
import { Message } from '@/utils';
defineOptions({
  name: 'InnerPage',
@@ -31,6 +33,7 @@
const isDev = process.env.NODE_ENV === 'development';
const { wxOpenId } = useUser();
const { ensureOpenId } = useEnsureOpenId();
const { isFocus } = useFocus();
function goPay(orderNo: string) {
@@ -44,4 +47,13 @@
    url: `${RouterPath.rechargeResult}?orderNo=${orderNo}&lifePayOrderType=${BlLifeRecharge.constants.LifePayOrderTypeEnum.话费订单}`,
  });
}
async function handleMissName(userAccountId: string) {
  try {
    await Message.confirm({ message: '请先完善手机号所属机主姓名' });
    RouteHelper.navigateTo({
      url: `${RouterPath.editPhoneUserAccount}?id=${userAccountId}`,
    });
  } catch (error) {}
}
</script>