fix: 三方绑定接口联调

This commit is contained in:
JiangQiming 2023-01-10 15:34:13 +08:00
parent 79fc6a419c
commit c318d28044
2 changed files with 16 additions and 0 deletions

1
components.d.ts vendored
View File

@ -34,6 +34,7 @@ declare module '@vue/runtime-core' {
PermissionButton: typeof import('./src/components/PermissionButton/index.vue')['default']
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
TitleComponent: typeof import('./src/components/TitleComponent/index.vue')['default']
ValueItem: typeof import('./src/components/ValueItem/index.vue')['default']
}
}

View File

@ -171,6 +171,21 @@ const handleSubmit = () => {
console.log('error', err);
});
};
/**
* 绑定成功跳转至页面url的: redirect
*/
const goRedirect = () => {
const urlParams = new URLSearchParams(window.location.hash);
const redirectUrl =
urlParams.get('redirect') ||
window.location.href.split('redirect=')?.[1];
console.log('redirectUrl: ', redirectUrl);
//
if (redirectUrl && redirectUrl.indexOf('account/center/bind') === -1) {
window.location.href = decodeURIComponent(redirectUrl);
}
};
</script>
<style lang="less" scoped>