| | |
| | | <template> |
| | | <ContentScrollView :paddingH="false"> |
| | | <electricBillRecharge @goPay="goPay" /> |
| | | <ContentScrollView :paddingH="false" style="background-color: #fff"> |
| | | <electricBillRecharge |
| | | @goPay="goPay" |
| | | :isDev="isDev" |
| | | @paySuccess="handePaySuccess" |
| | | :openId="wxOpenId" |
| | | :isInWeChat="isInWeChat" |
| | | :isInAlipay="isInAlipay" |
| | | :isH5="isWeb" |
| | | :appId="WXPayAppId" |
| | | :isFocus="isFocus" |
| | | /> |
| | | </ContentScrollView> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { electricBillRecharge } from '@life-payment/components'; |
| | | 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 { WXPayAppId } from '@/constants'; |
| | | |
| | | defineOptions({ |
| | | name: 'InnerPage', |
| | | }); |
| | | |
| | | function goPay() { |
| | | Taro.navigateTo({ |
| | | url: RouterPath.selectPayType, |
| | | const isDev = process.env.NODE_ENV === 'development'; |
| | | |
| | | const { wxOpenId } = useUser(); |
| | | const { isFocus } = useFocus(); |
| | | |
| | | function goPay(orderNo: string) { |
| | | RouteHelper.navigateTo({ |
| | | url: `${RouterPath.selectPayType}?orderNo=${orderNo}&lifePayOrderType=${BlLifeRecharge.constants.LifePayOrderTypeEnum.电费订单}`, |
| | | }); |
| | | } |
| | | |
| | | function handePaySuccess(orderNo: string) { |
| | | RouteHelper.navigateTo({ |
| | | url: `${RouterPath.rechargeResult}?orderNo=${orderNo}&lifePayOrderType=${BlLifeRecharge.constants.LifePayOrderTypeEnum.电费订单}`, |
| | | }); |
| | | } |
| | | </script> |