9 lines
605 B
Vue
Raw Normal View History

import useRequest from '@/hooks/useRequest' import { getFooAPI, postFooAPI, IFooItem } from
'@/service/index/foo' import { ref } from 'vue' // import { findPetsByStatusQueryOptions } from
'@/service/app' // import { useQuery } from '@tanstack/vue-query' const recommendUrl =
ref('http://laf.run/signup?code=ohaOgIX') // const initialData = { // name: 'initialData', // id:
'1234', // } const initialData = undefined //
适合少部分全局性的接口多个页面都需要的请求接口额外编写一个 Service const { loading, error,
data, run } = useRequest
<IFooItem></IFooItem>