Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
saas-manage
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chehuidong
saas-manage
Commits
94dcfa24
Commit
94dcfa24
authored
Jul 06, 2023
by
yangzhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:上传文件
parent
bd4df907
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
src/common/api/upload.js
+2
-1
src/components/wangeditor/index.vue
+6
-3
No files found.
src/common/api/upload.js
View file @
94dcfa24
...
...
@@ -6,5 +6,5 @@ export function uploadImg(file, params = {}) {
for
(
const
key
in
otherParams
)
{
from
.
append
(
key
,
otherParams
[
key
])
}
return
axios
.
post
(
url
||
'
platform/upload/fileUpload/image
s'
,
from
)
return
axios
.
post
(
url
||
'
upload/os
s'
,
from
)
}
\ No newline at end of file
src/components/wangeditor/index.vue
View file @
94dcfa24
...
...
@@ -98,10 +98,13 @@ export default {
// JS 语法
// res 即服务端的返回结果
const
res
=
await
uploadImg
(
files
)
const
res
=
await
uploadImg
(
files
,
{
url
:
'upload/oss'
,
businessType
:
'other'
,
})
console
.
log
(
res
)
const
{
imag
ePath
}
=
res
const
url
=
_this
.
setimgUrl
(
imag
ePath
,
{
const
{
fil
ePath
}
=
res
const
url
=
_this
.
setimgUrl
(
fil
ePath
,
{
w
:
640
,
})
// 从 res 中找到 url alt href ,然后插入图片
...
...
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