与C++联动,根据返回值才执行上传pvf
This commit is contained in:
1
dist/apiClient.js
vendored
1
dist/apiClient.js
vendored
@@ -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',
|
||||||
});
|
});
|
||||||
|
|||||||
2
dist/apiClient.js.map
vendored
2
dist/apiClient.js.map
vendored
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.
@@ -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',
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user