Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pptist
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
viitto
pptist
Commits
36b794e4
Commit
36b794e4
authored
Mar 11, 2024
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改文件上传接口调用
parent
52027cf3
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
17 additions
and
13 deletions
+17
-13
Index.vue
src/components/PSD/Index.vue
+6
-0
FileService.ts
src/services/FileService.ts
+5
-4
ExportImage.vue
src/views/Editor/ExportDialog/ExportImage.vue
+1
-1
ExportPDF.vue
src/views/Editor/ExportDialog/ExportPDF.vue
+1
-1
Share.vue
src/views/SellTemplate/Share.vue
+2
-2
journeyAdsList.vue
src/views/SellTemplate/components/journeyAdsList.vue
+2
-2
vue.config.js
vue.config.js
+0
-3
No files found.
src/components/PSD/Index.vue
View file @
36b794e4
...
...
@@ -203,6 +203,7 @@ const uploadFontHandler = async (uploadFile:any, uploadFiles:any, fontName:strin
}
const
url
=
await
FileService
.
uploadToFontServerAsync
(
uploadFile
?.
raw
)
if
(
url
&&
url
!=
''
){
if
(
url
.
indexOf
(
'"'
)
!=-
1
)
url
=
url
.
replaceAll
(
'"'
,
''
)
let
label
=
uploadFile
.
name
.
split
(
'.'
)[
0
],
reduceName
=
''
,
reduceUrl
=
''
try
{
if
(
info
.
file
){
...
...
@@ -231,6 +232,11 @@ const uploadFontHandler = async (uploadFile:any, uploadFiles:any, fontName:strin
type
:
'error'
})
}
}
else
{
ElMessage
({
message
:
'上传失败,请重试'
,
type
:
'error'
})
}
}
catch
(
error
)
{
console
.
log
(
"上传异常"
,
error
)
...
...
src/services/FileService.ts
View file @
36b794e4
...
...
@@ -21,7 +21,7 @@ const fetchWithTimeout = (url:string, timeout:number)=>{
}
class
FileService
{
static
downloadLinePdfAsync
=
async
(
id
:
any
)
=>
{
let
url
=
`http://fileservice.oytour.com/api/pdf/
${
id
}
`
let
url
=
`http
s
://fileservice.oytour.com/api/pdf/
${
id
}
`
try
{
const
response
=
await
fetchWithTimeout
(
url
,
60
*
1000
);
// 处理响应
...
...
@@ -104,7 +104,7 @@ class FileService {
}
static
notifyFontUpdateAsync
=
async
(
fileName
:
string
)
=>
{
await
fetch
(
'http://fileservice.oytour.com/api/file/downfont/'
+
fileName
)
await
fetch
(
'http
s
://fileservice.oytour.com/api/file/downfont/'
+
fileName
)
}
static
uploadToFontServerAsync
=
async
(
file
:
File
)
=>
{
...
...
@@ -112,13 +112,14 @@ class FileService {
const
formData
=
new
FormData
();
formData
.
append
(
'file'
,
file
);
const
response
=
await
fetch
(
'http
://localhost:5164
/api/file/uploadfont'
,
{
const
response
=
await
fetch
(
'http
s://fileservice.oytour.com
/api/file/uploadfont'
,
{
method
:
'POST'
,
body
:
formData
,
});
if
(
response
.
ok
){
let
r
=
await
response
.
text
()
return
r
if
(
r
.
indexOf
(
'https://im.oytour.com'
)
!=-
1
)
return
r
return
''
}
return
''
}
catch
(
error
)
{
...
...
src/views/Editor/ExportDialog/ExportImage.vue
View file @
36b794e4
...
...
@@ -143,7 +143,7 @@ const beginDownload = async ()=>{
}
}
fileUrl
.
value
=
`http
://fileservice.oytour.com/api/img/
${
searchData
.
value
.
sellId
}
/
${
rangeArray
.
join
(
','
)}
/
${
format
.
value
==
'png'
?
'png'
:
'jpg'
}
/
${
quality
.
value
}
/
${
useSellTemplateStore
().
SaleHashCode
}
`
//http
://fileservice.oytour.com
fileUrl
.
value
=
`http
s://fileservice.oytour.com/api/img/
${
searchData
.
value
.
sellId
}
/
${
rangeArray
.
join
(
','
)}
/
${
format
.
value
==
'png'
?
'png'
:
'jpg'
}
/
${
quality
.
value
}
/
${
useSellTemplateStore
().
SaleHashCode
}
`
//https
://fileservice.oytour.com
console
.
log
(
fileUrl
.
value
)
nextTick
(()
=>
{
downloadLink
.
value
.
click
()
...
...
src/views/Editor/ExportDialog/ExportPDF.vue
View file @
36b794e4
...
...
@@ -127,7 +127,7 @@ const exportOnlinePdf=()=>{
autoSave
.
value
=
1
}
const
beginDownload
=
async
()
=>
{
fileUrl
.
value
=
`http://fileservice.oytour.com/api/pdf/
${
searchData
.
value
.
sellId
}
/
${
useSellTemplateStore
().
SaleHashCode
}
`
fileUrl
.
value
=
`http
s
://fileservice.oytour.com/api/pdf/
${
searchData
.
value
.
sellId
}
/
${
useSellTemplateStore
().
SaleHashCode
}
`
nextTick
(()
=>
{
downloadLink
.
value
.
click
()
})
...
...
src/views/SellTemplate/Share.vue
View file @
36b794e4
...
...
@@ -216,8 +216,8 @@ const openFileDocument = (item:any) => {
window
.
open
(
url
);
}
const
exportDocument
=
(
item
:
any
)
=>
{
let
url
=
`http://fileservice.oytour.com/api/img/
${
item
.
FileId
}
/1/png/1/
${
item
.
HashInfo
}
`
if
(
item
.
FileType
==
1
)
url
=
`http://fileservice.oytour.com/api/pdf/
${
item
.
FileId
}
/
${
item
.
HashInfo
}
`
let
url
=
`http
s
://fileservice.oytour.com/api/img/
${
item
.
FileId
}
/1/png/1/
${
item
.
HashInfo
}
`
if
(
item
.
FileType
==
1
)
url
=
`http
s
://fileservice.oytour.com/api/pdf/
${
item
.
FileId
}
/
${
item
.
HashInfo
}
`
window
.
open
(
url
);
}
const
changeFolderHandler
=
async
(
item
:
any
)
=>
{
...
...
src/views/SellTemplate/components/journeyAdsList.vue
View file @
36b794e4
...
...
@@ -340,8 +340,8 @@ import CopyFile from "./CopyFile.vue";
}
const
exportDocument
=
(
item
:
any
)
=>
{
let
url
=
`http://fileservice.oytour.com/api/img/
${
item
.
FileId
}
/1/png/1/
${
item
.
HashInfo
}
`
if
(
item
.
FileType
==
1
)
url
=
`http://fileservice.oytour.com/api/pdf/
${
item
.
FileId
}
/
${
item
.
HashInfo
}
`
let
url
=
`http
s
://fileservice.oytour.com/api/img/
${
item
.
FileId
}
/1/png/1/
${
item
.
HashInfo
}
`
if
(
item
.
FileType
==
1
)
url
=
`http
s
://fileservice.oytour.com/api/pdf/
${
item
.
FileId
}
/
${
item
.
HashInfo
}
`
window
.
open
(
url
);
}
const
viewTemplate
=
(
row
:
any
)
=>
{
...
...
vue.config.js
View file @
36b794e4
...
...
@@ -34,9 +34,6 @@ module.exports = {
})
],
},
devServer
:{
https
:
true
},
pwa
:
{
name
:
'PPTist'
,
themeColor
:
'#d14424'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment