Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
xieyonghong 2023-01-10 15:58:33 +08:00
commit 458b4ae3d3
1 changed files with 15 additions and 0 deletions

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>