Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xiaomai-cloud-class-web
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
xiaomai-cloud-class
xiaomai-cloud-class-web
Commits
31c0b503
Commit
31c0b503
authored
Dec 15, 2020
by
zhangleyuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:增加图片上传失败得提示
parent
8adbdce4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletions
+5
-1
src/core/upload.js
+5
-1
No files found.
src/core/upload.js
View file @
31c0b503
import
{
func
}
from
"prop-types"
;
import
Service
from
'@/common/js/service'
;
import
User
from
'@/common/js/user'
;
import
{
message
}
from
'antd'
;
/*
* @Author: 吴文洁
* @Date: 2020-08-11 11:47:14
* @LastEditors: zhangleyuan
* @LastEditTime: 2020-12-
07 15:53:10
* @LastEditTime: 2020-12-
15 16:52:27
* @Description:
* @Copyright: 杭州杰竞科技有限公司 版权所有
*/
...
...
@@ -105,6 +106,9 @@ class Upload {
xhr
.
open
(
'POST'
,
signInfo
.
host
.
replace
(
/http:/
,
"https:"
),
true
);
xhr
.
onload
=
()
=>
{
const
result
=
JSON
.
parse
(
xhr
.
responseText
);
if
(
!
result
.
success
){
message
.
error
(
'上传失败'
);
}
resolve
(
result
.
url
);
}
xhr
.
send
(
fd
);
...
...
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