Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-web
/
glsx-oss-task
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 0bc745d9
authored
Nov 16, 2022
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
调整物料逻辑
1 parent
1365dfe1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
11 deletions
src/components/GLEditor/index.vue
src/components/GLEditor/index.vue
View file @
0bc745d
...
...
@@ -520,13 +520,13 @@ export default {
// 上传图片
handleImgChange
(
e
)
{
// 判断是否有链接
var
materialFlag
=
0
this
.
previewList
.
some
((
item
)
=>
{
var
materialFlag
=
this
.
previewList
.
some
((
item
)
=>
{
if
(
item
.
materialType
==
ATT_TYPE
.
LINK
)
{
materialFlag
=
materialFlag
+
1
return
true
}
})
if
(
materialFlag
)
{
document
.
querySelector
(
'.upload-video'
).
value
=
''
this
.
$message
.
error
(
'为规范小程序显示样式,专属链接不能与图片或视频同时配置'
)
...
...
@@ -606,17 +606,16 @@ export default {
// 上传视频
async
handleVideoChange
(
e
)
{
// 判断是否有链接
var
materialFlag
=
0
this
.
previewList
.
some
((
item
)
=>
{
var
materialFlag
=
this
.
previewList
.
some
((
item
)
=>
{
if
(
item
.
materialType
==
ATT_TYPE
.
LINK
)
{
materialFlag
=
materialFlag
+
1
return
true
}
})
if
(
materialFlag
)
{
document
.
querySelector
(
'.upload-video'
).
value
=
''
this
.
$message
.
error
(
'为规范小程序显示样式,专属链接不能与图片或视频同时配置'
)
document
.
querySelector
(
'.upload-video'
).
value
=
''
return
}
await
this
.
uploadFileVideo
(
e
)
...
...
@@ -624,12 +623,12 @@ export default {
this
.
uploadInfo
=
new
upload
({
showprocess
:
true
,
success
:
function
(
res
)
{
document
.
querySelector
(
'.upload-video'
).
value
=
''
that
.
$notify
({
title
:
'提示'
,
message
:
'视频上传成功'
,
type
:
'success'
,
})
document
.
querySelector
(
'.upload-video'
).
value
=
''
that
.
previewList
.
push
({
materialType
:
that
.
ATT_TYPE
.
VEDIO
,
materialContent
:
res
,
...
...
@@ -719,13 +718,12 @@ export default {
},
handleFun
(
type
)
{
// 判断是否有图片或者视频
var
materialFlag
=
0
this
.
previewList
.
some
((
item
)
=>
{
var
materialFlag
=
this
.
previewList
.
some
((
item
)
=>
{
if
(
item
.
materialType
==
ATT_TYPE
.
IMAGE
||
item
.
materialType
==
ATT_TYPE
.
VEDIO
)
{
materialFlag
=
materialFlag
+
1
return
true
}
})
if
(
materialFlag
)
{
...
...
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