mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-12-30 12:05:57 +08:00
发布v2.12.1版本,更新内容请查看:https://github.com/bufanyun/hotgo/blob/v2.0/docs/guide-zh-CN/start-update-log.md
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { http } from '@/utils/http/axios';
|
||||
import { useUserStoreWidthOut } from '@/store/modules/user';
|
||||
|
||||
// 获取验证码
|
||||
export function GetCaptcha() {
|
||||
@@ -10,9 +11,15 @@ export function GetCaptcha() {
|
||||
|
||||
// 上传图片
|
||||
export function UploadImage(params) {
|
||||
const useUserStore = useUserStoreWidthOut();
|
||||
const headers = {
|
||||
Authorization: useUserStore.token,
|
||||
uploadType: 'default',
|
||||
};
|
||||
return http.request({
|
||||
url: '/upload/image',
|
||||
url: '/upload/file',
|
||||
method: 'post',
|
||||
params,
|
||||
headers,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user