|
|
@@ -89,7 +89,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
-import { ref, reactive, onBeforeMount } from 'vue'
|
|
|
+import { ref, reactive, onBeforeMount, onActivated } from 'vue'
|
|
|
import { useRouter, useRoute } from 'vue-router'
|
|
|
import { showFailToast, showSuccessToast, showToast, showLoadingToast } from 'vant'
|
|
|
import {
|
|
|
@@ -326,10 +326,43 @@ const toAgreement = (type: string) => {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+const resetLoginState = () => {
|
|
|
+ formData.mobile = ''
|
|
|
+ formData.code = ''
|
|
|
+ agree.value = false
|
|
|
+
|
|
|
+ isCounting.value = false
|
|
|
+ countDown.value = 60
|
|
|
+ sending.value = false
|
|
|
+
|
|
|
+ showDialog.value = false
|
|
|
+ loginDialog.value = false
|
|
|
+ changePasswordDialog.value = false
|
|
|
+
|
|
|
+ if (timer) {
|
|
|
+ clearInterval(timer)
|
|
|
+ timer = undefined
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+onActivated(() => {
|
|
|
+ if (route.query.from === 'reject') {
|
|
|
+ resetLoginState()
|
|
|
+ router.replace({
|
|
|
+ path: route.path,
|
|
|
+ query: {
|
|
|
+ pushRecordId: route.query.pushRecordId,
|
|
|
+ },
|
|
|
+ })
|
|
|
+ }
|
|
|
+})
|
|
|
+
|
|
|
onBeforeMount(() => {
|
|
|
userStore.LogOut()
|
|
|
registerUrlParams.value.returnUrl = `${location.origin}/h5${route.fullPath}`
|
|
|
const pushRecordId = route?.query.pushRecordId || ''
|
|
|
+ console.log('pushRecordId', pushRecordId)
|
|
|
+
|
|
|
if (pushRecordId) {
|
|
|
sendEtsSms.pushRecordId = pushRecordId as string
|
|
|
userStore.setPushRecordId(pushRecordId as string)
|