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
e6633eb4
Commit
e6633eb4
authored
Feb 13, 2025
by
jiyonggang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
加一个删除按钮
parent
a98fb04c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
2 deletions
+47
-2
report.js
src/api/report.js
+9
-0
googleOauthYoutube.vue
src/views/authAccount/googleOauthYoutube.vue
+38
-2
No files found.
src/api/report.js
View file @
e6633eb4
...
...
@@ -612,5 +612,14 @@ export function deleteMaterialById(params) {
params
})
}
export
function
deleteYouTubeAccountById
(
params
)
{
return
request
({
// url: 'http://localhost:8567/youtube/deleteToken',
url
:
process
.
env
.
PUTIN_API
+
'/youtube/deleteToken'
,
method
:
'get'
,
params
})
}
// ----------------------------------------
src/views/authAccount/googleOauthYoutube.vue
View file @
e6633eb4
...
...
@@ -16,12 +16,17 @@
<el-table
:data=
"tokenList"
style=
"width: 100%"
border
>
<!--
<el-table-column
prop=
"id"
label=
"ID"
width=
"50"
></el-table-column>
--
>
<el-table-column
prop=
"id"
label=
"ID"
width=
"50"
></el-table-column
>
<!--
<el-table-column
prop=
"appName"
label=
"应用名"
></el-table-column>
-->
<!--
<el-table-column
prop=
"pkg"
label=
"包名"
></el-table-column>
-->
<el-table-column
prop=
"alias"
label=
"别名"
></el-table-column>
<el-table-column
prop=
"access_token"
label=
"访问密钥"
></el-table-column>
<el-table-column
prop=
"refresh_token"
label=
"刷新密钥"
></el-table-column>
<el-table-column
label=
"操作"
width=
"100"
>
<template
slot-scope=
"scope"
>
<el-button
type=
"primary"
@
click=
"handleDelete(scope.row)"
>
删除
</el-button>
</
template
>
</el-table-column>
<el-table-column
prop=
"create_time"
label=
"创建时间"
:formatter=
"formatDate"
></el-table-column>
<el-table-column
prop=
"update_time"
label=
"更改时间"
:formatter=
"formatDate"
></el-table-column>
</el-table>
...
...
@@ -47,7 +52,7 @@ import axios from 'axios';
import
ZxAppsSelect
from
'@/components/ZxAppsSelect'
import
vueJsonEditor
from
"vue-json-editor"
;
import
{
getGoogleTokenList
}
from
"../../api/report"
;
import
{
getGoogleTokenList
,
deleteYouTubeAccountById
}
from
"../../api/report"
;
export
default
{
components
:
{
vueJsonEditor
},
...
...
@@ -108,6 +113,37 @@ export default {
formatDate
(
row
,
column
,
cellValue
)
{
return
moment
(
cellValue
).
format
(
'YYYY-MM-DD HH:mm:ss'
);
},
handleDelete
(
row
)
{
this
.
$confirm
(
'此操作将永久删除该YouTube账户, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
})
.
then
(()
=>
{
return
deleteYouTubeAccountById
({
id
:
row
.
id
});
})
.
then
(
response
=>
{
if
(
response
.
status
===
1
)
{
this
.
$message
({
type
:
'success'
,
message
:
'删除成功!'
});
this
.
getTokenList
();
}
else
{
this
.
$message
.
error
(
'删除失败: '
+
response
.
msg
);
}
})
.
catch
(
error
=>
{
if
(
error
===
'cancel'
)
{
this
.
$message
({
type
:
'info'
,
message
:
'已取消删除'
});
}
else
{
this
.
$message
.
error
(
'删除失败: '
+
error
);
}
});
}
},
};
</
script
>
...
...
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