feat: update
This commit is contained in:
@@ -8,7 +8,8 @@ VITE_APP_BASE_API='/api'
|
||||
VITE_APP_TITLE=开发环境
|
||||
|
||||
# 网络请求公用地址
|
||||
VITE_API_BASE_URL='http://127.0.0.1:3000'
|
||||
#VITE_API_BASE_URL='http://127.0.0.1:3000'
|
||||
VITE_API_BASE_URL='http://1.95.0.111:3000'
|
||||
|
||||
VITE_TITLE_NAME='五味子云存储'
|
||||
|
||||
|
@@ -7,7 +7,7 @@ VITE_APP_BASE_API='/api'
|
||||
VITE_APP_TITLE=生产环境
|
||||
|
||||
# 网络请求公用地址
|
||||
VITE_API_BASE_URL='http://1.95.0.111:3000'
|
||||
VITE_API_BASE_URL='http://1.95.0.111:4000'
|
||||
|
||||
VITE_TITLE_NAME='五味子云存储'
|
||||
|
||||
|
12
src/api/oss/minio/index.ts
Normal file
12
src/api/oss/minio/index.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import web from '@/utils/axios/web.ts'
|
||||
|
||||
/**
|
||||
* 初始化minio
|
||||
*/
|
||||
export const initMinio = (data: string) => {
|
||||
return web.post('/oss/minio/init', data)
|
||||
}
|
||||
|
||||
export const getBaseInfo = (data: string) => {
|
||||
return web.post('/oss/minio/getBaseInfo', data)
|
||||
}
|
@@ -1,9 +1,30 @@
|
||||
import HomeIndex from '@/components/HomeIndex'
|
||||
import { useEffect } from 'react'
|
||||
import { getBaseInfo, initMinio } from '@/api/oss/minio'
|
||||
import { Button } from 'antd'
|
||||
|
||||
export default () => {
|
||||
const minioInit = () => {
|
||||
initMinio('1').then(() => {
|
||||
getBaseInfo('wallhaven-1pd98v.jpg').then((res) => {
|
||||
console.log(res)
|
||||
})
|
||||
})
|
||||
}
|
||||
const init = () => {
|
||||
initMinio('2').then(() => {
|
||||
getBaseInfo('background.png').then((res) => {
|
||||
console.log(res)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
useEffect(() => {}, [])
|
||||
return (
|
||||
<div>
|
||||
<HomeIndex />
|
||||
<Button onClick={minioInit}>测试一</Button>
|
||||
<Button onClick={init}>测试二</Button>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user