Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
白杨
/
shrae-app
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 331f47ec
authored
Mar 01, 2018
by
kuayue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
图片上传删除
1 parent
57f0d9c4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
1 deletions
src/js/imgUp.js
src/js/imgUp.js
View file @
331f47e
...
@@ -120,5 +120,22 @@ function backReturn(){
...
@@ -120,5 +120,22 @@ function backReturn(){
* 保存图片
* 保存图片
*/
*/
function
saveReturn
(){
function
saveReturn
(){
alert
(
"保存成功"
);
var
file
=
document
.
getElementById
(
"file"
).
files
[
0
];
console
.
log
(
"file数据"
+
file
);
var
formData
=
new
FormData
();
formData
.
append
(
'file'
,
file
);
$
.
ajax
({
url
:
"/home/about"
,
type
:
"post"
,
data
:
formData
,
contentType
:
false
,
processData
:
false
,
mimeType
:
"multipart/form-data"
,
success
:
function
(
data
)
{
console
.
log
(
"返回正确数据"
+
data
);
},
error
:
function
(
data
)
{
console
.
log
(
"错误返回数据"
+
data
);
}
});
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
Attach a file
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 post a comment