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
0d3565f9
Commit
0d3565f9
authored
Mar 23, 2025
by
lijin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modified
parent
f2f8d3f0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
14 deletions
+48
-14
index.html
public/index.html
+18
-0
googleOauthYoutube.vue
src/views/authAccount/googleOauthYoutube.vue
+30
-14
No files found.
public/index.html
0 → 100644
View file @
0d3565f9
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"utf-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge,chrome=1"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
>
<meta
name=
"google-site-verification"
content=
"您需要替换成Google提供的验证码"
/>
<link
rel=
"icon"
href=
"<%= BASE_URL %>favicon.ico"
>
<title><
%=
webpackConfig
.
name
%
></title>
</head>
<body>
<noscript>
<strong>
We're sorry but
<
%=
webpackConfig
.
name
%
>
doesn't work properly without JavaScript enabled. Please enable it to continue.
</strong>
</noscript>
<div
id=
"app"
></div>
<!-- built files will be auto injected -->
</body>
</html>
\ No newline at end of file
src/views/authAccount/googleOauthYoutube.vue
View file @
0d3565f9
...
@@ -31,34 +31,45 @@
...
@@ -31,34 +31,45 @@
<!-- <el-table-column prop="update_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 prop="id" label="id" width="50"></el-table-column>-->
<el-table-column
prop=
"alias"
label=
"频道名称"
width=
"180"
>
</el-table-column>
<el-table-column
<el-table-column
prop=
"id"
prop=
"id"
label=
"频道ID"
label=
"频道ID"
width=
"100
0
"
>
width=
"100"
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
label=
"操作"
prop=
"picture"
width=
"150"
>
label=
"头像"
width=
"100"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
type=
"text"
size=
"small"
class=
"operation-btn"
>
编辑
</el-button>
<img
:src=
"scope.row.picture"
alt=
"头像"
style=
"width: 50px; height: 50px;"
>
<el-button
type=
"text"
size=
"small"
class=
"operation-btn"
@
click=
"handleDelete(scope.row)"
>
删除
</el-button>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
prop=
"
operater
"
prop=
"
name
"
label=
"
所属人员
"
label=
"
频道名称
"
width=
"
18
0"
>
width=
"
25
0"
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"email"
label=
"邮箱"
width=
"250"
>
</el-table-column>
<el-table-column
<el-table-column
prop=
"create_time"
prop=
"create_time"
:formatter=
"formatDate"
:formatter=
"formatDate"
label=
"添加时间"
>
label=
"添加时间"
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"操作"
width=
"150"
>
<
template
slot-scope=
"scope"
>
<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>
</
template
>
</el-table-column>
</el-table>
</el-table>
</div>
</div>
...
@@ -118,12 +129,16 @@ export default {
...
@@ -118,12 +129,16 @@ export default {
// }
// }
// const alias=this.alias;
// const alias=this.alias;
const
state
=
"auth"
;
const
state
=
"auth"
;
// 本地测试的配置,用了花生壳的域名
// const redirectUri = `https://4222i865s4.zicp.fun/youtube/add/getRefreshToken`;
// 正式的配置
const
redirectUri
=
`
${
process
.
env
.
PUTIN_API
}
/youtube/add/getRefreshToken`
;
const
redirectUri
=
`
${
process
.
env
.
PUTIN_API
}
/youtube/add/getRefreshToken`
;
const
clientId
=
'797378266354-sd6e02o2qpdk2rhsb0ltjc98i5k9l2co.apps.googleusercontent.com'
const
clientId
=
'797378266354-sd6e02o2qpdk2rhsb0ltjc98i5k9l2co.apps.googleusercontent.com'
const
scope
=
'https://www.googleapis.com/auth/youtube https://www.googleapis.com/auth/youtube.readonly https://www.googleapis.com/auth/youtubepartner https://www.googleapis.com/auth/yt-analytics-monetary.readonly https://www.googleapis.com/auth/yt-analytics.readonly https://www.googleapis.com/auth/youtube https://www.googleapis.com/auth/youtube.channel-memberships.creator https://www.googleapis.com/auth/youtube.force-ssl https://www.googleapis.com/auth/youtube.readonly https://www.googleapis.com/auth/youtube.upload https://www.googleapis.com/auth/youtubepartner https://www.googleapis.com/auth/youtubepartner-channel-audit https://www.googleapis.com/auth/yt-analytics-monetary.readonly https://www.googleapis.com/auth/yt-analytics.readonly'
;
const
scope
=
'
email profile
https://www.googleapis.com/auth/youtube https://www.googleapis.com/auth/youtube.readonly https://www.googleapis.com/auth/youtubepartner https://www.googleapis.com/auth/yt-analytics-monetary.readonly https://www.googleapis.com/auth/yt-analytics.readonly https://www.googleapis.com/auth/youtube https://www.googleapis.com/auth/youtube.channel-memberships.creator https://www.googleapis.com/auth/youtube.force-ssl https://www.googleapis.com/auth/youtube.readonly https://www.googleapis.com/auth/youtube.upload https://www.googleapis.com/auth/youtubepartner https://www.googleapis.com/auth/youtubepartner-channel-audit https://www.googleapis.com/auth/yt-analytics-monetary.readonly https://www.googleapis.com/auth/yt-analytics.readonly'
;
const
responseType
=
'code'
;
const
responseType
=
'code'
;
const
accessType
=
'offline'
;
const
accessType
=
'offline'
;
const
authUrl
=
new
URL
(
'https://accounts.google.com/o/oauth2/v2/auth'
);
const
authUrl
=
new
URL
(
'https://accounts.google.com/o/oauth2/v2/auth'
);
const
prompt
=
'consent'
;
authUrl
.
searchParams
.
append
(
'redirect_uri'
,
redirectUri
);
authUrl
.
searchParams
.
append
(
'redirect_uri'
,
redirectUri
);
authUrl
.
searchParams
.
append
(
'response_type'
,
responseType
);
authUrl
.
searchParams
.
append
(
'response_type'
,
responseType
);
...
@@ -131,6 +146,7 @@ export default {
...
@@ -131,6 +146,7 @@ export default {
authUrl
.
searchParams
.
append
(
'scope'
,
scope
);
authUrl
.
searchParams
.
append
(
'scope'
,
scope
);
authUrl
.
searchParams
.
append
(
'access_type'
,
accessType
);
authUrl
.
searchParams
.
append
(
'access_type'
,
accessType
);
authUrl
.
searchParams
.
append
(
'state'
,
state
);
authUrl
.
searchParams
.
append
(
'state'
,
state
);
authUrl
.
searchParams
.
append
(
'prompt'
,
prompt
);
window
.
location
.
href
=
authUrl
.
toString
();
window
.
location
.
href
=
authUrl
.
toString
();
},
},
...
...
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