1.vue 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292
  1. <template>
  2. <div :class="'menuStyle' + skinId">
  3. <div class="menuBoxBg">
  4. <div class="menuBox" ref="menuBox">
  5. <div>
  6. <NuxtLink
  7. href="/"
  8. title="首页"
  9. target="_self"
  10. >
  11. 首页
  12. </NuxtLink>
  13. </div>
  14. <div v-for="(item, index) in navigation.slice(0, 7)" :key="index">
  15. <NuxtLink
  16. :href="getLinkPath(item)"
  17. :title="item.alias"
  18. :target="item.is_url == 1 ? '_blank' : '_self'"
  19. >
  20. {{ item.alias }}
  21. </NuxtLink>
  22. </div>
  23. </div>
  24. </div>
  25. <div class="menuBoxBg1">
  26. <div class="menuBox" ref="menuBox">
  27. <div v-for="(item, index) in navigation.slice(7, 23)" :key="index">
  28. <NuxtLink
  29. :href="getLinkPath(item)"
  30. :title="item.alias"
  31. :target="item.is_url == 1 ? '_blank' : '_self'"
  32. >
  33. {{ item.alias }}
  34. </NuxtLink>
  35. </div>
  36. </div>
  37. </div>
  38. </div>
  39. </template>
  40. <script setup>
  41. //1.1 pinia
  42. import { useTemplateBaseStore } from '@/stores/templateBase'
  43. const templateBaseStore = useTemplateBaseStore()
  44. //获得皮肤id
  45. const skinId = ref("")
  46. skinId.value = templateBaseStore.webSiteInfo.website_foot.foot_info.template_id;
  47. //1.获取导航菜单 start ---------------------------------------->
  48. //第一行导航菜单 10个
  49. const navigation = ref([]);
  50. //获取导航菜单1
  51. async function getNavigation() {
  52. const mkdata = await requestDataPromise('/web/getWebsiteModelCategory', {
  53. method: 'GET',
  54. query: {
  55. 'pid': 0,
  56. 'num': 23,
  57. 'placeid': 1
  58. },
  59. });
  60. navigation.value = mkdata.data;
  61. }
  62. getNavigation();
  63. //1.获取导航菜单 end ---------------------------------------->
  64. </script>
  65. <style lang="less" scoped>
  66. // @import url('@/assets/css/public/template/nav.less');
  67. // 皮肤5菜单
  68. .menuStyle5 {
  69. width: 100%;
  70. height: 187px;
  71. margin-bottom: 30px;
  72. .componentBorder {
  73. border-left: 2px dashed #999;
  74. border-right: 2px dashed #999;
  75. }
  76. .menuBoxBg {
  77. width: 100%;
  78. height: 64px;
  79. line-height: 64px;
  80. background: #3848a0;
  81. .menuBox {
  82. width: 1200px;
  83. margin: 0 auto;
  84. box-sizing: border-box;
  85. display: flex;
  86. flex-wrap: wrap;
  87. justify-content: flex-start;
  88. div {
  89. a{
  90. color: #fff;
  91. }
  92. width: 12.5%;
  93. cursor: pointer;
  94. box-sizing: border-box;
  95. font-size: 16px;
  96. text-align: center;
  97. overflow: hidden;
  98. white-space: nowrap;
  99. text-overflow: ellipsis;
  100. text-align: center;
  101. }
  102. }
  103. }
  104. .menuBoxBg1{
  105. margin-top: 20px;
  106. width: 100%;
  107. height: 103px;
  108. background-color: #fafafa;
  109. .menuBox{
  110. width: 1200px;
  111. margin: 0 auto;
  112. padding-top: 13px;
  113. box-sizing: border-box;
  114. display: flex;
  115. flex-wrap: wrap;
  116. justify-content: flex-start;
  117. div {
  118. a{
  119. color: #333;
  120. }
  121. width: 12.5%;
  122. cursor: pointer;
  123. box-sizing: border-box;
  124. font-size: 16px;
  125. height: 38px;
  126. line-height: 38px;
  127. text-align: center;
  128. overflow: hidden;
  129. white-space: nowrap;
  130. text-overflow: ellipsis;
  131. text-align: center;
  132. }
  133. }
  134. }
  135. .menuSectorInputBox {
  136. display: flex;
  137. align-items: center;
  138. justify-content: space-between;
  139. font-size: 14px;
  140. width: 80%;
  141. margin: 0 auto;
  142. border-top: none;
  143. height: 50px;
  144. .menuSectorInputBoxItem {
  145. padding: 0 10px;
  146. input {
  147. margin-right: 10px;
  148. }
  149. .el-select {
  150. margin-right: 10px;
  151. }
  152. }
  153. }
  154. .componentMenuBorder {
  155. border: 2px dashed #999;
  156. }
  157. }
  158. //皮肤6菜单
  159. .menuStyle6{
  160. width: 100%;
  161. height: 187px;
  162. margin-bottom: 30px;
  163. .menuBoxBg {
  164. width: 100%;
  165. height: 64px;
  166. line-height: 64px;
  167. background: #065395;
  168. .menuBox {
  169. width: 1200px;
  170. margin: 0 auto;
  171. box-sizing: border-box;
  172. display: flex;
  173. flex-wrap: wrap;
  174. justify-content: flex-start;
  175. div {
  176. a{
  177. color: #fff;
  178. }
  179. width: 12.5%;
  180. cursor: pointer;
  181. box-sizing: border-box;
  182. font-size: 16px;
  183. text-align: center;
  184. overflow: hidden;
  185. white-space: nowrap;
  186. text-overflow: ellipsis;
  187. text-align: center;
  188. }
  189. }
  190. }
  191. .menuBoxBg1{
  192. width: 100%;
  193. height: 103px;
  194. background-color: #fff;
  195. .menuBox{
  196. width: 1200px;
  197. margin: 0 auto;
  198. padding-top: 13px;
  199. box-sizing: border-box;
  200. display: flex;
  201. flex-wrap: wrap;
  202. justify-content: flex-start;
  203. div {
  204. a{
  205. color: #333;
  206. }
  207. width: 12.5%;
  208. cursor: pointer;
  209. box-sizing: border-box;
  210. font-size: 16px;
  211. height: 38px;
  212. line-height: 38px;
  213. text-align: center;
  214. overflow: hidden;
  215. white-space: nowrap;
  216. text-overflow: ellipsis;
  217. text-align: center;
  218. }
  219. }
  220. }
  221. }
  222. //皮肤7菜单
  223. .menuStyle7{
  224. width: 100%;
  225. height: 187px;
  226. margin-bottom: 30px;
  227. .menuBoxBg {
  228. width: 100%;
  229. height: 64px;
  230. line-height: 64px;
  231. background: #9C130A;
  232. .menuBox {
  233. width: 1200px;
  234. margin: 0 auto;
  235. box-sizing: border-box;
  236. display: flex;
  237. flex-wrap: wrap;
  238. justify-content: flex-start;
  239. div {
  240. a{
  241. color: #fff;
  242. }
  243. width: 12.5%;
  244. cursor: pointer;
  245. box-sizing: border-box;
  246. font-size: 16px;
  247. text-align: center;
  248. overflow: hidden;
  249. white-space: nowrap;
  250. text-overflow: ellipsis;
  251. text-align: center;
  252. }
  253. }
  254. }
  255. .menuBoxBg1{
  256. width: 100%;
  257. height: 103px;
  258. background-color: #FAFAFA;
  259. .menuBox{
  260. width: 1200px;
  261. margin: 0 auto;
  262. padding-top: 13px;
  263. box-sizing: border-box;
  264. display: flex;
  265. flex-wrap: wrap;
  266. justify-content: flex-start;
  267. div {
  268. a{
  269. color: #333;
  270. }
  271. width: 12.5%;
  272. cursor: pointer;
  273. box-sizing: border-box;
  274. font-size: 16px;
  275. height: 38px;
  276. line-height: 38px;
  277. text-align: center;
  278. overflow: hidden;
  279. white-space: nowrap;
  280. text-overflow: ellipsis;
  281. text-align: center;
  282. }
  283. }
  284. }
  285. }
  286. </style>