Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-marketing
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 30ba0d24
authored
Sep 02, 2022
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
众筹
1 parent
c3fdb02e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
3 deletions
src/components/glsx-combi-form/index.vue
src/views/seckillActivity/editCrowdFund.vue
src/components/glsx-combi-form/index.vue
View file @
30ba0d2
...
@@ -47,7 +47,7 @@
...
@@ -47,7 +47,7 @@
<div
v-if=
"Array.isArray(formObj[item.name]) ? formObj[item.name].length
< item
.
maxPhotoNum
:
!
formObj
[
item
.
name
]"
class=
"activity-img img-w-h"
:style=
"item.uploadStyle && item.uploadStyle.hasOwnProperty('imgWH') ? item.uploadStyle.imgWH : ''"
>
<div
v-if=
"Array.isArray(formObj[item.name]) ? formObj[item.name].length
< item
.
maxPhotoNum
:
!
formObj
[
item
.
name
]"
class=
"activity-img img-w-h"
:style=
"item.uploadStyle && item.uploadStyle.hasOwnProperty('imgWH') ? item.uploadStyle.imgWH : ''"
>
<div
class=
"add"
:style=
"item.uploadStyle && item.uploadStyle.hasOwnProperty('addStyle') ? item.uploadStyle.addStyle : ''"
>
+
</div>
<div
class=
"add"
:style=
"item.uploadStyle && item.uploadStyle.hasOwnProperty('addStyle') ? item.uploadStyle.addStyle : ''"
>
+
</div>
<!--
<span
v-if=
"item.maxPhotoNum > 1"
class=
"number"
>
{{
formObj
[
item
.
name
].
length
}}
/
{{
item
.
maxPhotoNum
}}
</span>
-->
<!--
<span
v-if=
"item.maxPhotoNum > 1"
class=
"number"
>
{{
formObj
[
item
.
name
].
length
}}
/
{{
item
.
maxPhotoNum
}}
</span>
-->
<span
class=
"number"
:style=
"item.uploadStyle && item.uploadStyle.hasOwnProperty('fontSize') ? item.uploadStyle.fontSize : ''"
>
上传
图片
</span>
<span
class=
"number"
:style=
"item.uploadStyle && item.uploadStyle.hasOwnProperty('fontSize') ? item.uploadStyle.fontSize : ''"
>
上传
{{
item
.
uploadType
==
'video'
?
'视频'
:
'图片'
}}
</span>
<input
v-if=
"item.uploadType == 'video'"
type=
"file"
style=
"opacity: 0"
:id=
"item.name + 'file'"
ref=
"file"
class=
"activity-img img-w-h"
:style=
"item.uploadStyle && item.uploadStyle.hasOwnProperty('imgWH') ? item.uploadStyle.imgWH : ''"
accept=
"video/mp4"
@
change=
"e => handleUploadChange(e, item)"
/>
<input
v-if=
"item.uploadType == 'video'"
type=
"file"
style=
"opacity: 0"
:id=
"item.name + 'file'"
ref=
"file"
class=
"activity-img img-w-h"
:style=
"item.uploadStyle && item.uploadStyle.hasOwnProperty('imgWH') ? item.uploadStyle.imgWH : ''"
accept=
"video/mp4"
@
change=
"e => handleUploadChange(e, item)"
/>
<input
v-else
type=
"file"
style=
"opacity: 0"
:id=
"item.name + 'file'"
ref=
"file"
class=
"activity-img img-w-h"
:style=
"item.uploadStyle && item.uploadStyle.hasOwnProperty('imgWH') ? item.uploadStyle.imgWH : ''"
accept=
"image/png, image/jpeg, image/gif, image/jpg"
@
change=
"e => handleUploadChange(e, item)"
/>
<input
v-else
type=
"file"
style=
"opacity: 0"
:id=
"item.name + 'file'"
ref=
"file"
class=
"activity-img img-w-h"
:style=
"item.uploadStyle && item.uploadStyle.hasOwnProperty('imgWH') ? item.uploadStyle.imgWH : ''"
accept=
"image/png, image/jpeg, image/gif, image/jpg"
@
change=
"e => handleUploadChange(e, item)"
/>
</div>
</div>
...
@@ -210,7 +210,6 @@ export default {
...
@@ -210,7 +210,6 @@ export default {
var
reader
=
new
FileReader
()
var
reader
=
new
FileReader
()
var
file
=
e
.
srcElement
.
files
[
0
]
var
file
=
e
.
srcElement
.
files
[
0
]
var
uploadType
=
targetItem
.
uploadType
||
'img'
var
uploadType
=
targetItem
.
uploadType
||
'img'
// console.log(file)
// 默认1MB
// 默认1MB
const
limitSize
=
targetItem
.
limitSize
||
1
const
limitSize
=
targetItem
.
limitSize
||
1
const
isLt
=
file
.
size
/
1024
/
1024
<
limitSize
const
isLt
=
file
.
size
/
1024
/
1024
<
limitSize
...
...
src/views/seckillActivity/editCrowdFund.vue
View file @
30ba0d2
...
@@ -757,6 +757,11 @@ export default {
...
@@ -757,6 +757,11 @@ export default {
handleUpload
:
(
e
,
file
,
targetItem
)
=>
{
handleUpload
:
(
e
,
file
,
targetItem
)
=>
{
const
imgFile
=
e
.
target
.
result
const
imgFile
=
e
.
target
.
result
const
base64
=
file
.
name
.
split
(
'.'
)[
file
.
name
.
split
(
'.'
).
length
-
1
]
+
'@'
+
imgFile
.
split
(
','
)[
1
]
const
base64
=
file
.
name
.
split
(
'.'
)[
file
.
name
.
split
(
'.'
).
length
-
1
]
+
'@'
+
imgFile
.
split
(
','
)[
1
]
const
fileSuffix
=
file
.
name
.
split
(
'.'
)[
file
.
name
.
split
(
'.'
).
length
-
1
]
if
(
fileSuffix
.
toLowerCase
()
!=
'mp4'
)
{
this
.
$message
.
error
(
'上传视频不是MP4的格式!'
)
return
true
}
this
.
loading
=
true
this
.
loading
=
true
this
.
$apis
.
common
this
.
$apis
.
common
.
uploadFundingVideoApi
({
file
:
base64
})
.
uploadFundingVideoApi
({
file
:
base64
})
...
@@ -1514,7 +1519,12 @@ export default {
...
@@ -1514,7 +1519,12 @@ export default {
this
.
editForm
[
listName
].
forEach
(
item
=>
{
this
.
editForm
[
listName
].
forEach
(
item
=>
{
for
(
let
i
=
0
;
i
<
attrList
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
attrList
.
length
;
i
++
)
{
let
attrItem
=
attrList
[
i
]
let
attrItem
=
attrList
[
i
]
if
(
item
[
attrItem
])
{
if
(
Array
.
isArray
(
item
[
attrItem
]))
{
if
(
item
[
attrItem
].
length
)
{
list
.
push
(
item
)
break
}
}
else
if
(
item
[
attrItem
])
{
list
.
push
(
item
)
list
.
push
(
item
)
break
break
}
}
...
@@ -1527,6 +1537,7 @@ export default {
...
@@ -1527,6 +1537,7 @@ export default {
this
.
stopMusic
()
this
.
stopMusic
()
this
.
editForm
.
activityServices
=
this
.
delListAllEmpty
(
'activityServices'
,
[
'title'
,
'content'
])
this
.
editForm
.
activityServices
=
this
.
delListAllEmpty
(
'activityServices'
,
[
'title'
,
'content'
])
this
.
editForm
.
activityCommoditys
=
this
.
delListAllEmpty
(
'activityCommoditys'
,
[
'question'
,
'answer'
])
this
.
editForm
.
activityCommoditys
=
this
.
delListAllEmpty
(
'activityCommoditys'
,
[
'question'
,
'answer'
])
this
.
editForm
.
activityExperienceDTOs
=
this
.
delListAllEmpty
(
'activityExperienceDTOs'
,
[
'experience'
,
'activityExperienceImgs'
])
this
.
validateRules
()
this
.
validateRules
()
var
flag
=
true
var
flag
=
true
if
(
this
.
nameToValSpecsList
&&
this
.
nameToValSpecsList
.
length
>
0
)
{
if
(
this
.
nameToValSpecsList
&&
this
.
nameToValSpecsList
.
length
>
0
)
{
...
...
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