feat: 组件切换动画过渡效果,查询ip转移到后端实现
This commit is contained in:
+3
-2
@@ -2,6 +2,7 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
import type {
|
||||
IpReqData,
|
||||
getIpResponseData
|
||||
} from './type'
|
||||
|
||||
@@ -9,7 +10,7 @@ import type {
|
||||
|
||||
enum API {
|
||||
//获取ip
|
||||
GET_IP = '/ip/get?ip='
|
||||
GET_IP = '/openapi/ip'
|
||||
}
|
||||
//获取ip
|
||||
export const getIp = (ip:string) => request.get<any, getIpResponseData>(API.GET_IP + ip)
|
||||
export const getIp = (data: IpReqData) => request.post<any, getIpResponseData>(API.GET_IP, data)
|
||||
+14
-4
@@ -1,6 +1,16 @@
|
||||
//响应格式
|
||||
export interface getIpResponseData {
|
||||
code: number,
|
||||
import { ResponseData } from "../common"
|
||||
|
||||
export interface IpReqData {
|
||||
ip: string
|
||||
}
|
||||
|
||||
export interface IpInfo {
|
||||
ip: string,
|
||||
address: string
|
||||
pos: string,
|
||||
isp: string
|
||||
}
|
||||
|
||||
//响应格式
|
||||
export interface getIpResponseData extends ResponseData {
|
||||
data: IpInfo
|
||||
}
|
||||
Reference in New Issue
Block a user