Commit 0d3565f9 authored by lijin's avatar lijin

modified

parent f2f8d3f0
<!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
...@@ -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="1000"> 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="180"> width="250">
</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();
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment