Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
visualcloud
/
Vmatrix-client
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
9cf21866
authored
Feb 04, 2020
by
hanjixin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了视频上传之后的存储
parent
e9489f9a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
3 deletions
+16
-3
src/api/api.js
+3
-0
src/store/modules/app.js
+8
-1
src/views/tempaltes/editMenu.vue
+5
-2
No files found.
src/api/api.js
View file @
9cf21866
...
...
@@ -148,6 +148,9 @@ export function getUserInfo() {
// 获取用户信息
return
get
(
`/user/get/info`
)
}
export
function
checkVideoCompress
(
videoSrc
=
[])
{
return
get
(
`/user/get/info`
,
videoSrc
)
}
export
function
upload
(
file
)
{
// 上传文件
let
formData
=
new
FormData
()
...
...
src/store/modules/app.js
View file @
9cf21866
...
...
@@ -6,7 +6,8 @@ const app = {
withoutAnimation
:
false
},
device
:
'desktop'
,
errorData
:
{}
errorData
:
{},
videoSrc
:
[]
},
mutations
:
{
TOGGLE_SIDEBAR
:
state
=>
{
...
...
@@ -28,6 +29,12 @@ const app = {
},
SET_ERROR_DATA
:
(
state
,
errorData
)
=>
{
state
.
errorData
=
errorData
},
SET_VIDEO_SRC
:
(
state
,
videoSrc
)
=>
{
state
.
videoSrc
=
state
.
videoSrc
.
push
(
videoSrc
)
},
CLEAR_VIDEO_SRC
:
(
state
)
=>
{
state
.
videoSrc
=
[]
}
},
actions
:
{
...
...
src/views/tempaltes/editMenu.vue
View file @
9cf21866
...
...
@@ -356,7 +356,7 @@ export default {
},
300
);
}
},
uploadFile
(
data
)
{
uploadFile
(
data
,
isVideo
)
{
this
.
$toast
.
loading
({
mask
:
true
,
duration
:
0
,
...
...
@@ -364,6 +364,9 @@ export default {
});
upload
(
data
)
.
then
(
res
=>
{
if
(
isVideo
)
{
this
.
$store
.
commit
(
'SET_VIDEO_SRC'
,
res
.
data
.
data
)
}
// this.schemaData[this.dataKey].value = res.data.data;
if
(
this
.
itemKey
)
{
this
.
setSchemaListData
(
res
.
data
.
data
);
...
...
@@ -506,7 +509,7 @@ export default {
document
.
querySelector
(
".edit-container"
).
style
.
height
=
"100vh"
;
this
.
VueCropperOption
.
img
=
file
.
content
;
}
else
{
this
.
uploadFile
(
file
.
file
);
this
.
uploadFile
(
file
.
file
)
,
String
(
file
.
file
.
type
).
indexOf
(
"image"
)
===
-
1
;
}
},
checkboxChange
(
value
)
{
...
...
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