feat: 收口知识库分享链路
- 新增 shareKey 单参数 URL 分享页与失效页 - 新增知识库分享后端鉴权、审计与迁移脚本 - 在访问令牌中增加知识库分享授权入口
This commit is contained in:
@@ -17,6 +17,7 @@ import {
|
||||
} from 'element-plus';
|
||||
|
||||
import { api } from '#/api/request';
|
||||
import { buildKnowledgePath } from '#/views/ai/documentCollection/share-path';
|
||||
|
||||
import '@wangeditor/editor/dist/css/style.css';
|
||||
|
||||
@@ -33,6 +34,14 @@ const props = defineProps({
|
||||
type: Array as any,
|
||||
default: () => [],
|
||||
},
|
||||
requestClient: {
|
||||
type: Object as any,
|
||||
default: () => api,
|
||||
},
|
||||
endpointPrefix: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
});
|
||||
|
||||
const emit = defineEmits(['submit', 'update:modelValue']);
|
||||
@@ -97,8 +106,11 @@ const editorConfig: any = {
|
||||
}
|
||||
|
||||
try {
|
||||
const res = await api.upload(
|
||||
'/api/v1/faqItem/uploadImage',
|
||||
const res = await props.requestClient.upload(
|
||||
buildKnowledgePath(
|
||||
props.endpointPrefix,
|
||||
'/api/v1/faqItem/uploadImage',
|
||||
),
|
||||
{ collectionId: form.value.collectionId, file },
|
||||
{},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user