我的页面的跳转
This commit is contained in:
@@ -103,13 +103,14 @@ import pageFooter from '@/components/footer/footer.vue'
|
||||
import publicListItem from '@/components/public/public-list-item.vue'
|
||||
import emptyDuck from '@/components/public/empty-duck.vue'
|
||||
import { ref, reactive, onMounted, onUnmounted, getCurrentInstance, nextTick } from 'vue'
|
||||
import { useRouter } from 'vue-router';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
|
||||
import { ElLoading, ElMessage } from 'element-plus'
|
||||
import Masonry from 'masonry-layout';
|
||||
|
||||
const { proxy } = getCurrentInstance()
|
||||
|
||||
const route = useRoute();
|
||||
|
||||
const gridContainer = ref(null);
|
||||
const gridContainerpublish = ref(null);
|
||||
@@ -149,19 +150,19 @@ const init = () => {
|
||||
if (res.code != 200) return
|
||||
let data = res.data
|
||||
|
||||
if (data.count['publish'] > 0) {
|
||||
tabState.value = 'publish'
|
||||
getPublishData()
|
||||
} else {
|
||||
tabState.value = 'fav'
|
||||
getFavData()
|
||||
}
|
||||
if (!route.query['tab']) {
|
||||
if (data.count['publish'] > 0) tabState.value = 'publish'
|
||||
else tabState.value = 'fav'
|
||||
} else tabState.value = route.query['tab']
|
||||
|
||||
if (tabState.value == 'publish') getPublishData()
|
||||
else getFavData()
|
||||
|
||||
user.value = data.user
|
||||
count.value = data.count
|
||||
newmessagenum.value = data.newmessagenum
|
||||
validityidentity.value = data.validityidentity
|
||||
}).finally(()=>{})
|
||||
}).finally(() => { })
|
||||
}
|
||||
|
||||
|
||||
@@ -522,5 +523,4 @@ onUnmounted(() => {
|
||||
align-items: center;
|
||||
border-radius: 16px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user