123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144 |
- <template>
-
- <templateHead></templateHead>
-
- <templateMenu></templateMenu>
-
-
- <div v-for="(item,index) in templateData" :key="index">
-
- <div v-if="item.sectorName=='adSector'">
- <templateAd :skinId="skinId" :adData="adData" :adTag="item.ad.ad_tag"></templateAd>
- </div>
-
- <div v-if="item.sectorName=='headLineSector'">
- <templateHeadline :skinId="skinId" :templateData="item.componentList"></templateHeadline>
- </div>
-
- <div v-if="item.sectorName=='bannerSector'">
- <templateBanner :skinId="skinId" :templateData="item.componentList"></templateBanner>
- </div>
-
- <div v-if="item.sectorName=='linkSector'">
- <templateStaticLink :skinId="skinId"></templateStaticLink>
- </div>
-
- <div v-if="item.sectorName=='manyPictureSector'">
- <templateNewSector1 :skinId="skinId" :templateData="item.componentList"></templateNewSector1>
- </div>
-
- <div v-if="item.sectorName=='commentSector'">
- <templateNewSector2 :skinId="skinId" :templateData="item.componentList"></templateNewSector2>
- </div>
-
- <div v-if="item.sectorName=='listSector'">
- <templateNewSector3 :skinId="skinId" :templateData="item.componentList"></templateNewSector3>
- </div>
-
- <div v-if="item.sectorName=='onlyImgSector'">
- <templateNewAndAd :skinId="skinId" :templateData="item.componentList" :adData="adData" :adTag="item.ad.ad_tag"></templateNewAndAd>
- </div>
- </div>
-
- <templateFoot></templateFoot>
- </template>
- <script setup>
- import templateHead from '@/components/template/sector/head/1200x200/1.vue'
- import templateMenu from '@/components/template/sector/menu/1200x130/1.vue'
- import templateFoot from '@/components/template/sector/foot/1200x580/1.vue'
- import templateAd from '@/components/template/sector/body/ad/1200x90/1.vue'
- import templateHeadline from '@/components/template/sector/body/index/headLine/1200x140/1.vue'
- import templateBanner from '@/components/template/sector/body/index/banner/1200x410/1.vue'
- import templateStaticLink from '@/components/template/sector/body/index/link/1200x230/1.vue'
- import templateNewSector1 from '@/components/template/sector/body/index/list/1200x470/1.vue'
- import templateNewSector2 from '@/components/template/sector/body/index/list/1200x470/2.vue'
- import templateNewSector3 from '@/components/template/sector/body/index/list/1200x980/1.vue'
- import templateNewAndAd from '@/components/template/sector/body/index/list/1200x480/1.vue'
- import { ref } from 'vue';
- import { useTemplateBaseStore } from '@/stores/templateBase'
- const templateBaseStore = useTemplateBaseStore()
- const skinId = ref("")
- const websiteId = ref("")
- const responseStatus = await requestDataPromise('/web/getWebsiteAllinfo', {
- method: 'GET',
- query: {
- 'link_textnum':24,
- 'link_imgnum':18,
- 'link_footnum':4
- },
- });
- if (responseStatus.code == 200) {
-
- templateBaseStore.setWebSiteInfo(responseStatus.data)
- websiteId.value = responseStatus.data.website_head.id;
-
- skinId.value = templateBaseStore.webSiteInfo.website_foot.foot_info.template_id;
- console.log("当前的网站id:"+responseStatus.data.website_head.id)
-
- let seoTitle = templateBaseStore.webSiteInfo.website_head.title;
- let seoDescription = templateBaseStore.webSiteInfo.website_head.description;
- let seoKeywords = templateBaseStore.webSiteInfo.website_head.keywords;
- let seoSuffix = templateBaseStore.webSiteInfo.website_head.suffix;
- let seoName = templateBaseStore.webSiteInfo.website_head.website_name;
- useSeoMeta({
- title: seoTitle + "_" + seoSuffix,
- meta: [
- { name: 'keywords', content: seoKeywords + "_" + seoName + "_" + seoSuffix, tagPriority: 10 },
- { name: 'description', content: seoDescription + "_" + seoName + "_" + seoSuffix, tagPriority: 10 }
- ]
- });
- }
- const response = await requestDataPromise('/client/indexData', {
- method: 'POST',
- body: {
- 'website_id':websiteId.value,
- 'getpage':'index'
- },
- });
- const templateData = response.data.template.index;
- const adData = ref([]);
- adData.value.push(response.data.ad.top)
- for(let item of response.data.ad.index){
- adData.value.push(item)
- }
- templateBaseStore.setAdList(adData.value)
- </script>
- <style lang="less" scoped>
- @import url('@/assets/css/index.less');
- </style>
|