1.vue 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. <template>
  2. <!-- 单页菜单 -->
  3. <div class="menu">
  4. <div class="inner">
  5. <menu6Style :componentStyle="templateData[0].component_style" :bottomMenu="bottomMenu" :pageId="pageId" />
  6. </div>
  7. </div>
  8. <!-- 面包屑导航 -->
  9. <div class="breadcrumb">
  10. <div class="inner">
  11. <span class="location">当前位置:</span>
  12. <el-breadcrumb :separator-icon="ArrowRight">
  13. <el-breadcrumb-item>
  14. <NuxtLink to="/">首页</NuxtLink>
  15. </el-breadcrumb-item>
  16. <el-breadcrumb-item>本网招聘</el-breadcrumb-item>
  17. </el-breadcrumb>
  18. </div>
  19. </div>
  20. <div class="newsDetail">
  21. <div class="inner">
  22. <div class="innerDetail">
  23. <div class="innerDetail1">
  24. <div v-if="skinId == 6">
  25. <list6Style :componentStyle="templateData[1].component_style" :newsList="newsList" />
  26. </div>
  27. </div>
  28. </div>
  29. <div style="clear: both;"></div>
  30. </div>
  31. </div>
  32. </template>
  33. <script setup lang="ts">
  34. //0.页面依赖 start ---------------------------------------->
  35. import type { INewsDetail, IBottomMenu } from '@/utils/dataInterface'
  36. import { ElBreadcrumb, ElBreadcrumbItem } from 'element-plus'
  37. import { ArrowRight } from '@element-plus/icons-vue'
  38. //列表组件样式6
  39. import list6Style from '@/components/template/component/list/1200x1250/6/1.vue'
  40. //菜单组件皮肤6
  41. import menu6Style from '@/components/template/component/menu/1200x54/6/1.vue'
  42. interface Props {
  43. templateData: any,
  44. skinId: number,
  45. }
  46. const props = defineProps<Props>();
  47. //0.页面依赖 end ---------------------------------------->
  48. //1.页面数据 start ---------------------------------------->
  49. //1.1 获得导航池id
  50. const route = useRoute();
  51. //获得当前的完整路径
  52. const fullPath = route.path;
  53. const segments = fullPath.split('/');
  54. const targetSegment = segments[2];
  55. let pageId: number;
  56. //通过导航路径反向查询导航id
  57. const getRouteId = await requestDataPromise('/web/getWebsiteRoute', {
  58. method: 'GET',
  59. query: {
  60. 'foot_pinyin': targetSegment,
  61. },
  62. });
  63. if (getRouteId.code == 200) {
  64. pageId = getRouteId.data.id;
  65. }
  66. //1.2获得左侧导航
  67. const bottomMenu = ref([]);
  68. async function getPageMenu() {
  69. const mkdata = await requestDataPromise('/web/getWebsiteFooterCategory', {
  70. method: 'GET',
  71. query: {},
  72. });
  73. bottomMenu.value = mkdata.data;
  74. }
  75. getPageMenu();
  76. //1.3获得数据列表
  77. const newsList = ref<IListData[]>([]);
  78. let newslists = async () => {
  79. const listData = await requestDataPromise('/web/getWebsiteFooterCategoryList', {
  80. method: 'GET',
  81. query: {
  82. 'fcat_id': pageId,
  83. },
  84. });
  85. newsList.value = listData.data;
  86. }
  87. newslists();
  88. //1.页面数据 end---------------------------------------->
  89. </script>
  90. <style lang="less" scoped>
  91. //导航条样式 start ---------------------------------------->
  92. .breadcrumb {
  93. width: 1200px;
  94. margin: 0 auto;
  95. height: 22px;
  96. padding-bottom: 30px;
  97. margin-top: 30px;
  98. margin-bottom: 30px;
  99. border-bottom: 1px solid #d9d9d9;
  100. font-family: Microsoft YaHei, Microsoft YaHei;
  101. font-weight: 400;
  102. font-size: 20px;
  103. color: #666666;
  104. line-height: 23px;
  105. text-align: left;
  106. font-style: normal;
  107. text-transform: none;
  108. :deep(.el-breadcrumb) {
  109. display: inline-block;
  110. vertical-align: -4px;
  111. }
  112. :deep(.el-breadcrumb__inner a),
  113. :deep(.el-breadcrumb__inner.is-link) {
  114. color: #666666;
  115. font-weight: 400;
  116. text-decoration: none;
  117. transition: var(--el-transition-color);
  118. }
  119. span {
  120. font-family: Microsoft YaHei, Microsoft YaHei;
  121. font-weight: 400;
  122. font-size: 20px;
  123. color: #666666;
  124. line-height: 23px;
  125. text-align: left;
  126. font-style: normal;
  127. text-transform: none;
  128. }
  129. span:hover {
  130. color: #666666;
  131. }
  132. .location {
  133. margin-right: 20px;
  134. width: 100px;
  135. height: 22px;
  136. font-family: Microsoft YaHei, Microsoft YaHei;
  137. font-weight: 400;
  138. font-size: 20px;
  139. color: #666666;
  140. line-height: 23px;
  141. text-align: left;
  142. font-style: normal;
  143. text-transform: none;
  144. }
  145. }
  146. //导航条样式 end ---------------------------------------->
  147. //列表容器 start ---------------------------------------->
  148. .newsDetail {
  149. width: 100%;
  150. .inner {
  151. width: 1200px;
  152. font-size: 16px;
  153. position: relative;
  154. .innerDetail {
  155. margin: 0 auto;
  156. margin-bottom: 30px;
  157. min-height: 600px;
  158. .innerDetail1 {
  159. min-height: 600px;
  160. margin: 0 auto;
  161. box-sizing: border-box;
  162. }
  163. }
  164. }
  165. }
  166. .innerLeft {
  167. width: 144px;
  168. position: absolute;
  169. top: 15px;
  170. left: -165px;
  171. }
  172. //列表容器 end ----------------------------------------></style>