diff --git a/src/api/index.js b/src/api/index.js index 3aa018c..77fc1eb 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -69,7 +69,7 @@ export function getNewsDetail(id) { }) } -/* 获取新闻动态列表 */ +/* 获取应用方案/核心业务列表 */ export function getCaseList(params) { return request({ url: '/cniyv/cniyvcase/page', @@ -78,7 +78,7 @@ export function getCaseList(params) { }) } -/* 获取对应新闻动态详情 */ +/* 获取对应应用方案/核心业务详情 */ export function getCaseDetail(id) { return request({ url: `/cniyv/cniyvcase/info/${id}`, diff --git a/src/assets/css/main.css b/src/assets/css/main.css index 6e11c55..ce0c5d1 100644 --- a/src/assets/css/main.css +++ b/src/assets/css/main.css @@ -232,7 +232,7 @@ header nav .logo { .carousel-inner>.item>img, .carousel-inner>.item>a>img { line-height: 1; - height: 532px; + height: auto; } .profuile { @@ -684,7 +684,7 @@ footer .footer-button { @media (max-width: 1200px) { .carousel-inner>.item>img, .carousel-inner>.item>a>img { line-height: 1; - height: 432px; + /* height: 432px; */ } .about_form form { height: 455px; @@ -988,7 +988,7 @@ footer .footer-button { } .content-news img { - width: auto; + width: 100%; height: auto; } @@ -1330,7 +1330,7 @@ footer .footer-button { @media (max-width: 970px) { .carousel-inner>.item>img, .carousel-inner>.item>a>img { line-height: 1; - height: 370px; + /* height: 370px; */ } .news div img { height: 300px; @@ -1378,7 +1378,7 @@ footer .footer-button { padding: 0; } .carousel-inner>.item>img, .carousel-inner>.item>a>img { - height: 375px; + /* height: 375px; */ } .about ul li { padding-bottom: 5px; @@ -1485,7 +1485,7 @@ footer .footer-button { @media (max-width: 750px) { .carousel-inner>.item>img, .carousel-inner>.item>a>img { line-height: 1; - height: 188px; + /* height: 188px; */ } .about .aboutwh img { height: 220px; diff --git a/src/components/layout/ComponentBanner.vue b/src/components/layout/ComponentBanner.vue index 07da03f..381b9df 100644 --- a/src/components/layout/ComponentBanner.vue +++ b/src/components/layout/ComponentBanner.vue @@ -48,6 +48,7 @@ export default { }, created() { + /* 获取轮播图,最多显示5张 */ this.getBanners({ limit: 5, orderField: 'sort' diff --git a/src/components/layout/NavHeader.vue b/src/components/layout/NavHeader.vue index a9b4045..442b6b4 100644 --- a/src/components/layout/NavHeader.vue +++ b/src/components/layout/NavHeader.vue @@ -42,6 +42,7 @@ 首页 关于天云 产品中心 + 核心业务 应用方案 新闻动态 @@ -89,7 +90,9 @@ export default { setNavPath: 'app/setNavPath' }), handleToogleMenu() { - + console.log('//////') + console.log(localStorage.getItem('lastChecked')) + // localStorage.setItem('lastChecked', '') } }, diff --git a/src/router/index.js b/src/router/index.js index ead4f83..f34cb34 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -11,6 +11,7 @@ const Products = () => import('@/views/Products') const About = () => import('@/views/About') const News = () => import('@/views/News') const Applications = () => import('@/views/Applications') +const Business = () => import('@/views/Business') // const Join = () => import('@/views/Join') const ProductDetail = () => import('@/views/ProductDetail') const NewsDetail = () => import('@/views/NewsDetail') @@ -100,6 +101,23 @@ const routes = [ }, ] }, + { + path: '/business', + meta: { + title: '核心业务' + }, + component: Business, + children: [ + { + path: '/business/detail/:id', + name: 'business-detail', + meta: { + isDetail: true + }, + component: ApplicationDetail, + }, + ] + }, // { // path: '/join', diff --git a/src/views/Applications/index.vue b/src/views/Applications/index.vue index 7d60aae..1889822 100644 --- a/src/views/Applications/index.vue +++ b/src/views/Applications/index.vue @@ -20,8 +20,8 @@ {{ item.meta.title }} - - {{newsTitle}} + + {{planTitle}} @@ -75,7 +75,7 @@ import { mapGetters, mapActions } from 'vuex' export default { data() { return { - newsTitle: '', + planTitle: '', curPage: 1 } }, @@ -91,15 +91,15 @@ export default { const length = matche.length if (length > 2) { matche[length-1].path = '' - matche[length-1].meta.title = this.newsTitle + matche[length-1].meta.title = this.planTitle } return matche } }, created() { - const newsTitle = localStorage.getItem('newsTitle') - if (newsTitle) this.newsTitle = newsTitle + const planTitle = localStorage.getItem('planTitle') + if (planTitle) this.planTitle = planTitle }, mounted() { @@ -110,6 +110,7 @@ export default { // }) this.getCaseList({ limit: 9, + type: 'case' // orderField: 'sort' }) }, @@ -120,32 +121,29 @@ export default { }), handleNews(e) { - this.newsTitle = e.target.dataset.title + this.planTitle = e.target.dataset.title // console.log('newsId', newsId) - // this.newsTitle = this.productsType.filter(item => item.id == productTypeId).map(item => item.name)[0] - localStorage.setItem('newsTitle', this.newsTitle) + // this.planTitle = this.productsType.filter(item => item.id == productTypeId).map(item => item.name)[0] + localStorage.setItem('planTitle', this.planTitle) }, handleClick(e) { const title = e.target.dataset.title if (title == '应用方案') { - this.newsTitle = '' - localStorage.removeItem('newsTitle') + this.planTitle = '' + localStorage.removeItem('planTitle') } }, handleToDetail(e) { - this.newsTitle = e.target.dataset.title - localStorage.setItem('newsTitle', this.newsTitle) - }, - - getCaseDataList(options) { - this.getCaseList(options) + this.planTitle = e.target.dataset.title + localStorage.setItem('planTitle', this.planTitle) }, handleChangePage(curPage) { this.curPage = curPage - this.getCaseDataList({ + this.getCaseList({ + type: 'case', limit: 9, page: curPage, // orderField: 'sort' @@ -154,11 +152,11 @@ export default { }, beforeDestroy() { - localStorage.removeItem('newsTitle') + localStorage.removeItem('planTitle') }, beforeRouteUpdate(to, from, next) { if (to.meta.isDetail) { - to.meta.title = this.newsTitle + to.meta.title = this.planTitle } next() } diff --git a/src/views/Business/index.vue b/src/views/Business/index.vue new file mode 100644 index 0000000..af64d2a --- /dev/null +++ b/src/views/Business/index.vue @@ -0,0 +1,206 @@ + + + + + diff --git a/src/views/Home/ComponentCustom.vue b/src/views/Home/ComponentCustom.vue index fb6c0cc..39cd036 100644 --- a/src/views/Home/ComponentCustom.vue +++ b/src/views/Home/ComponentCustom.vue @@ -104,29 +104,29 @@
-
-
-
-
- 合作伙伴 -
-
- 北斗天云 - - -

更多

-
-
- 北斗天云 - - -

更多

-
-
+

+ 核心业务 +

+
+
+ + + +

+ + +

{{item.title}}

+
+
+

+

+ + 了解详情 + +

+
+
+
@@ -181,9 +181,6 @@ -

了解详情 @@ -242,7 +239,8 @@ export default { computed: { ...mapGetters([ 'homeTypeList', - 'newsList' + 'newsList', + 'caseList' ]) }, @@ -252,9 +250,15 @@ export default { orderField: 'sort' }) + this.getCaseList({ + limit: 4, + type: 'biz' + }) + this.getNewsList({ limit: 4 }) + $(".products #productsTab div a").hover( function () { $(this).find("img").stop().animate({ "opacity": "1" }, 700) @@ -276,6 +280,7 @@ export default { setNavPath: 'app/setNavPath', getHomeCniyvTypeList: 'cniyv/getHomeCniyvTypeList', getNewsList: 'news/getNewsLists', + getCaseList: 'cases/getCaseLists' }), handleToProducts(e) { @@ -292,7 +297,14 @@ export default { localStorage.setItem('menuPath', '/news') localStorage.setItem('newsTitle', activeTitle) this.setNavPath('/news') - } + }, + + handleSetBusinessTitle(e) { + const activeTitle = e.target.dataset.title + localStorage.setItem('menuPath', '/business') + localStorage.setItem('bizTitle', activeTitle) + this.setNavPath('/business') + }, } } @@ -352,6 +364,20 @@ export default { color: #fff; } +h2 { + color: #fff; + font-weight: bold; + margin-bottom: 20px; +} + +.centera a { + color: #e6e6e6; +} + +.joina { + margin: 0; +} + .text-left a { overflow: hidden; white-space: nowrap; @@ -359,6 +385,7 @@ export default { display: inline-block; width: 100%; padding-left: 5px !important; + font-size: 14px; } .video-top { @@ -402,6 +429,10 @@ export default { } } +.biza { + color: #e6e6e6; +} + .title-ell { overflow: hidden; white-space: nowrap; diff --git a/src/views/ProductDetail/index.vue b/src/views/ProductDetail/index.vue index 03aada4..3e36b79 100644 --- a/src/views/ProductDetail/index.vue +++ b/src/views/ProductDetail/index.vue @@ -128,8 +128,13 @@ export default {