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
e85db9e6
Commit
e85db9e6
authored
Mar 24, 2025
by
lijin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modified
parent
5abbd4df
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
112 additions
and
66 deletions
+112
-66
report.js
src/api/report.js
+2
-1
googleOauthYoutube.vue
src/views/authAccount/googleOauthYoutube.vue
+110
-65
No files found.
src/api/report.js
View file @
e85db9e6
...
@@ -413,11 +413,12 @@ export function backhaul(params) {
...
@@ -413,11 +413,12 @@ export function backhaul(params) {
})
})
}
}
export
function
getGoogleTokenList
()
{
export
function
getGoogleTokenList
(
params
)
{
return
request
({
return
request
({
// url: 'http://localhost:8567/youtube/getTokenList',
// url: 'http://localhost:8567/youtube/getTokenList',
url
:
process
.
env
.
PUTIN_API
+
'/youtube/getTokenList'
,
url
:
process
.
env
.
PUTIN_API
+
'/youtube/getTokenList'
,
method
:
"get"
,
method
:
"get"
,
params
})
})
}
}
export
function
getYoutubeAccountList
()
{
export
function
getYoutubeAccountList
()
{
...
...
src/views/authAccount/googleOauthYoutube.vue
View file @
e85db9e6
<
template
>
<
template
>
<div
class=
"app-container"
>
<div
class=
"app-container"
>
<div
class=
"channel-management"
>
<div
class=
"channel-management"
>
<div
class=
"header-section"
>
<!-- 查询条件 -->
<el-button
type=
"primary"
class=
"add-button"
@
click=
"authorize()"
>
添加频道
</el-button>
<div
class=
"filter-container"
>
<div
class=
"info-text"
>
<!--
<div
class=
"filter-item"
>
<i
class=
"el-icon-info"
></i>
<span
class=
"filter-label"
>
名称
</span>
<span>
当前公共主体已授权2个,上限为15个,如有问题,请联系系统管理员
</span>
<el-input
v-model=
"queryParams.name"
placeholder=
"请输入"
clearable
class=
"filter-input"
></el-input>
</div>
-->
<div
class=
"filter-item"
>
<span
class=
"filter-label"
>
状态
</span>
<el-select
v-model=
"queryParams.status"
placeholder=
"全部"
clearable
class=
"filter-input"
@
change=
"handleQuery"
>
<el-option
label=
"全部"
value=
""
></el-option>
<el-option
label=
"正常"
value=
"1"
></el-option>
<el-option
label=
"受限"
value=
"2"
></el-option>
</el-select>
</div>
</div>
</div>
</div>
<!-- 操作区 -->
<div
class=
"operation-container"
>
<div
class=
"operation-left"
>
<el-button
type=
"primary"
class=
"add-button"
@
click=
"authorize()"
>
添加频道
</el-button>
</div>
<div
class=
"operation-right"
>
<el-button
icon=
"el-icon-refresh"
class=
"refresh-btn"
@
click=
"handleQuery"
>
刷新
</el-button>
</div>
</div>
<!--<!–
<p
v-if=
"authCode"
>
授权码:
{{
authCode
}}
</p>
–>
-->
<el-table
:data=
"tokenList"
style=
"width: 100%"
border
v-loading=
"loading"
>
<!--<!–
<p
v-if=
"accessToken"
>
访问令牌:
{{
accessToken
}}
</p>
–>
-->
<!--<!–
<p
v-if=
"refreshToken"
>
刷新令牌:
{{
refreshToken
}}
</p>
–>
av-->
<el-table
:data=
"tokenList"
style=
"width: 100%"
border
>
<!--
<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-column prop="id" label="id" width="50"></el-table-column>-->
<el-table-column
<el-table-column
prop=
"id"
prop=
"id"
label=
"频道ID"
label=
"频道ID"
width=
"100"
>
width=
"100"
align=
"center"
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
prop=
"picture"
prop=
"picture"
...
@@ -47,24 +45,38 @@
...
@@ -47,24 +45,38 @@
<el-table-column
<el-table-column
prop=
"name"
prop=
"name"
label=
"频道名称"
label=
"频道名称"
width=
"250"
>
width=
"250"
align=
"center"
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
prop=
"email"
prop=
"email"
label=
"邮箱"
label=
"邮箱"
width=
"250"
>
width=
"250"
align=
"center"
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"status"
label=
"状态"
width=
"100"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<el-tag
:type=
"scope.row.status === 1 || scope.row.status === '1' ? 'success' : 'warning'"
>
{{
scope
.
row
.
status
===
1
||
scope
.
row
.
status
===
'1'
?
'正常'
:
'受限'
}}
</el-tag>
</
template
>
</el-table-column>
<el-table-column
<el-table-column
prop=
"create_time"
prop=
"create_time"
:formatter=
"formatDate"
:formatter=
"formatDate"
label=
"添加时间"
>
label=
"添加时间"
align=
"center"
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
label=
"操作"
label=
"操作"
width=
"150"
>
width=
"150"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
type=
"text"
size=
"small"
class=
"operation-btn"
>
编辑
</el-button>
<el-button
type=
"text"
size=
"small"
class=
"operation-btn"
>
编辑
</el-button>
<el-button
type=
"text"
size=
"small"
class=
"operation-btn"
@
click=
"handleDelete(scope.row)"
>
删除
</el-button>
<el-button
type=
"text"
size=
"small"
class=
"operation-btn"
@
click=
"handleDelete(scope.row)"
>
删除
</el-button>
...
@@ -103,9 +115,16 @@ export default {
...
@@ -103,9 +115,16 @@ export default {
accessToken
:
null
,
accessToken
:
null
,
refreshToken
:
null
,
refreshToken
:
null
,
tokenList
:
[],
tokenList
:
[],
loading
:
false
,
showSuccessMessage
:
false
,
showSuccessMessage
:
false
,
showErrorMessage
:
false
,
showErrorMessage
:
false
,
errorMessage
:
''
,
errorMessage
:
''
,
queryParams
:
{
name
:
''
,
status
:
''
,
channel
:
''
,
uploadStatus
:
''
}
}),
}),
created
()
{
created
()
{
this
.
getTokenList
();
this
.
getTokenList
();
...
@@ -151,9 +170,28 @@ export default {
...
@@ -151,9 +170,28 @@ export default {
},
},
handleQuery
()
{
this
.
getTokenList
();
},
resetQuery
()
{
this
.
queryParams
=
{
name
:
''
,
status
:
''
,
channel
:
''
,
uploadStatus
:
''
};
this
.
getTokenList
();
},
getTokenList
(){
getTokenList
(){
getGoogleTokenList
().
then
(
res
=>
{
this
.
loading
=
true
;
getGoogleTokenList
(
this
.
queryParams
).
then
(
res
=>
{
this
.
tokenList
=
res
.
result
.
data
;
this
.
tokenList
=
res
.
result
.
data
;
this
.
loading
=
false
;
}).
catch
(
error
=>
{
this
.
loading
=
false
;
this
.
$message
.
error
(
'获取频道列表失败: '
+
error
);
})
})
},
},
...
@@ -167,9 +205,11 @@ export default {
...
@@ -167,9 +205,11 @@ export default {
type
:
'warning'
type
:
'warning'
})
})
.
then
(()
=>
{
.
then
(()
=>
{
this
.
loading
=
true
;
return
deleteYouTubeAccountById
({
id
:
row
.
id
});
return
deleteYouTubeAccountById
({
id
:
row
.
id
});
})
})
.
then
(
response
=>
{
.
then
(
response
=>
{
this
.
loading
=
false
;
if
(
response
.
status
===
1
)
{
if
(
response
.
status
===
1
)
{
this
.
$message
({
this
.
$message
({
type
:
'success'
,
type
:
'success'
,
...
@@ -181,8 +221,9 @@ export default {
...
@@ -181,8 +221,9 @@ export default {
}
}
})
})
.
catch
(
error
=>
{
.
catch
(
error
=>
{
this
.
loading
=
false
;
if
(
error
===
'cancel'
)
{
if
(
error
===
'cancel'
)
{
// 用户取消操作,不提示错误
}
else
{
}
else
{
this
.
$message
.
error
(
'删除失败: '
+
error
);
this
.
$message
.
error
(
'删除失败: '
+
error
);
}
}
...
@@ -195,56 +236,60 @@ export default {
...
@@ -195,56 +236,60 @@ export default {
<
style
scoped
>
<
style
scoped
>
.channel-management
{
.channel-management
{
padding
:
20px
;
padding
:
20px
;
background-color
:
#fff
;
border-radius
:
4px
;
box-shadow
:
0
1px
4px
rgba
(
0
,
0
,
0
,
0.08
);
}
}
.header-section
{
/* 查询条件样式 */
.filter-container
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
padding
:
15px
20px
;
margin-bottom
:
20px
;
border-bottom
:
1px
solid
#ebeef5
;
}
.add-button
{
background-color
:
#409EFF
;
}
}
.
info-text
{
.
filter-item
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
margin-left
:
10px
;
margin-right
:
20px
;
font-size
:
12px
;
color
:
#909399
;
}
}
.info-text
i
{
.filter-label
{
margin-right
:
5px
;
font-size
:
14px
;
color
:
#606266
;
margin-right
:
8px
;
}
}
.operation-btn
{
.filter-input
{
color
:
#409EFF
;
width
:
180px
;
padding
:
0
;
margin-right
:
10px
;
}
}
/* 操作区样式 */
.operation-container
{
display
:
flex
;
justify-content
:
space-between
;
padding
:
20px
0px
;
background-color
:
#fff
;
}
.
pagination-container
{
.
operation-left
{
display
:
flex
;
display
:
flex
;
justify-content
:
flex-end
;
align-items
:
center
;
margin-top
:
20px
;
}
}
.total-text
{
.operation-left
.el-button
{
margin-right
:
15px
;
margin-right
:
10px
;
font-size
:
13px
;
}
}
.page-size-dropdown
{
.operation-right
.el-button
{
margin-left
:
15px
;
font-size
:
14px
;
font-size
:
13px
;
cursor
:
pointer
;
}
}
.el-dropdown-link
{
/* 表格样式 */
color
:
#606266
;
.el-table
{
margin-top
:
5px
;
}
.operation-btn
{
margin-right
:
5px
;
}
}
</
style
>
</
style
>
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