| | |
| | | <template> |
| | | <div class="parent"> |
| | | <div class="page"> |
| | | <div class="box_1"> |
| | | <div class="userinfo"> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <van-tabbar v-model="active" @change="tabChang"> |
| | | <van-tabbar v-model="active" route @change="tabChang"> |
| | | <van-tabbar-item name="home" @click="active = 'home'" icon="home-o">首页</van-tabbar-item> |
| | | <van-tabbar-item name="mydo" @click="active = 'mydo'" icon="manager">我的</van-tabbar-item> |
| | | </van-tabbar> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | <script lang="ts" setup> |
| | |
| | | import { ajaxGet } from '@/utils/axios' |
| | | // import { useCounterStore } from '@/stores/counter' |
| | | import { Image as VanImage,Tabbar as VanTabbar , TabbarItem as VanTabbarItem} from 'vant' |
| | | import {useRoute} from 'vue-router' |
| | | import {useRoute,useRouter} from 'vue-router' |
| | | import meun1 from './assets/meun1.png' |
| | | import meun2 from './assets/meun2.png' |
| | | import meun3 from './assets/meun3.png' |
| | | import meun4 from './assets/meun4.png' |
| | | import List1 from './assets/row1.png' |
| | | import Black from './assets/Black.png' |
| | | const router = useRoute() |
| | | const route = useRoute() |
| | | const router=useRouter() |
| | | // const counter = useCounterStore() |
| | | const loopData0= [ |
| | | { |
| | |
| | | ] |
| | | const active=ref('home') |
| | | const tabChang=(index:any)=>{ |
| | | console.log(index) |
| | | if (index==='home'){ |
| | | router.push('/') |
| | | } else { |
| | | router.push('my') |
| | | } |
| | | } |
| | | onMounted(() => { |
| | | console.log('初始化',router) |
| | | const queryInfo=router.query |
| | | console.log('初始化',route) |
| | | const queryInfo=route.query |
| | | const {code}=queryInfo |
| | | console.log(code) |
| | | if (code){ |