Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Unverified
Commit
fd266516
authored
Nov 29, 2023
by
Evol郑天
Committed by
Gitee
Nov 29, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复公众号-素材管理 上传时缺少accountId参数
Signed-off-by: Evol郑天 <jpevol@163.com>
parent
57b20f18
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
3 deletions
+15
-3
src/views/mp/material/components/UploadFile.vue
+4
-1
src/views/mp/material/components/UploadVideo.vue
+4
-1
src/views/mp/material/components/upload.ts
+1
-0
src/views/mp/material/index.vue
+6
-1
No files found.
src/views/mp/material/components/UploadFile.vue
View file @
fd266516
...
...
@@ -33,6 +33,8 @@ const message = useMessage()
const
props
=
defineProps
<
{
type
:
UploadType
}
>
()
const
accountId
=
inject
<
number
>
(
'accountId'
)
const
fileList
=
ref
<
UploadUserFile
[]
>
([])
const
emit
=
defineEmits
<
{
(
e
:
'uploaded'
,
v
:
void
)
...
...
@@ -41,7 +43,8 @@ const emit = defineEmits<{
const
uploadData
:
UploadData
=
reactive
({
type
:
UploadType
.
Image
,
title
:
''
,
introduction
:
''
introduction
:
''
,
accountId
:
accountId
!
})
/** 上传前检查 */
...
...
src/views/mp/material/components/UploadVideo.vue
View file @
fd266516
...
...
@@ -59,6 +59,8 @@ import { HEADERS, UploadData, UPLOAD_URL, UploadType, beforeVideoUpload } from '
const
message
=
useMessage
()
const
accountId
=
inject
<
number
>
(
'accountId'
)
const
uploadRules
:
FormRules
=
{
title
:
[{
required
:
true
,
message
:
'请输入标题'
,
trigger
:
'blur'
}],
introduction
:
[{
required
:
true
,
message
:
'请输入描述'
,
trigger
:
'blur'
}]
...
...
@@ -89,7 +91,8 @@ const fileList = ref<UploadUserFile[]>([])
const
uploadData
:
UploadData
=
reactive
({
type
:
UploadType
.
Video
,
title
:
''
,
introduction
:
''
introduction
:
''
,
accountId
:
accountId
!
})
const
uploadFormRef
=
ref
<
FormInstance
|
null
>
(
null
)
...
...
src/views/mp/material/components/upload.ts
View file @
fd266516
...
...
@@ -9,6 +9,7 @@ interface UploadData {
type
:
UploadType
title
:
string
introduction
:
string
accountId
:
number
}
const
beforeImageUpload
:
UploadProps
[
'beforeUpload'
]
=
(
rawFile
:
UploadRawFile
)
=>
...
...
src/views/mp/material/index.vue
View file @
fd266516
...
...
@@ -99,17 +99,22 @@ const type = ref<UploadType>(UploadType.Image) // 素材类型
const
loading
=
ref
(
false
)
// 遮罩层
const
list
=
ref
<
any
[]
>
([])
// 总条数
const
total
=
ref
(
0
)
// 数据列表
const
accountId
=
ref
(
-
1
)
provide
(
'accountId'
,
accountId
)
// 查询参数
const
queryParams
=
reactive
({
pageNo
:
1
,
pageSize
:
10
,
accountId
:
-
1
,
accountId
:
accountId
,
permanent
:
true
})
const
showCreateVideo
=
ref
(
false
)
// 是否新建视频的弹窗
/** 侦听公众号变化 **/
const
onAccountChanged
=
(
id
:
number
)
=>
{
accountId
.
value
=
id
queryParams
.
accountId
=
id
queryParams
.
pageNo
=
1
getList
()
...
...
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