Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
Z
zxn-adputin
Project
Project
Details
Activity
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lijin
zxn-adputin
Commits
a98fb04c
Commit
a98fb04c
authored
Feb 13, 2025
by
lijin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加软删除素材的接口
parent
318d8afd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
18 deletions
+20
-18
report.js
src/api/report.js
+8
-1
AdMaterialManager.vue
src/views/createMaterial/AdMaterialManager.vue
+12
-17
No files found.
src/api/report.js
View file @
a98fb04c
...
@@ -604,6 +604,13 @@ export function getYoutubeUploadDetaillist() {
...
@@ -604,6 +604,13 @@ export function getYoutubeUploadDetaillist() {
})
})
}
}
export
function
deleteMaterialById
(
params
)
{
return
request
({
// url: 'http://localhost:8567/material/getYoutubeUploadDetaillist',
url
:
process
.
env
.
PUTIN_API
+
'/material/business/deleteMaterialById'
,
method
:
'post'
,
params
})
}
// ----------------------------------------
// ----------------------------------------
src/views/createMaterial/AdMaterialManager.vue
View file @
a98fb04c
...
@@ -256,7 +256,8 @@ import {
...
@@ -256,7 +256,8 @@ import {
uploadMaterial
,
uploadMaterial
,
getMaterialDesigners
,
getMaterialDesigners
,
getAllTags
,
getAllTags
,
getMaterialsByTag
getMaterialsByTag
,
deleteMaterialById
}
from
'@/api/report'
;
}
from
'@/api/report'
;
export
default
{
export
default
{
...
@@ -620,27 +621,21 @@ export default {
...
@@ -620,27 +621,21 @@ export default {
},
},
// 删除文件
// 删除文件
handleDelete
(
file
)
{
handleDelete
(
row
)
{
this
.
$confirm
(
'确认删除该文件吗?'
,
'提示'
,
{
this
.
$confirm
(
'确认删除该文件吗?'
,
'提示'
,
{
type
:
'warning'
type
:
'warning'
})
})
.
then
(
async
()
=>
{
.
then
(()
=>
{
try
{
this
.
loading
=
true
const
response
=
await
this
.
request
({
deleteMaterialById
({
id
:
row
.
id
}).
then
((
res
)
=>
{
url
:
'/api/materials/delete'
,
if
(
res
.
status
==
200
)
{
method
:
'post'
,
this
.
$message
.
success
(
"删除成功!"
)
params
:
{
fileId
:
file
.
id
}
this
.
fetchMaterialsByDirectoryId
(
this
.
currentDirectory
)
});
if
(
response
.
code
===
0
)
{
this
.
$message
.
success
(
'删除成功'
);
await
this
.
fetchMaterials
(
this
.
currentDirectory
);
// 重新获取文件列表
}
else
{
}
else
{
this
.
$message
.
error
(
response
.
message
||
'删除失败'
);
this
.
$message
.
error
(
"保存失败!"
)
this
.
loading
=
false
}
}
}
catch
(
error
)
{
})
this
.
$message
.
error
(
'删除失败'
);
console
.
error
(
'删除文件失败:'
,
error
);
}
})
})
.
catch
(()
=>
{});
.
catch
(()
=>
{});
},
},
...
...
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