Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cust_web
Project
Project
Details
Activity
Releases
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
张伯涛
cust_web
Commits
ca3f0ee6
Commit
ca3f0ee6
authored
Apr 25, 2025
by
liwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了上传多余接口报错的bug
parent
91d4095e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
18 deletions
+36
-18
index.vue
src/views/contentManagement/activity/info/index.vue
+8
-3
index.vue
src/views/contentManagement/banner/index.vue
+12
-8
index.vue
src/views/contentManagement/notice/info/index.vue
+8
-3
index.vue
src/views/operationsManagement/member/info/index.vue
+8
-4
No files found.
src/views/contentManagement/activity/info/index.vue
View file @
ca3f0ee6
...
@@ -301,9 +301,9 @@
...
@@ -301,9 +301,9 @@
:file-list=
"fileList"
:file-list=
"fileList"
list-type=
"picture-card"
list-type=
"picture-card"
class=
"avatar-uploader"
class=
"avatar-uploader"
action=
"#"
:show-file-list=
"false"
:show-file-list=
"false"
:before-upload=
"handleUploadBeforeFake"
:before-upload=
"handleUploadBefore"
:http-request=
"uploadFile"
:auto-upload=
"true"
:auto-upload=
"true"
>
>
<img
v-if=
"imageUrl"
:src=
"imageUrl"
class=
"avatar"
alt=
""
>
<img
v-if=
"imageUrl"
:src=
"imageUrl"
class=
"avatar"
alt=
""
>
...
@@ -497,11 +497,16 @@ export default {
...
@@ -497,11 +497,16 @@ export default {
contentPreview
()
{
contentPreview
()
{
this
.
open
=
true
this
.
open
=
true
},
},
async
handleUploadBeforeFake
(
file
)
{
/** 上传文件校验**/
handleUploadBefore
(
file
)
{
if
(
!
file
.
type
.
startsWith
(
'image/'
))
{
if
(
!
file
.
type
.
startsWith
(
'image/'
))
{
this
.
$message
.
warning
(
'只支持上传图片'
)
this
.
$message
.
warning
(
'只支持上传图片'
)
return
false
return
false
}
}
},
/** 上传文件 **/
uploadFile
(
object
)
{
const
file
=
object
.
file
const
formData
=
new
FormData
()
const
formData
=
new
FormData
()
formData
.
append
(
'file'
,
file
)
formData
.
append
(
'file'
,
file
)
formData
.
append
(
'temp'
,
'CmsActivity'
)
formData
.
append
(
'temp'
,
'CmsActivity'
)
...
...
src/views/contentManagement/banner/index.vue
View file @
ca3f0ee6
...
@@ -157,9 +157,9 @@
...
@@ -157,9 +157,9 @@
:file-list=
"fileList"
:file-list=
"fileList"
list-type=
"picture-card"
list-type=
"picture-card"
class=
"avatar-uploader"
class=
"avatar-uploader"
action=
"#"
:show-file-list=
"false"
:show-file-list=
"false"
:before-upload=
"handleUploadBeforeFake"
:before-upload=
"handleUploadBefore"
:http-request=
"uploadFile"
:auto-upload=
"true"
:auto-upload=
"true"
>
>
<img
v-if=
"imageUrl"
:src=
"imageUrl"
class=
"avatar"
alt=
""
>
<img
v-if=
"imageUrl"
:src=
"imageUrl"
class=
"avatar"
alt=
""
>
...
@@ -444,12 +444,9 @@ export default {
...
@@ -444,12 +444,9 @@ export default {
}).
catch
(
function
()
{
}).
catch
(
function
()
{
})
})
},
},
// 上传
/** 上传文件 */
async
handleUploadBeforeFake
(
file
)
{
uploadFile
(
object
)
{
if
(
!
file
.
type
.
startsWith
(
'image/'
))
{
const
file
=
object
.
file
this
.
$message
.
warning
(
'只支持上传图片'
)
return
false
}
const
formData
=
new
FormData
()
const
formData
=
new
FormData
()
formData
.
append
(
'file'
,
file
)
formData
.
append
(
'file'
,
file
)
formData
.
append
(
'temp'
,
'CmsBanner'
)
formData
.
append
(
'temp'
,
'CmsBanner'
)
...
@@ -495,6 +492,13 @@ export default {
...
@@ -495,6 +492,13 @@ export default {
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
error
(
'上传失败:'
,
error
)
console
.
error
(
'上传失败:'
,
error
)
}
}
},
/** 上传文件校验 */
handleUploadBefore
(
file
)
{
if
(
!
file
.
type
.
startsWith
(
'image/'
))
{
this
.
$message
.
warning
(
'只支持上传图片'
)
return
false
}
}
}
}
}
}
}
...
...
src/views/contentManagement/notice/info/index.vue
View file @
ca3f0ee6
...
@@ -110,9 +110,9 @@
...
@@ -110,9 +110,9 @@
:file-list=
"fileList"
:file-list=
"fileList"
list-type=
"picture-card"
list-type=
"picture-card"
class=
"avatar-uploader"
class=
"avatar-uploader"
action=
"#"
:show-file-list=
"false"
:show-file-list=
"false"
:before-upload=
"handleUploadBeforeFake"
:before-upload=
"handleUploadBefore"
:http-request=
"uploadFile"
:auto-upload=
"true"
:auto-upload=
"true"
>
>
<img
v-if=
"imageUrl"
:src=
"imageUrl"
class=
"avatar"
alt=
""
>
<img
v-if=
"imageUrl"
:src=
"imageUrl"
class=
"avatar"
alt=
""
>
...
@@ -308,11 +308,16 @@ export default {
...
@@ -308,11 +308,16 @@ export default {
handleUploadExceed
(
files
,
fileList
)
{
handleUploadExceed
(
files
,
fileList
)
{
this
.
$message
.
warning
(
`最多上传8张图片`
)
this
.
$message
.
warning
(
`最多上传8张图片`
)
},
},
async
handleUploadBeforeFake
(
file
)
{
/** 上传文件校验 **/
handleUploadBefore
(
file
)
{
if
(
!
file
.
type
.
startsWith
(
'image/'
))
{
if
(
!
file
.
type
.
startsWith
(
'image/'
))
{
this
.
$message
.
warning
(
'只支持上传图片'
)
this
.
$message
.
warning
(
'只支持上传图片'
)
return
false
return
false
}
}
},
/** 上传文件 **/
uploadFile
(
object
)
{
const
file
=
object
.
file
const
formData
=
new
FormData
()
const
formData
=
new
FormData
()
formData
.
append
(
'file'
,
file
)
formData
.
append
(
'file'
,
file
)
formData
.
append
(
'temp'
,
'CmsNotice'
)
formData
.
append
(
'temp'
,
'CmsNotice'
)
...
...
src/views/operationsManagement/member/info/index.vue
View file @
ca3f0ee6
...
@@ -16,10 +16,10 @@
...
@@ -16,10 +16,10 @@
:file-list=
"fileList"
:file-list=
"fileList"
list-type=
"picture-card"
list-type=
"picture-card"
class=
"avatar-uploader"
class=
"avatar-uploader"
action=
"#"
:disabled=
"secondFromDisabled"
:disabled=
"secondFromDisabled"
:show-file-list=
"false"
:show-file-list=
"false"
:before-upload=
"handleUploadBeforeFake"
:before-upload=
"handleUploadBefore"
:http-request=
"uploadFile"
:auto-upload=
"true"
:auto-upload=
"true"
>
>
<img
v-if=
"imageUrl"
:src=
"imageUrl"
class=
"avatar"
alt=
""
>
<img
v-if=
"imageUrl"
:src=
"imageUrl"
class=
"avatar"
alt=
""
>
...
@@ -1051,12 +1051,16 @@ export default {
...
@@ -1051,12 +1051,16 @@ export default {
callback
()
callback
()
}
}
},
},
/
/ 上传
/
** 上传文件校验 **/
async
handleUploadBeforeFak
e
(
file
)
{
handleUploadBefor
e
(
file
)
{
if
(
!
file
.
type
.
startsWith
(
'image/'
))
{
if
(
!
file
.
type
.
startsWith
(
'image/'
))
{
this
.
$message
.
warning
(
'只支持上传图片'
)
this
.
$message
.
warning
(
'只支持上传图片'
)
return
false
return
false
}
}
},
/** 上传文件 **/
uploadFile
(
object
){
const
file
=
object
.
file
const
formData
=
new
FormData
()
const
formData
=
new
FormData
()
formData
.
append
(
'file'
,
file
)
formData
.
append
(
'file'
,
file
)
formData
.
append
(
'temp'
,
'OpmMember'
)
formData
.
append
(
'temp'
,
'OpmMember'
)
...
...
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