|
@@ -18,8 +18,8 @@
|
|
|
></van-dropdown-item>
|
|
|
</van-dropdown-menu>
|
|
|
</div>
|
|
|
- <div class="px-10 pt-20">
|
|
|
- <div class="scrollbar w-full" style="overflow-x: auto">
|
|
|
+ <div class="px-10 pt-20">
|
|
|
+ <div v-if="recomendList.length" class="scrollbar w-full" style="overflow-x: auto">
|
|
|
<div class="flex ">
|
|
|
<NuxtLink :to="'/t/'+item.id" v-for="(item,index) in recomendList" :key="index" class="w-[110px] border rounded overflow-hidden shrink-0 mr-[12px]">
|
|
|
<div class="w-full h-[76px] bg-[#dedede]">
|
|
@@ -101,7 +101,7 @@ const { data } = await useMyFetch(
|
|
|
`website/tourism/project/list?isHotspot=1&pageNum=1&pageSize=10`
|
|
|
)
|
|
|
|
|
|
-const recomendList = computed(() => data.value?.dataList ?? [])
|
|
|
+const recomendList = ref([])
|
|
|
|
|
|
|
|
|
const AREA_TEXT = '地域'
|
|
@@ -233,6 +233,7 @@ function handleFilterClick(item) {
|
|
|
pageNum.value = 1
|
|
|
dataList.value = []
|
|
|
getList()
|
|
|
+ getRecommend()
|
|
|
dropDownMenuRef.value && dropDownMenuRef.value.close()
|
|
|
document.title = `${item.id ? '游记-' + item.areaName + '-' + item.text : '旅游笔记'}`
|
|
|
}
|
|
@@ -254,8 +255,24 @@ function convertTag(str = '') {
|
|
|
return str.split('&')
|
|
|
}
|
|
|
|
|
|
+async function getRecommend(){
|
|
|
+ const param={
|
|
|
+ isHotspot:1,
|
|
|
+ pageNum:1,
|
|
|
+ pageSize:10
|
|
|
+ }
|
|
|
+ if (curFilter.value.areaId) param.areaId = curFilter.value.areaId
|
|
|
+
|
|
|
+ if (curFilter.value.id) {
|
|
|
+ const countryId = curFilter.value.id.split(',')
|
|
|
+ if (!countryId[1]) param.countryId = curFilter.value.id
|
|
|
+ }
|
|
|
+ const {data:{dataList}} = await request('website/tourism/project/list',{ query: param })
|
|
|
+ recomendList.value = dataList || []
|
|
|
+}
|
|
|
onMounted(async () => {
|
|
|
getFilters()
|
|
|
+ getRecommend()
|
|
|
})
|
|
|
|
|
|
useSeoMeta({
|