read.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <script setup lang="ts">
  2. import { ref } from 'vue'
  3. import { useStore } from 'vuex'
  4. import banner from '@/components/layout/banner.vue'
  5. const store = useStore()
  6. const columnTypes = ref([]) //类型
  7. const requestParams = ref({})//active类型
  8. setTimeout(()=>{
  9. columnTypes.value = store.state.menuList[store.state.sub].children
  10. },500)
  11. const paramsData = ref({})
  12. let oldCategoryId= ref()
  13. //类型切换
  14. function facilityClick(item:Object){
  15. //防抖
  16. if(item.id != oldCategoryId.value){
  17. requestParams.value = item
  18. paramsData.value = {
  19. params:{
  20. categoryid: item.id,
  21. pageNum:1,
  22. pageSize:100,
  23. order:"sortindex",
  24. },
  25. index:store.state.currentPagePath,
  26. sub:store.state.sub
  27. }
  28. oldCategoryId.value = item.id
  29. store.dispatch('getPageData',paramsData.value)
  30. }
  31. }
  32. //详情页
  33. function oneInnerBox(item){
  34. }
  35. </script>
  36. <template>
  37. <div class="pageContain">
  38. <section class="common-bradcrumb-section" >
  39. <banner />
  40. </section>
  41. <section class="product-content-section pt-60">
  42. <div class="container" v-if="store.state.pageContent.length>0">
  43. <div class="row">
  44. <div class="col-lg-12 col-md-12 content">
  45. <div class="read_content mb-60">
  46. <div class="section-title text-center both-border mb-60 d-flex justify-content-between">
  47. <span class="title-tag2 text-left" >{{store.state.pageContent[0].title}}</span>
  48. <a href="javascript:history.back(-1)"><img src="@/assets/img/product/close.png" alt=""></a>
  49. </div>
  50. <div class="row">
  51. <div class=" col-lg-12 col-md-12 " >
  52. <div v-html="store.state.pageContent[0].content" class="text-left"></div>
  53. </div>
  54. </div>
  55. </div>
  56. <div v-if="store.state.recomMendation.length>0">
  57. <div class="title-tag2">相关推荐</div>
  58. <div class="relNewBox container text-left ">
  59. <a class="ustify-content-between d-flex relNewsList" :href="dup?'./read.html?dup='+dup+'&categoryid='+item.categoryid+'&id='+item.id+'&isUrlId=1':'./read.html?categoryid='+item.categoryid+'&id='+item.id+'&isUrlId=1'" v-for="item in store.state.recomMendation" :key="item.id">
  60. <div><img width="18" height="18" src="@/assets/img/news/arrowT.svg"> {{item.title}} </div>
  61. <div>{{ item.createdate }}</div>
  62. </a>
  63. </div>
  64. </div>
  65. </div>
  66. </div>
  67. </div>
  68. </section>
  69. </div>
  70. </template>