Files
aiot-uniapp/src/api/alova-foo.ts

19 lines
422 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// alovaJS 还在整理中有比较熟悉的开发者可以PR一下省得我去摸索
import { API_DOMAINS, http } from '@/utils/request/alova'
export interface IFoo {
id: number
name: string
}
export function foo() {
return http.Get<IFoo>('/foo', {
params: {
name: '菲鸽',
page: 1,
pageSize: 10,
},
meta: { domain: API_DOMAINS.SECONDARY }, // 用于切换请求地址
})
}