diff --git a/src/components/edit/choosingIdentity.vue b/src/components/edit/choosingIdentity.vue index 1a64f35..aad77da 100644 --- a/src/components/edit/choosingIdentity.vue +++ b/src/components/edit/choosingIdentity.vue @@ -51,11 +51,14 @@ import { ElLoading } from 'element-plus' import { ref, reactive, onMounted, getCurrentInstance, defineEmits } from 'vue' -import { useRouter } from 'vue-router' +import { useRouter, useRoute } from 'vue-router' const { proxy } = getCurrentInstance() const router = useRouter() +const route = useRoute(); + + let identityList = ref([]) let popType = ref('') // choice agent: 确认是否是中介(有个人房源) affirmAgent: 确认是否是中介(有中介房源) @@ -75,12 +78,16 @@ let isintermediary = ref(0) let loading = ref(null) // 加载 + // 点击按钮 const ClickBtn = () => { if (identityList.value.length == 0) init() else popType.value = 'choice' } +if (route.path == "/choosing-identity") ClickBtn() + + async function init() { loading = ElLoading.service({ lock: true, @@ -98,6 +105,7 @@ async function init() { // isintermediary.value = 1 // console.log("data.isintermediary",data.isintermediary); + // if (data['ispopup'] == 0) overallJump() if (data['ispopup'] == 0) overallJump() else popType.value = 'choice' }).finally(() => { @@ -143,6 +151,7 @@ let confirmIntermediary = (isintermediary) => {