| @@ -75,7 +75,7 @@ export default { | |||||
| this.depthitem = item | this.depthitem = item | ||||
| }, | }, | ||||
| async getguanggao () { | async getguanggao () { | ||||
| const { data: { message: ggm1, data: gg1 } } = await guanggao(1) | |||||
| const { data: { code: ggm1, data: gg1 } } = await guanggao(1) | |||||
| if (ggm1 === 'success') { | if (ggm1 === 'success') { | ||||
| this.gg1 = { | this.gg1 = { | ||||
| img: gg1.image, | img: gg1.image, | ||||
| @@ -84,15 +84,15 @@ export default { | |||||
| } | } | ||||
| }, | }, | ||||
| async getaboutUs () { | async getaboutUs () { | ||||
| const { data: { message, data } } = await aboutUs() | |||||
| if (message === 'success') { | |||||
| const { data: { code, data } } = await aboutUs() | |||||
| if (code === 200) { | |||||
| this.aboutwe.content = data.remark | this.aboutwe.content = data.remark | ||||
| this.aboutwe.img = data.image | this.aboutwe.img = data.image | ||||
| } | } | ||||
| }, | }, | ||||
| async getmemberList () { | async getmemberList () { | ||||
| const { data: { message, data } } = await memberList() | |||||
| if (message === 'success') { | |||||
| const { data: { code, data } } = await memberList() | |||||
| if (code === 200) { | |||||
| this.ldList = data.list | this.ldList = data.list | ||||
| } | } | ||||
| } | } | ||||
| @@ -128,14 +128,14 @@ export default { | |||||
| }, | }, | ||||
| methods: { | methods: { | ||||
| async getlunboList () { | async getlunboList () { | ||||
| const { data: { message, data } } = await lunboList() | |||||
| if (message === 'success') { | |||||
| const { data: { code, data } } = await lunboList() | |||||
| if (code === 200) { | |||||
| this.carouselList = data.list | this.carouselList = data.list | ||||
| } | } | ||||
| }, | }, | ||||
| async getguanggao () { | async getguanggao () { | ||||
| const { data: { message: ggm1, data: gg1 } } = await guanggao(1) | |||||
| const { data: { message: ggm2, data: gg2 } } = await guanggao(2) | |||||
| const { data: { code: ggm1, data: gg1 } } = await guanggao(1) | |||||
| const { data: { code: ggm2, data: gg2 } } = await guanggao(2) | |||||
| if (ggm1 === 'success' && ggm2 === 'success') { | if (ggm1 === 'success' && ggm2 === 'success') { | ||||
| this.gg1 = { | this.gg1 = { | ||||
| img: gg1.image, | img: gg1.image, | ||||
| @@ -148,28 +148,28 @@ export default { | |||||
| } | } | ||||
| }, | }, | ||||
| async getshuzirenremark () { | async getshuzirenremark () { | ||||
| const { data: { message, data } } = await shuzirenremark() | |||||
| if (message === 'success') { | |||||
| const { data: { code, data } } = await shuzirenremark() | |||||
| if (code === 200) { | |||||
| this.aitxt.title = data.title | this.aitxt.title = data.title | ||||
| this.aitxt.content = data.remark | this.aitxt.content = data.remark | ||||
| this.aitxt.link = data.link | this.aitxt.link = data.link | ||||
| } | } | ||||
| }, | }, | ||||
| async getshuzirenList () { | async getshuzirenList () { | ||||
| const { data: { message, data } } = await shuzirenList() | |||||
| if (message === 'success') { | |||||
| const { data: { code, data } } = await shuzirenList() | |||||
| if (code === 200) { | |||||
| this.ailist = data.list | this.ailist = data.list | ||||
| } | } | ||||
| }, | }, | ||||
| async getshuzirenZhiBoList () { | async getshuzirenZhiBoList () { | ||||
| const { data: { message, data } } = await shuzirenZhiBoList() | |||||
| if (message === 'success') { | |||||
| const { data: { code, data } } = await shuzirenZhiBoList() | |||||
| if (code === 200) { | |||||
| this.aigczb = data.list | this.aigczb = data.list | ||||
| } | } | ||||
| }, | }, | ||||
| async getvideoList () { | async getvideoList () { | ||||
| const { data: { message, data } } = await videoList() | |||||
| if (message === 'success') { | |||||
| const { data: { code, data } } = await videoList() | |||||
| if (code === 200) { | |||||
| this.aigcsp = data.list | this.aigcsp = data.list | ||||
| } | } | ||||
| }, | }, | ||||
| @@ -31,14 +31,13 @@ | |||||
| </template> | </template> | ||||
| <script> | <script> | ||||
| import Swiper from '@/components/swiper' | import Swiper from '@/components/swiper' | ||||
| import { lunboList } from '@/api/home.js' | |||||
| export default { | export default { | ||||
| name: 'home', | name: 'home', | ||||
| data () { | data () { | ||||
| return { | return { | ||||
| carouselList: [ | |||||
| { src: '/car1.png', title: '吉利11月销量再刷新纪录,新能源转型成效凸显', subtitle: '国际汽车企业如果现在一旦脱离了中国市场,再想回来就不可能了。必须了解这个发展的趋势,只有参与才有机会。' }, | |||||
| { src: '/car2.png', title: '吉利11月销量再刷新纪录,新能源转型成效凸显', subtitle: '国际汽车企业如果现在一旦脱离了中国市场,再想回来就不可能了。必须了解这个发展的趋势,只有参与才有机会。' } | |||||
| ], | |||||
| carouselList: [], | |||||
| articleList: [ | articleList: [ | ||||
| { | { | ||||
| img: '/airtlc.png', | img: '/airtlc.png', | ||||
| @@ -95,6 +94,17 @@ export default { | |||||
| }, | }, | ||||
| mounted () { | mounted () { | ||||
| this.article = localStorage.getItem('article') | this.article = localStorage.getItem('article') | ||||
| }, | |||||
| created () { | |||||
| this.getlunboList() | |||||
| }, | |||||
| methods: { | |||||
| async getlunboList () { | |||||
| const { data: { code, data } } = await lunboList() | |||||
| if (code === 200) { | |||||
| this.carouselList = data.list | |||||
| } | |||||
| } | |||||
| } | } | ||||
| } | } | ||||
| </script> | </script> | ||||
| @@ -46,14 +46,13 @@ | |||||
| </template> | </template> | ||||
| <script> | <script> | ||||
| import Swiper from '@/components/swiper' | import Swiper from '@/components/swiper' | ||||
| import { lunboList } from '@/api/home.js' | |||||
| export default { | export default { | ||||
| name: 'home', | name: 'home', | ||||
| data () { | data () { | ||||
| return { | return { | ||||
| carouselList: [ | |||||
| { src: '/car1.png', title: '吉利11月销量再刷新纪录,新能源转型成效凸显', subtitle: '国际汽车企业如果现在一旦脱离了中国市场,再想回来就不可能了。必须了解这个发展的趋势,只有参与才有机会。' }, | |||||
| { src: '/car2.png', title: '吉利11月销量再刷新纪录,新能源转型成效凸显', subtitle: '国际汽车企业如果现在一旦脱离了中国市场,再想回来就不可能了。必须了解这个发展的趋势,只有参与才有机会。' } | |||||
| ], | |||||
| carouselList: [], | |||||
| articleList: [ | articleList: [ | ||||
| { | { | ||||
| img: '/airtlc.png', | img: '/airtlc.png', | ||||
| @@ -106,6 +105,17 @@ export default { | |||||
| }, | }, | ||||
| components: { | components: { | ||||
| Swiper | Swiper | ||||
| }, | |||||
| created () { | |||||
| this.getlunboList() | |||||
| }, | |||||
| methods: { | |||||
| async getlunboList () { | |||||
| const { data: { code, data } } = await lunboList() | |||||
| if (code === 200) { | |||||
| this.carouselList = data.list | |||||
| } | |||||
| } | |||||
| } | } | ||||
| } | } | ||||
| </script> | </script> | ||||
| @@ -123,20 +123,20 @@ export default { | |||||
| this.$router.push({ path: '/metadaily' }) | this.$router.push({ path: '/metadaily' }) | ||||
| }, | }, | ||||
| async getlunboList () { | async getlunboList () { | ||||
| const { data: { message, data } } = await lunboList() | |||||
| if (message === 'success') { | |||||
| const { data: { code, data } } = await lunboList() | |||||
| if (code === 200) { | |||||
| this.carouselList = data.list | this.carouselList = data.list | ||||
| } | } | ||||
| }, | }, | ||||
| async getcarNewsHotList () { | async getcarNewsHotList () { | ||||
| const { data: { message, data } } = await carNewsHotList() | |||||
| if (message === 'success') { | |||||
| const { data: { code, data } } = await carNewsHotList() | |||||
| if (code === 200) { | |||||
| this.hotList = data.list | this.hotList = data.list | ||||
| } | } | ||||
| }, | }, | ||||
| async getguanggao () { | async getguanggao () { | ||||
| const { data: { message: ggm1, data: gg1 } } = await guanggao(1) | |||||
| const { data: { message: ggm2, data: gg2 } } = await guanggao(2) | |||||
| const { data: { code: ggm1, data: gg1 } } = await guanggao(1) | |||||
| const { data: { code: ggm2, data: gg2 } } = await guanggao(2) | |||||
| if (ggm1 === 'success' && ggm2 === 'success') { | if (ggm1 === 'success' && ggm2 === 'success') { | ||||
| this.gg1 = { | this.gg1 = { | ||||
| img: gg1.image, | img: gg1.image, | ||||
| @@ -149,20 +149,20 @@ export default { | |||||
| } | } | ||||
| }, | }, | ||||
| async getLink () { | async getLink () { | ||||
| const { data: { message, data: { link: alink } } } = await link() | |||||
| if (message === 'success') { | |||||
| const { data: { code, data: { link: alink } } } = await link() | |||||
| if (code === 200) { | |||||
| this.alink = alink | this.alink = alink | ||||
| } | } | ||||
| }, | }, | ||||
| async getyuanyuzhouHotList () { | async getyuanyuzhouHotList () { | ||||
| const { data: { message, data: { list } } } = await yuanyuzhouHotList() | |||||
| if (message === 'success') { | |||||
| const { data: { code, data: { list } } } = await yuanyuzhouHotList() | |||||
| if (code === 200) { | |||||
| this.daliay = list | this.daliay = list | ||||
| } | } | ||||
| }, | }, | ||||
| async gethotnewsConfig () { | async gethotnewsConfig () { | ||||
| const { data: { message, data: { display } } } = await hotnewsConfig() | |||||
| if (message === 'success') { | |||||
| const { data: { code, data: { display } } } = await hotnewsConfig() | |||||
| if (code === 200) { | |||||
| this.display = display | this.display = display | ||||
| } | } | ||||
| }, | }, | ||||
| @@ -171,9 +171,9 @@ export default { | |||||
| this.videoDialogVisible = true | this.videoDialogVisible = true | ||||
| }, | }, | ||||
| async gethotlist () { | async gethotlist () { | ||||
| const { data: { message, data } } = await hotnews() | |||||
| const { data: { code, data } } = await hotnews() | |||||
| console.log(data) | console.log(data) | ||||
| if (message === 'success') { | |||||
| if (code === 200) { | |||||
| this.hotnewsList = data.list | this.hotnewsList = data.list | ||||
| } | } | ||||
| }, | }, | ||||
| @@ -97,20 +97,20 @@ export default { | |||||
| this.$router.push({ path: '/articleList' }) | this.$router.push({ path: '/articleList' }) | ||||
| }, | }, | ||||
| async getlunboList () { | async getlunboList () { | ||||
| const { data: { message, data } } = await lunboList() | |||||
| if (message === 'success') { | |||||
| const { data: { code, data } } = await lunboList() | |||||
| if (code === 200) { | |||||
| this.carouselList = data.list | this.carouselList = data.list | ||||
| } | } | ||||
| }, | }, | ||||
| async gethotnewsConfig () { | async gethotnewsConfig () { | ||||
| const { data: { message, data: { display } } } = await hotNewsConfig() | |||||
| if (message === 'success') { | |||||
| const { data: { code, data: { display } } } = await hotNewsConfig() | |||||
| if (code === 200) { | |||||
| this.display = display | this.display = display | ||||
| } | } | ||||
| }, | }, | ||||
| async getguanggao () { | async getguanggao () { | ||||
| const { data: { message: ggm1, data: gg1 } } = await guanggao(1) | |||||
| const { data: { message: ggm2, data: gg2 } } = await guanggao(2) | |||||
| const { data: { code: ggm1, data: gg1 } } = await guanggao(1) | |||||
| const { data: { code: ggm2, data: gg2 } } = await guanggao(2) | |||||
| if (ggm1 === 'success' && ggm2 === 'success') { | if (ggm1 === 'success' && ggm2 === 'success') { | ||||
| this.gg1 = { | this.gg1 = { | ||||
| img: gg1.image, | img: gg1.image, | ||||
| @@ -123,14 +123,14 @@ export default { | |||||
| } | } | ||||
| }, | }, | ||||
| async gethotlist () { | async gethotlist () { | ||||
| const { data: { message, data } } = await hotlist() | |||||
| if (message === 'success') { | |||||
| const { data: { code, data } } = await hotlist() | |||||
| if (code === 200) { | |||||
| this.hotnewsList = data.list | this.hotnewsList = data.list | ||||
| } | } | ||||
| }, | }, | ||||
| async getvideoList () { | async getvideoList () { | ||||
| const { data: { message, data } } = await videoList() | |||||
| if (message === 'success') { | |||||
| const { data: { code, data } } = await videoList() | |||||
| if (code === 200) { | |||||
| this.carvideoList = data.list | this.carvideoList = data.list | ||||
| } | } | ||||
| }, | }, | ||||
| @@ -139,8 +139,8 @@ export default { | |||||
| this.videoDialogVisible = true | this.videoDialogVisible = true | ||||
| }, | }, | ||||
| async getCarArticle() { | async getCarArticle() { | ||||
| const { data: { message, data } } = await carArticle() | |||||
| if (message === 'success') { | |||||
| const { data: { code, data } } = await carArticle() | |||||
| if (code === 200) { | |||||
| this.carList = data.list | this.carList = data.list | ||||
| } | } | ||||
| } | } | ||||
| @@ -104,8 +104,8 @@ export default { | |||||
| this.getshendu() | this.getshendu() | ||||
| }, | }, | ||||
| async getguanggao () { | async getguanggao () { | ||||
| const { data: { message: ggm1, data: gg1 } } = await guanggao(1) | |||||
| const { data: { message: ggm2, data: gg2 } } = await guanggao(2) | |||||
| const { data: { code: ggm1, data: gg1 } } = await guanggao(1) | |||||
| const { data: { code: ggm2, data: gg2 } } = await guanggao(2) | |||||
| if (ggm1 === 'success' && ggm2 === 'success') { | if (ggm1 === 'success' && ggm2 === 'success') { | ||||
| this.gg1 = { | this.gg1 = { | ||||
| @@ -119,33 +119,33 @@ export default { | |||||
| } | } | ||||
| }, | }, | ||||
| async getlunboList () { | async getlunboList () { | ||||
| const { data: { message, data } } = await lunboList() | |||||
| if (message === 'success') { | |||||
| const { data: { code, data } } = await lunboList() | |||||
| if (code === 200) { | |||||
| this.carouselList = data.list | this.carouselList = data.list | ||||
| } | } | ||||
| }, | }, | ||||
| async gethotnewsConfig () { | async gethotnewsConfig () { | ||||
| const { data: { message, data: { display } } } = await hotNewsConfig() | |||||
| if (message === 'success') { | |||||
| const { data: { code, data: { display } } } = await hotNewsConfig() | |||||
| if (code === 200) { | |||||
| this.display = display | this.display = display | ||||
| } | } | ||||
| }, | }, | ||||
| async gethotnews () { | async gethotnews () { | ||||
| this.hotnewsList = [] | this.hotnewsList = [] | ||||
| const { data: { message, data } } = await hotnews() | |||||
| if (message === 'success') { | |||||
| const { data: { code, data } } = await hotnews() | |||||
| if (code === 200) { | |||||
| this.hotnewsList = data.list | this.hotnewsList = data.list | ||||
| } | } | ||||
| }, | }, | ||||
| async getshendu () { | async getshendu () { | ||||
| const { data: { message, data } } = await shendu(1, 10, this.depthitem) | |||||
| if (message === 'success') { | |||||
| const { data: { code, data } } = await shendu(1, 10, this.depthitem) | |||||
| if (code === 200) { | |||||
| this.shendu = data.list | this.shendu = data.list | ||||
| } | } | ||||
| }, | }, | ||||
| async getzixun () { | async getzixun () { | ||||
| const { data: { message, data } } = await zixun(1, 10) | |||||
| if (message === 'success') { | |||||
| const { data: { code, data } } = await zixun(1, 10) | |||||
| if (code === 200) { | |||||
| this.zixun = data.list | this.zixun = data.list | ||||
| } | } | ||||
| } | } | ||||