添加gitea第三方登录,绑定成功添加提示信息
This commit is contained in:
parent
2f961f285c
commit
b4a71388d2
|
|
@ -59,12 +59,9 @@
|
||||||
<!-- thirdPartyLogoInfoList -->
|
<!-- thirdPartyLogoInfoList -->
|
||||||
<template v-for="(item, index) in thirdPartyLogoInfoList" :key="index">
|
<template v-for="(item, index) in thirdPartyLogoInfoList" :key="index">
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<img :src="item.logo" alt="" @click="thirdLogin(item.name)" />
|
<el-tooltip :content="item.label" placement="top">
|
||||||
<!-- <el-button
|
<img :src="item.logo" alt="" @click="thirdLogin(item.name)" />
|
||||||
class="github-btn"
|
</el-tooltip>
|
||||||
@click="thirdLogin(item.name)"
|
|
||||||
circle
|
|
||||||
></el-button> -->
|
|
||||||
</el-col>
|
</el-col>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -127,26 +124,42 @@ const thirdPartyLogoInfoList = ref([
|
||||||
{
|
{
|
||||||
name: "github",
|
name: "github",
|
||||||
logo: "https://www.ljsea.top/wp-content/uploads/2025/05/github-48-logo.png",
|
logo: "https://www.ljsea.top/wp-content/uploads/2025/05/github-48-logo.png",
|
||||||
|
label: "GitHub",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "gitee",
|
name: "gitee",
|
||||||
logo: "https://www.ljsea.top/wp-content/uploads/2025/04/gitee.png",
|
logo: "https://www.ljsea.top/wp-content/uploads/2025/04/gitee.png",
|
||||||
|
label: "Gitee",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "qq",
|
name: "qq",
|
||||||
logo: "https://www.ljsea.top/wp-content/uploads/2025/05/icons8-qq-48.png",
|
logo: "https://www.ljsea.top/wp-content/uploads/2025/05/icons8-qq-48.png",
|
||||||
|
label: "QQ",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "google",
|
name: "google",
|
||||||
logo: "https://www.ljsea.top/wp-content/uploads/2025/05/icons8-google-48.png",
|
logo: "https://www.ljsea.top/wp-content/uploads/2025/05/icons8-google-48.png",
|
||||||
|
label: "Google",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "facebook",
|
name: "facebook",
|
||||||
logo: "https://www.ljsea.top/wp-content/uploads/2025/05/icons8-facebook.png",
|
logo: "https://www.ljsea.top/wp-content/uploads/2025/05/icons8-facebook.png",
|
||||||
|
label: "Facebook",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "stackoverflow",
|
name: "stackoverflow",
|
||||||
logo: "https://www.ljsea.top/wp-content/uploads/2025/05/logo-stackoverflow-48.png",
|
logo: "https://www.ljsea.top/wp-content/uploads/2025/05/logo-stackoverflow-48.png",
|
||||||
|
label: "StackOverflow",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "my_gitea",
|
||||||
|
logo: "https://www.ljsea.top/wp-content/uploads/2025/05/my_Gitea.png",
|
||||||
|
label: "Gitea自建",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'gitea',
|
||||||
|
logo: 'https://www.ljsea.top/wp-content/uploads/2025/05/PajamasGitea.png',
|
||||||
|
label: 'Gitea官方',
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -170,6 +170,8 @@ const thirdPartyPlatform = ref([
|
||||||
{ label: 'Google', value: 'google' },
|
{ label: 'Google', value: 'google' },
|
||||||
{ label: 'Facebook', value: 'facebook'},
|
{ label: 'Facebook', value: 'facebook'},
|
||||||
{ label: 'StackOverflow', value: 'stackoverflow' },
|
{ label: 'StackOverflow', value: 'stackoverflow' },
|
||||||
|
{ label: "Gitea官方", value: "gitea"},
|
||||||
|
{ label: "Gitea自建", value: "my_gitea"}
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -454,6 +456,7 @@ const thirdLogin = async (type) => {
|
||||||
localStorage.setItem("username", status["username"]);
|
localStorage.setItem("username", status["username"]);
|
||||||
let now = new Date();
|
let now = new Date();
|
||||||
localStorage.setItem("end_time", (now.setDate(now.getHours() + 12)).toString()); //过期时间
|
localStorage.setItem("end_time", (now.setDate(now.getHours() + 12)).toString()); //过期时间
|
||||||
|
ElMessage.success("绑定成功!");
|
||||||
getThirdPartyUserInfo();
|
getThirdPartyUserInfo();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue