From ba24afce52bcdffdbccf6475544c79c4eefcd14e Mon Sep 17 00:00:00 2001 From: 疯狂的狮子Li <15040126243@163.com> Date: 星期二, 09 七月 2024 11:02:34 +0800 Subject: [PATCH] !131 ♥️发布 vue 版本 5.2.1 与 cloud 版本 2.2.0 Merge pull request !131 from 疯狂的狮子Li/dev --- src/views/system/user/profile/thirdParty.vue | 90 +++++++++++++++++++++++--------------------- 1 files changed, 47 insertions(+), 43 deletions(-) diff --git a/src/views/system/user/profile/thirdParty.vue b/src/views/system/user/profile/thirdParty.vue index e5791ef..5cd7347 100644 --- a/src/views/system/user/profile/thirdParty.vue +++ b/src/views/system/user/profile/thirdParty.vue @@ -1,17 +1,17 @@ <template> <div> - <el-table :data="auths" style="width: 100%; height: 100%; font-size: 10px"> - <el-table-column label="搴忓彿" width="50" type="index"></el-table-column> + <el-table :data="auths" style="width: 100%; height: 100%; font-size: 14px"> + <el-table-column label="搴忓彿" width="50" type="index" /> <el-table-column label="缁戝畾璐﹀彿骞冲彴" width="140" align="center" prop="source" show-overflow-tooltip /> <el-table-column label="澶村儚" width="120" align="center" prop="avatar"> - <template v-slot="scope"> + <template #default="scope"> <img :src="scope.row.avatar" style="width: 45px; height: 45px" /> </template> </el-table-column> <el-table-column label="绯荤粺璐﹀彿" width="180" align="center" prop="userName" :show-overflow-tooltip="true" /> <el-table-column label="缁戝畾鏃堕棿" width="180" align="center" prop="createTime" /> <el-table-column label="鎿嶄綔" width="80" align="center" class-name="small-padding fixed-width"> - <template v-slot="scope"> + <template #default="scope"> <el-button size="small" type="text" @click="unlockAuth(scope.row)">瑙g粦</el-button> </template> </el-table-column> @@ -20,32 +20,35 @@ <div id="git-user-binding"> <h4 class="provider-desc">浣犲彲浠ョ粦瀹氫互涓嬬涓夋柟甯愬彿</h4> <div id="authlist" class="user-bind"> - <a class="third-app" href="#" @click="authUrl('gitee');" title="浣跨敤 Gitee 璐﹀彿鎺堟潈鐧诲綍"> - <div class="git-other-login-icon"> - <svg-icon icon-class="gitee" /> - </div> - <span class="app-name">Gitee</span> - </a> - - <a class="third-app" href="#" @click="authUrl('github');" title="浣跨敤 GitHub 璐﹀彿鎺堟潈鐧诲綍"> - <div class="git-other-login-icon"> - <svg-icon icon-class="github" /> - </div> - <span class="app-name">Github</span> - </a> - - <a class="third-app" href="#" @click="authUrl('wechar');" title="浣跨敤 寰俊 璐﹀彿鎺堟潈鐧诲綍"> + <a class="third-app" href="#" title="浣跨敤 寰俊 璐﹀彿鎺堟潈鐧诲綍" @click="authUrl('wechat')"> <div class="git-other-login-icon"> <svg-icon icon-class="wechat" /> </div> <span class="app-name">WeiXin</span> </a> - - <a class="third-app" href="#" @click="authUrl('qq');" title="浣跨敤 QQ 璐﹀彿鎺堟潈鐧诲綍"> + <a class="third-app" href="#" title="浣跨敤 MaxKey 璐﹀彿鎺堟潈鐧诲綍" @click="authUrl('maxkey')"> <div class="git-other-login-icon"> - <svg-icon icon-class="qq" /> + <svg-icon icon-class="maxkey" /> </div> - <span class="app-name">QQ</span> + <span class="app-name">MaxKey</span> + </a> + <a class="third-app" href="#" title="浣跨敤 TopIam 璐﹀彿鎺堟潈鐧诲綍" @click="authUrl('topiam')"> + <div class="git-other-login-icon"> + <svg-icon icon-class="topiam" /> + </div> + <span class="app-name">TopIam</span> + </a> + <a class="third-app" href="#" title="浣跨敤 Gitee 璐﹀彿鎺堟潈鐧诲綍" @click="authUrl('gitee')"> + <div class="git-other-login-icon"> + <svg-icon icon-class="gitee" /> + </div> + <span class="app-name">Gitee</span> + </a> + <a class="third-app" href="#" title="浣跨敤 GitHub 璐﹀彿鎺堟潈鐧诲綍" @click="authUrl('github')"> + <div class="git-other-login-icon"> + <svg-icon icon-class="github" /> + </div> + <span class="app-name">Github</span> </a> </div> </div> @@ -53,36 +56,39 @@ </template> <script lang="ts" setup> -import { authUnlock, authBinding } from "@/api/system/social/auth"; -import { PropType } from "vue"; +import { authUnlock, authBinding } from '@/api/system/social/auth'; +import { propTypes } from '@/utils/propTypes'; +import useUserStore from '@/store/modules/user'; + +const { proxy } = getCurrentInstance() as ComponentInternalInstance; const props = defineProps({ - auths: { - type: Object as PropType<any>, - } + auths: propTypes.any.isRequired }); const auths = computed(() => props.auths); - const unlockAuth = (row: any) => { ElMessageBox.confirm('鎮ㄧ‘瀹氳瑙i櫎"' + row.source + '"鐨勮处鍙风粦瀹氬悧锛�') .then(() => { return authUnlock(row.id); - }).then((res: any) => { + }) + .then((res: any) => { if (res.code === 200) { - ElMessage.success("瑙g粦鎴愬姛"); + proxy?.$modal.msgSuccess('瑙g粦鎴愬姛'); + proxy?.$tab.refreshPage(); } else { - ElMessage.error(res.msg); + proxy?.$modal.msgError(res.msg); } - }).catch(() => { }); + }) + .catch(() => {}); }; const authUrl = (source: string) => { - authBinding(source).then((res: any) => { + authBinding(source, useUserStore().tenantId).then((res: any) => { if (res.code === 200) { - window.location.href = res.msg; + window.location.href = res.data; } else { - ElMessage.error(res.msg); + proxy?.$modal.msgError(res.msg); } }); }; @@ -111,7 +117,7 @@ margin-top: 10px; } -.git-other-login-icon>img { +.git-other-login-icon > img { height: 32px; } @@ -122,15 +128,13 @@ } .provider-desc { - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, - "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Liberation Sans", - "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Wenquanyi Micro Hei", - "WenQuanYi Zen Hei", "ST Heiti", SimHei, SimSun, "WenQuanYi Zen Hei Sharp", - sans-serif; + font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', + 'Liberation Sans', 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', 'Wenquanyi Micro Hei', 'WenQuanYi Zen Hei', 'ST Heiti', SimHei, SimSun, + 'WenQuanYi Zen Hei Sharp', sans-serif; font-size: 1.071rem; } -td>img { +td > img { height: 20px; width: 20px; display: inline-block; -- Gitblit v1.9.3