feat: 网站favicon获取
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
//统一管理咱们项目用户相关的接口
|
||||
import request from '@/utils/request'
|
||||
|
||||
import type {
|
||||
WebInfoReqData,
|
||||
getWebInfoResponseData
|
||||
} from './type'
|
||||
|
||||
//项目用户相关的请求地址
|
||||
|
||||
enum API {
|
||||
//获取网站信息
|
||||
WEBINFO = '/webinfo'
|
||||
}
|
||||
//获取ip
|
||||
export const fetchWebInfo = (data: WebInfoReqData) => request.get<any, getWebInfoResponseData>(API.WEBINFO + '/' + data.link)
|
||||
@@ -0,0 +1,18 @@
|
||||
import { ResponseData } from "../common"
|
||||
|
||||
export interface WebInfoReqData {
|
||||
link: string
|
||||
}
|
||||
|
||||
export interface WebInfo {
|
||||
link: string,
|
||||
logo: string,
|
||||
title: string,
|
||||
keywords: string,
|
||||
desc: string
|
||||
}
|
||||
|
||||
//响应格式
|
||||
export interface getWebInfoResponseData extends ResponseData {
|
||||
data: WebInfo
|
||||
}
|
||||
Reference in New Issue
Block a user