| | |
| | | @paySuccess="handePaySuccess" |
| | | :showAliPay="!isInWeChat" |
| | | :showWeixinPay="!isInAlipay" |
| | | :openId="wxOpenId" |
| | | :getOpenId="ensureOpenId" |
| | | :isInWeChat="isInWeChat" |
| | | :isH5="isWeb" |
| | | :appId="WXPayAppId" |
| | |
| | | import { LifeRechargeConstants } 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'; |
| | | |
| | | defineOptions({ |
| | |
| | | const lifePayOrderType = Number(router.params?.lifePayOrderType ?? ''); |
| | | |
| | | const { wxOpenId } = useUser(); |
| | | const { ensureOpenId } = useEnsureOpenId(); |
| | | |
| | | const { isFocus } = useFocus(); |
| | | |
| | |
| | | lifePayOrderType: LifeRechargeConstants.LifePayOrderTypeEnum |
| | | ) { |
| | | if (lifePayOrderType === LifeRechargeConstants.LifePayOrderTypeEnum.话费订单) { |
| | | Taro.navigateTo({ |
| | | RouteHelper.redirectTo({ |
| | | url: `${RouterPath.rechargeResult}?orderNo=${orderNo}&lifePayOrderType=${lifePayOrderType}`, |
| | | }); |
| | | } else if (lifePayOrderType === LifeRechargeConstants.LifePayOrderTypeEnum.电费订单) { |
| | | Taro.navigateTo({ |
| | | RouteHelper.redirectTo({ |
| | | url: `${RouterPath.rechargeElectricResult}?orderNo=${orderNo}&lifePayOrderType=${lifePayOrderType}`, |
| | | }); |
| | | } else if (lifePayOrderType === LifeRechargeConstants.LifePayOrderTypeEnum.燃气订单) { |
| | | Taro.navigateTo({ |
| | | RouteHelper.redirectTo({ |
| | | url: `${RouterPath.rechargeGasResult}?orderNo=${orderNo}&lifePayOrderType=${lifePayOrderType}`, |
| | | }); |
| | | } |