Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sedu-mobile-v2
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liuzhanxin
sedu-mobile-v2
Commits
896752f3
Commit
896752f3
authored
Feb 25, 2020
by
cuishuai
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of gitlab.beecode.cn:sandofsuro/sedu-mobile-v2 into develop
parents
38a9c533
453185c5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
8 deletions
+4
-8
index.vue
cloudTrain/pages/Security-Check/index.vue
+4
-8
No files found.
cloudTrain/pages/Security-Check/index.vue
View file @
896752f3
...
...
@@ -128,20 +128,16 @@ import uniNavBar from "@/components/uni-header/uni-nav-bar/uni-nav-bar.vue"
},
uploadPic
(
imgPath
){
var
currentTime
=
new
Date
().
getTime
();
var
formData
=
new
FormData
();
let
file
=
{
uri
:
imgPath
,
type
:
'application/octet-stream'
,
name
:
currentTime
+
'.jpg'
};
formData
.
append
(
"file"
,
file
);
var
user
=
{};
user
.
id
=
this
.
GLOBALUTIL
.
user
.
userid
;
user
.
name
=
encodeURI
(
this
.
GLOBALUTIL
.
user
.
username
);
console
.
log
(
formData
)
uni
.
request
({
uni
.
uploadFile
({
url
:
this
.
GLOBALUTIL
.
url
+
'/safety/v1/file/image'
,
method
:
'POST'
,
body
:
formData
,
files
:[{
uri
:
imgPath
[
0
],
name
:
currentTime
+
'.jpg'
}],
filePath
:
""
,
name
:
""
,
header
:
{
'Accept'
:
'application/json'
,
'Content-Type'
:
'multipart/form-data'
,
'user'
:
JSON
.
stringify
(
user
)
},
success
:
(
res
)
=>
{
...
...
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