|
|
|
@ -13,14 +13,20 @@
@@ -13,14 +13,20 @@
|
|
|
|
|
</ASteps> |
|
|
|
|
</div> |
|
|
|
|
<div class="mt-5"> |
|
|
|
|
<Step1 v-show="state.current === 0" @next="state.current++"/> |
|
|
|
|
<Step1 v-show="state.current === 0" |
|
|
|
|
:push-enterprise="state.pushEnterprise" |
|
|
|
|
@next=" val => { |
|
|
|
|
state.current++ |
|
|
|
|
state.pushEnterprise.status = val |
|
|
|
|
}" |
|
|
|
|
/> |
|
|
|
|
<Step2 v-show="state.current === 1" :push-enterprise="state.pushEnterprise" @previous="state.current--"/> |
|
|
|
|
<Step3 v-show="state.current === 2"/> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
<script lang="ts" setup> |
|
|
|
|
import { ref, unref, computed, CSSProperties, reactive, onMounted } from 'vue'; |
|
|
|
|
import { ref, unref, computed, CSSProperties, reactive, onBeforeMount } from 'vue'; |
|
|
|
|
import Step1 from './Step1.vue'; |
|
|
|
|
import Step2 from './Step2.vue'; |
|
|
|
|
import Step3 from './Step3.vue'; |
|
|
|
@ -32,7 +38,7 @@
@@ -32,7 +38,7 @@
|
|
|
|
|
interface State { |
|
|
|
|
current: number; |
|
|
|
|
loadingStatus: boolean; |
|
|
|
|
pushEnterprise: PushEnterprise | undefined; |
|
|
|
|
pushEnterprise: PushEnterprise | {}; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const ASteps = Steps; |
|
|
|
@ -41,7 +47,7 @@
@@ -41,7 +47,7 @@
|
|
|
|
|
const state = reactive<State>({ |
|
|
|
|
current: 0, |
|
|
|
|
loadingStatus: false, |
|
|
|
|
pushEnterprise: undefined |
|
|
|
|
pushEnterprise: {} |
|
|
|
|
}); |
|
|
|
|
const { contentHeight } = useContentHeight( |
|
|
|
|
computed(() => true), |
|
|
|
@ -52,7 +58,7 @@
@@ -52,7 +58,7 @@
|
|
|
|
|
ref(30)); |
|
|
|
|
const getContentStyle = computed((): CSSProperties => ({ minHeight: `${unref(contentHeight)}px` })); |
|
|
|
|
|
|
|
|
|
onMounted(async () => { |
|
|
|
|
onBeforeMount(async () => { |
|
|
|
|
await loadPushEnterprise(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
@ -61,11 +67,11 @@
@@ -61,11 +67,11 @@
|
|
|
|
|
const pushEnterprise = await getAuthData(); |
|
|
|
|
state.pushEnterprise = pushEnterprise; |
|
|
|
|
switch (pushEnterprise?.status) { |
|
|
|
|
case 1: |
|
|
|
|
case -1: |
|
|
|
|
case 0: |
|
|
|
|
state.current = 1; |
|
|
|
|
break; |
|
|
|
|
case 1: |
|
|
|
|
case 2: |
|
|
|
|
state.current = 2; |
|
|
|
|
break; |
|
|
|
|
default: |
|
|
|
|