跳转问题调整

This commit is contained in:
wuhongjian 2022-12-16 17:27:57 +08:00
parent 307f5bb4ce
commit 00d277dd39
5 changed files with 325 additions and 284 deletions

View File

@ -138,12 +138,20 @@
//
function viewDetails(id) {
console.log('id=========>', id)
router.push({
path: '/details',
// router.push({
// path: '/details',
// query: {
// id: id,
// },
// })
const detailPage = router.resolve({
path: '/details', //
query: {
id: id,
hiddenBackFlag: true,
},
})
window.open(detailPage.href, '_blank')
}
//
const praiseList = ref([])

View File

@ -59,12 +59,20 @@
//
function viewDetails(id) {
console.log('id=========>', id)
router.push({
path: '/demandDetails',
// router.push({
// path: '/demandDetails',
// query: {
// id: id,
// },
// })
const detailPage = router.resolve({
path: '/demandDetails', //
query: {
id: id,
// hiddenBackFlag: true,
},
})
window.open(detailPage.href, '_blank')
}
function jumpPage() {
router.push({

View File

@ -8,7 +8,7 @@
<div class="bottom">
<div class="item" v-for="item in productServiceData" :key="item.id">
<div class="img" :class="item.imgType"></div>
<a-tooltip >
<a-tooltip>
<template #title>{{ item.name }}</template>
<div class="name">{{ item.name }}</div>
</a-tooltip>
@ -81,18 +81,26 @@
query: {
// select: '',
select: DETAIL_PAGE_CONTENT_DEFAULT_TAB,
orderField:'tdr.create_date'
orderField: 'tdr.create_date',
},
})
}
const selectOne = (id) => {
console.log('点击===============》', id)
router.push({
path: '/details',
// router.push({
// path: '/details',
// query: {
// id: id,
// },
// })
const detailPage = router.resolve({
path: '/details', //
query: {
id: id,
hiddenBackFlag: true,
},
})
window.open(detailPage.href, '_blank')
}
</script>
<style lang="less" scoped>

View File

@ -48,11 +48,10 @@
<div class="dec">
<span>{{ item.deptName }}</span>
</div>
<a-tooltip >
<a-tooltip>
<template #title>{{ item.description || '暂无描述' }}</template>
<div class="text">{{item.description || '暂无描述'}}</div>
<div class="text">{{ item.description || '暂无描述' }}</div>
</a-tooltip>
</div>
</div>
</div>
@ -65,18 +64,18 @@
</div>
</template>
<script setup>
import { ref } from 'vue'
import { pageWithAttrs } from '@/api/home.js'
import { useRouter } from 'vue-router'
import { useStore } from 'vuex'
import { DETAIL_PAGE_CONTENT_DEFAULT_TAB } from '@/global/GlobalConfig.js'
const store = useStore()
const router = useRouter()
const select = ref('申请量')
const selList = ref(['申请量', '收藏量'])
const list = ref([])
import { ref } from 'vue'
import { pageWithAttrs } from '@/api/home.js'
import { useRouter } from 'vue-router'
import { useStore } from 'vuex'
import { DETAIL_PAGE_CONTENT_DEFAULT_TAB } from '@/global/GlobalConfig.js'
const store = useStore()
const router = useRouter()
const select = ref('申请量')
const selList = ref(['申请量', '收藏量'])
const list = ref([])
const paramsGetResources = {
const paramsGetResources = {
districtId: '',
pageNum: 1,
pageSize: 6,
@ -85,8 +84,8 @@ const paramsGetResources = {
infoList: [],
orderField: 'applyCount', // total visits applyCount score collectCount
orderType: 'DESC', // ASC DESC
}
const selectChange = (sel) => {
}
const selectChange = (sel) => {
select.value = sel
switch (select.value) {
case '浏览量':
@ -103,8 +102,8 @@ const selectChange = (sel) => {
break
}
getList()
}
const getList = () => {
}
const getList = () => {
pageWithAttrs(paramsGetResources).then((res) => {
console.log('查询列表============>', res.data.data.records)
res.data.data.records.forEach((val) => {
@ -131,36 +130,47 @@ const getList = () => {
})
list.value = res.data.data.records
})
}
getList()
}
getList()
function jumpPage() {
function jumpPage() {
// store
store.commit('home/selectCardsData', {
selectCardsnum: '组件服务',
})
console.log('选中===================>', store.getters['home/selectCardsnum'])
console.log(
'选中===================>',
store.getters['home/selectCardsnum']
)
router.push({
path: '/DetailsPageconetent',
query: {
// select: '',
select: DETAIL_PAGE_CONTENT_DEFAULT_TAB,
orderField:paramsGetResources.orderField //
orderField: paramsGetResources.orderField, //
},
})
}
const selectOne = (id) => {
}
const selectOne = (id) => {
console.log('点击===============》', id)
router.push({
path: '/details',
// router.push({
// path: '/details',
// query: {
// id: id,
// },
// })
const detailPage = router.resolve({
path: '/details', //
query: {
id: id,
hiddenBackFlag: true,
},
})
}
window.open(detailPage.href, '_blank')
}
</script>
<style lang="less" scoped>
.popular-ability {
.popular-ability {
height: 6.8rem;
background: url('~@/assets/newHome/popular-bg.png') no-repeat;
background-size: 100%;
@ -228,7 +238,6 @@ const selectOne = (id) => {
.text {
color: rgba(255, 255, 255, 0.6);
font-size: 0.14rem;
}
}
.select:hover {
@ -362,5 +371,5 @@ const selectOne = (id) => {
background: rgba(0, 88, 225, 0.1);
}
}
}
}
</style>

View File

@ -104,12 +104,20 @@
}
const selectOne = (id) => {
console.log('点击===============》', id)
router.push({
path: '/details',
// router.push({
// path: '/details',
// query: {
// id: id,
// },
// })
const detailPage = router.resolve({
path: '/details', //
query: {
id: id,
hiddenBackFlag: true,
},
})
window.open(detailPage.href, '_blank')
}
</script>
<style lang="less" scoped>