与C++联动,根据返回值才执行上传pvf

This commit is contained in:
睿 安
2025-10-03 20:41:57 +08:00
parent 859af05c7f
commit aaf84bc264
7 changed files with 3 additions and 2 deletions

1
dist/apiClient.js vendored
View File

@@ -154,6 +154,7 @@ class ApiClient {
async uploadFileContent(filePath, content) { async uploadFileContent(filePath, content) {
try { try {
const url = this.getFullUrl(`/Api/PvfUtiltiy/ImportFile?filePath=${encodeURIComponent(filePath)}`); const url = this.getFullUrl(`/Api/PvfUtiltiy/ImportFile?filePath=${encodeURIComponent(filePath)}`);
console.log(`上传文件URL: ${url}`);
const result = await this.request(url, 'POST', content, { const result = await this.request(url, 'POST', content, {
'Content-Type': 'text/plain; charset=utf-8', 'Content-Type': 'text/plain; charset=utf-8',
}); });

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -167,7 +167,7 @@ export class ApiClient {
async uploadFileContent(filePath: string, content: string): Promise<boolean> { async uploadFileContent(filePath: string, content: string): Promise<boolean> {
try { try {
const url = this.getFullUrl(`/Api/PvfUtiltiy/ImportFile?filePath=${encodeURIComponent(filePath)}`); const url = this.getFullUrl(`/Api/PvfUtiltiy/ImportFile?filePath=${encodeURIComponent(filePath)}`);
console.log(`上传文件URL: ${url}`);
const result = await this.request(url, 'POST', content, { const result = await this.request(url, 'POST', content, {
'Content-Type': 'text/plain; charset=utf-8', 'Content-Type': 'text/plain; charset=utf-8',
}); });