| | |
| | | lifePayOrderType?: LifeRechargeConstants.LifePayOrderTypeEnum; |
| | | showAliPay?: boolean; |
| | | showWeixinPay?: boolean; |
| | | openId?: string; |
| | | isInWeChat?: boolean; |
| | | isH5?: boolean; |
| | | appId?: string; |
| | | isFocus?: boolean; |
| | | getOpenId?: () => Promise<string>; |
| | | }; |
| | | |
| | | const props = withDefaults(defineProps<Props>(), { |
| | |
| | | }>(); |
| | | |
| | | const { state, invokeAliPay, invokeWeixinPay } = useSelectPayType({ |
| | | openId: toRef(props, 'openId'), |
| | | getOpenId: toRef(props, 'getOpenId'), |
| | | isInWeChat: toRef(props, 'isInWeChat'), |
| | | isH5: toRef(props, 'isH5'), |
| | | appId: toRef(props, 'appId'), |
| | | }); |
| | | |
| | | function handleAliPay() { |
| | | invokeAliPay(props.orderNo); |
| | | async function handleAliPay() { |
| | | try { |
| | | await invokeAliPay(props.orderNo); |
| | | } catch (error) {} |
| | | } |
| | | |
| | | function handleWeixinPay() { |
| | | invokeWeixinPay(props.orderNo); |
| | | async function handleWeixinPay() { |
| | | try { |
| | | await invokeWeixinPay(props.orderNo); |
| | | } catch (error) {} |
| | | } |
| | | |
| | | useGetPayStatusByOrderNo({ |