zhengyiming
2025-02-20 988837b3fbffb8abea06dcb875f5746b9fce3c57
apps/taro/src/pages/home/index.vue
@@ -1,20 +1,8 @@
<template>
  <PageLayoutWithBg class="index-page-wrapper" :title="''" :need-auth="false">
    <template #left>
      <div class="menu-btn-wrapper menu-logo">
        <img :src="IconLogo" class="logo" />
      </div>
    </template>
    <div class="home-header">
      <div class="home-banner-wrapper">
        <nut-swiper :auto-play="3000">
          <nut-swiper-item v-for="(item, index) in list" :key="index">
            <img :src="item" class="banner-img" draggable="false" />
          </nut-swiper-item>
        </nut-swiper>
      </div>
    </div>
    <RechargeGrid />
  <PageLayoutWithBg class="index-page-wrapper" :title="'生活缴费'" :need-auth="false">
    <ContentView>
      <RechargeGrid @phoneBillRecharge="goPhoneBillRecharge" />
    </ContentView>
  </PageLayoutWithBg>
</template>
@@ -22,25 +10,21 @@
import { useUser, useInfiniteLoading } from '@/hooks';
import { useUserStore } from '@/stores/modules/user';
import Taro from '@tarojs/taro';
import _ from 'lodash';
import IconLogo from '@/assets/home/icon-logo.png';
import { OrderInputType } from '@life-payment/constants';
import { RechargeGrid } from '@life-payment/components';
const { locationCity } = useUser();
const userStore = useUserStore();
const queryState = reactive({});
const list = ref([
  'https://storage.360buyimg.com/jdc-article/NutUItaro34.jpg',
  'https://storage.360buyimg.com/jdc-article/NutUItaro2.jpg',
  'https://storage.360buyimg.com/jdc-article/welcomenutui.jpg',
  'https://storage.360buyimg.com/jdc-article/fristfabu.jpg',
]);
const selectItem = ref();
function goPhoneBillRecharge() {
  Taro.navigateTo({
    url: RouterPath.phoneBillRecharge,
  })
    .then(() => {
      console.log('Navigate successfully');
    })
    .catch((err) => {
      console.error('Navigation failed:', err);
    });
}
</script>
<style lang="scss">