| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292 |
- <template>
- <div :class="'menuStyle' + skinId">
- <div class="menuBoxBg">
- <div class="menuBox" ref="menuBox">
- <div>
- <NuxtLink
- href="/"
- title="首页"
- target="_self"
- >
- 首页
- </NuxtLink>
- </div>
- <div v-for="(item, index) in navigation.slice(0, 7)" :key="index">
- <NuxtLink
- :href="getLinkPath(item)"
- :title="item.alias"
- :target="item.is_url == 1 ? '_blank' : '_self'"
- >
- {{ item.alias }}
- </NuxtLink>
- </div>
- </div>
- </div>
- <div class="menuBoxBg1">
- <div class="menuBox" ref="menuBox">
- <div v-for="(item, index) in navigation.slice(7, 23)" :key="index">
- <NuxtLink
- :href="getLinkPath(item)"
- :title="item.alias"
- :target="item.is_url == 1 ? '_blank' : '_self'"
- >
- {{ item.alias }}
- </NuxtLink>
- </div>
- </div>
- </div>
- </div>
- </template>
- <script setup>
- //1.1 pinia
- import { useTemplateBaseStore } from '@/stores/templateBase'
- const templateBaseStore = useTemplateBaseStore()
- //获得皮肤id
- const skinId = ref("")
- skinId.value = templateBaseStore.webSiteInfo.website_foot.foot_info.template_id;
- //1.获取导航菜单 start ---------------------------------------->
- //第一行导航菜单 10个
- const navigation = ref([]);
- //获取导航菜单1
- async function getNavigation() {
- const mkdata = await requestDataPromise('/web/getWebsiteModelCategory', {
- method: 'GET',
- query: {
- 'pid': 0,
- 'num': 23,
- 'placeid': 1
- },
- });
- navigation.value = mkdata.data;
- }
- getNavigation();
- //1.获取导航菜单 end ---------------------------------------->
- </script>
- <style lang="less" scoped>
- // @import url('@/assets/css/public/template/nav.less');
- // 皮肤5菜单
- .menuStyle5 {
- width: 100%;
- height: 187px;
- margin-bottom: 30px;
- .componentBorder {
- border-left: 2px dashed #999;
- border-right: 2px dashed #999;
- }
- .menuBoxBg {
- width: 100%;
- height: 64px;
- line-height: 64px;
- background: #3848a0;
- .menuBox {
- width: 1200px;
- margin: 0 auto;
- box-sizing: border-box;
- display: flex;
- flex-wrap: wrap;
- justify-content: flex-start;
- div {
- a{
- color: #fff;
- }
- width: 12.5%;
- cursor: pointer;
- box-sizing: border-box;
- font-size: 16px;
- text-align: center;
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- text-align: center;
- }
- }
- }
- .menuBoxBg1{
- margin-top: 20px;
- width: 100%;
- height: 103px;
- background-color: #fafafa;
- .menuBox{
- width: 1200px;
- margin: 0 auto;
- padding-top: 13px;
- box-sizing: border-box;
- display: flex;
- flex-wrap: wrap;
- justify-content: flex-start;
- div {
- a{
- color: #333;
- }
- width: 12.5%;
- cursor: pointer;
- box-sizing: border-box;
- font-size: 16px;
- height: 38px;
- line-height: 38px;
- text-align: center;
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- text-align: center;
- }
- }
- }
- .menuSectorInputBox {
- display: flex;
- align-items: center;
- justify-content: space-between;
- font-size: 14px;
- width: 80%;
- margin: 0 auto;
- border-top: none;
- height: 50px;
- .menuSectorInputBoxItem {
- padding: 0 10px;
- input {
- margin-right: 10px;
- }
- .el-select {
- margin-right: 10px;
- }
- }
- }
- .componentMenuBorder {
- border: 2px dashed #999;
- }
- }
- //皮肤6菜单
- .menuStyle6{
- width: 100%;
- height: 187px;
- margin-bottom: 30px;
- .menuBoxBg {
- width: 100%;
- height: 64px;
- line-height: 64px;
- background: #065395;
- .menuBox {
- width: 1200px;
- margin: 0 auto;
- box-sizing: border-box;
- display: flex;
- flex-wrap: wrap;
- justify-content: flex-start;
- div {
- a{
- color: #fff;
- }
- width: 12.5%;
- cursor: pointer;
- box-sizing: border-box;
- font-size: 16px;
- text-align: center;
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- text-align: center;
- }
- }
- }
- .menuBoxBg1{
- width: 100%;
- height: 103px;
- background-color: #fff;
- .menuBox{
- width: 1200px;
- margin: 0 auto;
- padding-top: 13px;
- box-sizing: border-box;
- display: flex;
- flex-wrap: wrap;
- justify-content: flex-start;
- div {
- a{
- color: #333;
- }
- width: 12.5%;
- cursor: pointer;
- box-sizing: border-box;
- font-size: 16px;
- height: 38px;
- line-height: 38px;
- text-align: center;
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- text-align: center;
- }
- }
- }
- }
- //皮肤7菜单
- .menuStyle7{
- width: 100%;
- height: 187px;
- margin-bottom: 30px;
- .menuBoxBg {
- width: 100%;
- height: 64px;
- line-height: 64px;
- background: #9C130A;
- .menuBox {
- width: 1200px;
- margin: 0 auto;
- box-sizing: border-box;
- display: flex;
- flex-wrap: wrap;
- justify-content: flex-start;
- div {
- a{
- color: #fff;
- }
- width: 12.5%;
- cursor: pointer;
- box-sizing: border-box;
- font-size: 16px;
- text-align: center;
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- text-align: center;
- }
- }
- }
- .menuBoxBg1{
- width: 100%;
- height: 103px;
- background-color: #FAFAFA;
- .menuBox{
- width: 1200px;
- margin: 0 auto;
- padding-top: 13px;
- box-sizing: border-box;
- display: flex;
- flex-wrap: wrap;
- justify-content: flex-start;
- div {
- a{
- color: #333;
- }
- width: 12.5%;
- cursor: pointer;
- box-sizing: border-box;
- font-size: 16px;
- height: 38px;
- line-height: 38px;
- text-align: center;
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- text-align: center;
- }
- }
- }
- }
- </style>
|