@fy-/fws-vue 0.5.2 → 0.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/fws/UserFlow.vue +12 -7
- package/package.json +1 -1
|
@@ -120,9 +120,6 @@ const userFlow = async (params: paramsType = { initial: false }) => {
|
|
|
120
120
|
},
|
|
121
121
|
)) as UserFlow;
|
|
122
122
|
if (response.value?.result == "success") {
|
|
123
|
-
if (props.onSuccess) {
|
|
124
|
-
await props.onSuccess();
|
|
125
|
-
}
|
|
126
123
|
if (response.value.data.complete == true && response.value.data.user) {
|
|
127
124
|
store.setUser(response.value.data.user);
|
|
128
125
|
const actualReturnTo = response.value.data.redirect
|
|
@@ -130,11 +127,19 @@ const userFlow = async (params: paramsType = { initial: false }) => {
|
|
|
130
127
|
: returnTo.value;
|
|
131
128
|
session.value = null;
|
|
132
129
|
if (isExternalUrl(actualReturnTo)) {
|
|
133
|
-
|
|
130
|
+
if (props.onSuccess) {
|
|
131
|
+
await props.onSuccess();
|
|
132
|
+
} else {
|
|
133
|
+
window.location.href = actualReturnTo;
|
|
134
|
+
}
|
|
134
135
|
} else {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
else
|
|
136
|
+
if (props.onSuccess) {
|
|
137
|
+
await props.onSuccess();
|
|
138
|
+
} else {
|
|
139
|
+
const routeExists = router.resolve(actualReturnTo);
|
|
140
|
+
if (routeExists.matched.length != 0) router.push(actualReturnTo);
|
|
141
|
+
else window.location.href = actualReturnTo;
|
|
142
|
+
}
|
|
138
143
|
}
|
|
139
144
|
return;
|
|
140
145
|
}
|