1. 推广员功能增强
Some checks failed
CI / Test (ubuntu-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
CI / Lint (ubuntu-latest) (push) Has been cancelled
CI / Lint (windows-latest) (push) Has been cancelled
CI / Check (ubuntu-latest) (push) Has been cancelled
CI / Check (windows-latest) (push) Has been cancelled
CI / CI OK (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
Deploy Website on push / Deploy Push Playground Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Docs Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Antd Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Element Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Naive Ftp (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
Some checks failed
CI / Test (ubuntu-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
CI / Lint (ubuntu-latest) (push) Has been cancelled
CI / Lint (windows-latest) (push) Has been cancelled
CI / Check (ubuntu-latest) (push) Has been cancelled
CI / Check (windows-latest) (push) Has been cancelled
CI / CI OK (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
Deploy Website on push / Deploy Push Playground Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Docs Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Antd Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Element Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Naive Ftp (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
This commit is contained in:
@@ -58,6 +58,13 @@ export async function getOssSignature() {
|
|||||||
return requestClient.get('/upload/oss-signature');
|
return requestClient.get('/upload/oss-signature');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* OSS 直传成功后登记 xk_file
|
||||||
|
*/
|
||||||
|
export async function registerOssFile(data: { url: string; type?: number; source?: number }) {
|
||||||
|
return requestClient.post('/upload/register-oss-file', data);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过文件id集合获取文件信息
|
* 通过文件id集合获取文件信息
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
* 5. 返回上传后的文件URL
|
* 5. 返回上传后的文件URL
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { getOssSignature } from '#/api/core/upload';
|
import { getOssSignature, registerOssFile } from '#/api/core/upload';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* OSS签名信息接口
|
* OSS签名信息接口
|
||||||
@@ -285,7 +285,11 @@ export async function uploadToOss(options: UploadOptions): Promise<UploadResult>
|
|||||||
// URL格式:host/objectName
|
// URL格式:host/objectName
|
||||||
// 注意:使用后端返回的host,确保配置的灵活性
|
// 注意:使用后端返回的host,确保配置的灵活性
|
||||||
const fileUrl = `${signature.host}/${objectName}`;
|
const fileUrl = `${signature.host}/${objectName}`;
|
||||||
|
|
||||||
|
registerOssFile({ url: fileUrl, source: 0 }).catch((err) => {
|
||||||
|
console.warn('OSS 文件登记失败:', err);
|
||||||
|
});
|
||||||
|
|
||||||
resolve({
|
resolve({
|
||||||
url: fileUrl,
|
url: fileUrl,
|
||||||
objectName: objectName,
|
objectName: objectName,
|
||||||
|
|||||||
Reference in New Issue
Block a user