From 6594ddfb2f6c3c3ab308d03de021974c67405662 Mon Sep 17 00:00:00 2001 From: wanghousheng Date: Sat, 24 Feb 2024 16:36:57 +0800 Subject: [PATCH] 1 --- src/api/upload/index.js | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 src/api/upload/index.js diff --git a/src/api/upload/index.js b/src/api/upload/index.js new file mode 100644 index 0000000..768146a --- /dev/null +++ b/src/api/upload/index.js @@ -0,0 +1,31 @@ +import { axios } from '@/utils/request' + +// api接口列表 +const api = { + image: '/upload/image', + video: '/upload/video' +} + +/** + * 上传图片 + * @param {*} data + */ +export function image (data) { + return axios({ + url: api.image, + method: 'post', + data + }) +} + +/** + * 上传视频 + * @param {*} data + */ +export function video (data) { + return axios({ + url: api.video, + method: 'post', + data + }) +}