fix 修复 解绑三方应用不刷新页面数据问题

This commit is contained in:
疯狂的狮子Li 2023-07-12 10:48:33 +08:00
parent 9719d6d75c
commit a681353fe1

View File

@ -56,6 +56,8 @@
import { authUnlock, authBinding } from "@/api/system/social/auth"; import { authUnlock, authBinding } from "@/api/system/social/auth";
import { PropType } from "vue"; import { PropType } from "vue";
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const props = defineProps({ const props = defineProps({
auths: { auths: {
type: Object as PropType<any>, type: Object as PropType<any>,
@ -70,9 +72,10 @@ const unlockAuth = (row: any) => {
return authUnlock(row.id); return authUnlock(row.id);
}).then((res: any) => { }).then((res: any) => {
if (res.code === 200) { if (res.code === 200) {
ElMessage.success("解绑成功"); proxy?.$modal.msgSuccess("解绑成功");
proxy?.$tab.refreshPage();
} else { } else {
ElMessage.error(res.msg); proxy?.$modal.msgError(res.msg);
} }
}).catch(() => { }); }).catch(() => { });
}; };
@ -82,7 +85,7 @@ const authUrl = (source: string) => {
if (res.code === 200) { if (res.code === 200) {
window.location.href = res.data; window.location.href = res.data;
} else { } else {
ElMessage.error(res.msg); proxy?.$modal.msgError(res.msg);
} }
}); });
}; };