| | |
| | | <template> |
| | | <PageLayoutWithBg class="index-page-wrapper" :title="'生活缴费'" :need-auth="false"> |
| | | <ContentView> |
| | | <RechargeGrid @phoneBillRecharge="goPhoneBillRecharge" /> |
| | | <RechargeGrid |
| | | @phoneBillRecharge="goPhoneBillRecharge" |
| | | @electricityBillRecharge="goElectricityBillRecharge" |
| | | @gasBillRecharge="goGasBillRecharge" |
| | | /> |
| | | </ContentView> |
| | | </PageLayoutWithBg> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { useUser, useInfiniteLoading } from '@/hooks'; |
| | | import { useAccessLogin } from '@/hooks'; |
| | | import { useUserStore } from '@/stores/modules/user'; |
| | | import Taro from '@tarojs/taro'; |
| | | import IconLogo from '@/assets/home/icon-logo.png'; |
| | | import { OrderInputType } from '@life-payment/constants'; |
| | | import { RechargeGrid } from '@life-payment/components'; |
| | | import CustomTabBar from '../../custom-tab-bar/index'; |
| | | |
| | | function goPhoneBillRecharge() { |
| | | Taro.navigateTo({ |
| | | const userStore = useUserStore(); |
| | | |
| | | const router = Taro.useRouter(); |
| | | |
| | | const goPhoneBillRecharge = useAccessLogin(() => { |
| | | RouteHelper.navigateTo({ |
| | | url: `${RouterPath.phoneBillRecharge}`, |
| | | }) |
| | | .then(() => { |
| | | console.log('Navigate successfully'); |
| | | }) |
| | | .catch((err) => { |
| | | console.error('Navigation failed:', err); |
| | | }); |
| | | } |
| | | }); |
| | | }); |
| | | const goElectricityBillRecharge = useAccessLogin(() => { |
| | | RouteHelper.navigateTo({ |
| | | url: `${RouterPath.electricBillRecharge}`, |
| | | }); |
| | | }); |
| | | const goGasBillRecharge = useAccessLogin(() => { |
| | | RouteHelper.navigateTo({ |
| | | url: `${RouterPath.gasBillRecharge}`, |
| | | }); |
| | | }); |
| | | </script> |
| | | |
| | | <style lang="scss"> |