index.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469
  1. <template>
  2. <div class="m-box" :style="{height:boxHeight}">
  3. <div class="m-con auto" v-if="mainData">
  4. <div class="m1-box">
  5. <div class="m1-box-fl fl">
  6. <div class="m1-news-img" >
  7. <swiper :options="swiperOptionTop" class="gallery-top" ref="swiperTop" v-if="swiperStatic">
  8. <swiper-slide v-for="(item,index) in swiperList" :key="index">
  9. <nuxt-link :to="{path: '/content', query:{id:item.infoId}}" tag="a" target="_blank">
  10. <img :src="item.path"><p class="line-one">{{item.title}}</p>
  11. </nuxt-link>
  12. </swiper-slide>
  13. <div class="swiper-button-next swiper-button-white" slot="button-next"></div>
  14. <div class="swiper-button-prev swiper-button-white" slot="button-prev"></div>
  15. </swiper>
  16. <img src="@/static/loading.png" style="height:498px;width:692px;margin-left:38px;" v-if="!swiperStatic"/>
  17. </div>
  18. </div>
  19. <div class="m1-box-fr fr">
  20. <div class="m1-fr-news-list clear">
  21. <div class='mt'>
  22. <h4>观察</h4>
  23. <hr></hr>
  24. </div>
  25. <ul>
  26. <li v-for="(item,index) in mainData[23]">
  27. <nuxt-link @mouseover.native="showRemark(index)" class="line-one" :to="{path: '/content', query:{id:item.infoId}}" tag="a" target="_blank">{{item.title}}</nuxt-link>
  28. <div class="remark" v-if="showIndex==index">
  29. <p class="line-n" style="-webkit-box-orient: vertical;">{{item.summary}}</p>
  30. </div>
  31. </li>
  32. </ul>
  33. </div>
  34. </div>
  35. </div>
  36. <div class="m-list clearfix">
  37. <div class="fl list-both-width-l">
  38. <Row class="english">
  39. <Col :span="11" v-for="(item,index) in mainData[43]" :key="index">
  40. <div class="en-title">
  41. <nuxt-link :to="{path: '/content', query:{id:item.infoId}}" tag="a" target="_blank"><img v-lazy="picPath+item.infoimg" :alt="item.title" :key="item.infoId"></nuxt-link>
  42. <nuxt-link class="en-title-a" :to="{path: '/content', query:{id:item.infoId}}" style="-webkit-box-orient: vertical;" tag="a" target="_blank">{{item.title}}</nuxt-link>
  43. </div>
  44. </Col>
  45. </Row>
  46. <span class="blue-line"></span>
  47. <div class='mt'>
  48. <h4>焦点新闻</h4>
  49. <hr></hr>
  50. </div>
  51. <div class="content-item" v-for="item in focusNews">
  52. <nuxt-link class="img-a" :to="{path: '/content', query:{id:item.infoId}}" tag="a" target="_blank"><img v-lazy="picPath+item.infoimg" :alt="item.title" :key="item.infoId"></nuxt-link>
  53. <div class="content-text">
  54. <nuxt-link :to="{path: '/content', query:{id:item.infoId}}" style="-webkit-box-orient: vertical;" tag="a" target="_blank">{{item.title}}</nuxt-link>
  55. <p style="-webkit-box-orient: vertical;">{{item.summary}}</p>
  56. <div class="source" v-if="item.columnname.includes('—')">
  57. <nuxt-link :to="{path: '/lists', query:{id:item.parentcolumnId}}" style="-webkit-box-orient: vertical;" tag="a" target="_blank">{{item.columnname.split('—')[0]}}</nuxt-link>
  58. <span>—</span>
  59. <nuxt-link :to="{path: '/lists', query:{id:item.columnId}}" style="-webkit-box-orient: vertical;" tag="a" target="_blank">{{item.columnname.split('—')[1]}}</nuxt-link>
  60. <span>/{{item.uptimeStr}}</span>
  61. </div>
  62. <div class="source" v-else>
  63. <nuxt-link v-if="item.columnname" :to="{path: '/lists', query:{id:item.columnId}}" style="-webkit-box-orient: vertical;" tag="a" target="_blank">{{item.columnname}}/</nuxt-link>
  64. <span>{{item.uptimeStr}}</span>
  65. </div>
  66. </div>
  67. </div>
  68. <div class="more-art">
  69. <Button shape="circle" @click="moreArt">更多文章</Button>
  70. </div>
  71. </div>
  72. <div class="fl list-both-width">
  73. <ul class="add-img">
  74. <li v-for="item in adObj">
  75. <a :href="item.adurl" target="view_frame" >
  76. <img v-lazy="picPath+item.adimg" :key="item.infoId"/>
  77. </a>
  78. </li>
  79. </ul>
  80. <div class="column-item">
  81. <div class="column-title mt">
  82. <span></span>
  83. <h4>视频</h4>
  84. <div>
  85. <nuxt-link :to="{path: '/lists', query:{id:3}}" tag="a" target="_blank">更多</nuxt-link>
  86. </div>
  87. </div>
  88. <div class="column-content">
  89. <div class="column-video">
  90. <nuxt-link class="iconfont icon-bofang" :to="{path: '/content', query:{id:mainData[3][0].infoId}}" tag="a" target="_blank">
  91. <img v-lazy="picPath+mainData[3][0].infoimg" :alt="mainData[3][0].title.title">
  92. <p class="line-one">{{mainData[3][0].title}}</p>
  93. </nuxt-link>
  94. </div>
  95. <!--<div class="video">-->
  96. <!--<Row >-->
  97. <!--<Col :span="11" v-for="(item,index) in mainData[3]" :key="index" v-if="index!=0">-->
  98. <!--<div class="content-li" >-->
  99. <!--<nuxt-link class="iconfont icon-bofang" :to="{path: '/content', query:{id:item.infoId}}" tag="a" target="_blank">-->
  100. <!--<img v-lazy="picPath+item.infoimg" alt="">-->
  101. <!--</nuxt-link>-->
  102. <!--<nuxt-link class="vid-til" style="-webkit-box-orient: vertical;" :to="{path: '/content', query:{id:item.infoId}}" tag="a" target="_blank">{{item.title}}</nuxt-link>-->
  103. <!--</div>-->
  104. <!--</Col>-->
  105. <!--</Row>-->
  106. <!--</div>-->
  107. <div class="video">
  108. <Row v-for="(item,index) in mainData[3]" :key="index" v-if="index!=0" class="video-list">
  109. <Col :span="11" >
  110. <div class="content-li" >
  111. <nuxt-link class="iconfont icon-bofang" :to="{path: '/content', query:{id:item.infoId}}" tag="a" target="_blank">
  112. <img v-lazy="picPath+item.infoimg" :alt="item.title" :key="item.infoId">
  113. </nuxt-link>
  114. </div>
  115. </Col>
  116. <Col :span="11">
  117. <div class="content-li" >
  118. <nuxt-link class="vid-til" style="-webkit-box-orient: vertical;" :to="{path: '/content', query:{id:item.infoId}}" tag="a" target="_blank">{{item.title}}</nuxt-link>
  119. </div>
  120. </Col>
  121. </Row>
  122. </div>
  123. <!-- <div>
  124. <ul>
  125. <li v-for="(item,index) in mainData[3]">
  126. <div class="content-li" v-if="index!=0">
  127. <nuxt-link class="iconfont icon-bofang" :to="{path: '/content', query:{id:item.infoId}}" tag="a" target="_blank">
  128. <img v-lazy="picPath+item.infoimg" alt="">
  129. </nuxt-link>
  130. <nuxt-link :to="'/lists/'+item.infoId" class="line-one" style="-webkit-box-orient: vertical;" tag="a" target="_blank">{{item.title}}</nuxt-link>
  131. </div>
  132. </li>
  133. </ul>
  134. </div> -->
  135. </div>
  136. </div>
  137. <div class="column-item">
  138. <div class="column-title mt">
  139. <span></span>
  140. <h4 @mouseenter="changeLiftColData(2)" >生活</h4>
  141. <div>
  142. <nuxt-link @mouseenter.native="changeLiftColData(9)" :to="{path: '/lists', query:{id:9}}" tag="a" target="_blank">旅游</nuxt-link>
  143. <nuxt-link @mouseenter.native="changeLiftColData(11)" :to="{path: '/lists', query:{id:11}}" tag="a" target="_blank">美食</nuxt-link>
  144. <nuxt-link @mouseenter.native="changeLiftColData(12)" :to="{path: '/lists', query:{id:12}}" tag="a" target="_blank">健康</nuxt-link>
  145. <nuxt-link @mouseenter.native="changeLiftColData(13)" :to="{path: '/lists', query:{id:13}}" tag="a" target="_blank">流行风</nuxt-link>
  146. </div>
  147. </div>
  148. <div class="column-content">
  149. <Row class="life">
  150. <Col :span="11" v-for="(item,index) in lifeColumnData" :key="index">
  151. <nuxt-link :to="{path: '/content', query:{id:item.infoId}}" tag="a" target="_blank"><img v-lazy="picPath+item.infoimg" :alt="item.title" :key="item.infoId"></nuxt-link>
  152. <nuxt-link class="img-a" style="-webkit-box-orient: vertical;" :to="{path: '/content', query:{id:item.infoId}}" tag="a" target="_blank">{{item.title}}</nuxt-link>
  153. </Col>
  154. </Row>
  155. </div>
  156. </div>
  157. <div class="column-item">
  158. <div class="column-title mt">
  159. <span></span>
  160. <h4>文化</h4>
  161. <div>
  162. <nuxt-link :to="{path: '/lists', query:{id:24}}" tag="a" target="_blank">玄学</nuxt-link>
  163. <nuxt-link :to="{path: '/lists', query:{id:8}}" tag="a" target="_blank">娱乐</nuxt-link>
  164. <nuxt-link :to="{path: '/lists', query:{id:10}}" tag="a" target="_blank">文艺</nuxt-link>
  165. </div>
  166. </div>
  167. <div class="column-content">
  168. <div class="cul-top">
  169. <nuxt-link :to="{path: '/content', query:{id:mainData[41][0].infoId}}" tag="a" target="_blank"><img v-lazy="picPath+mainData[41][0].infoimg" :alt="mainData[41][0].title"></nuxt-link>
  170. <nuxt-link :to="{path: '/content', query:{id:mainData[41][0].infoId}}" tag="a" target="_blank">{{mainData[41][0].title}}</nuxt-link>
  171. </div>
  172. <div class="culture">
  173. <ul>
  174. <li v-for="(item,index) in mainData[41]" v-if="index!=0" class="line-one">
  175. <nuxt-link :to="{path: '/content', query:{id:item.infoId}}" tag="a" target="_blank">{{item.title}}</nuxt-link>
  176. </li>
  177. </ul>
  178. </div>
  179. </div>
  180. </div>
  181. <div class="column-item">
  182. <div class="column-title mt">
  183. <span></span>
  184. <h4>服务</h4>
  185. </div>
  186. <div class="column-content">
  187. <div class="service">
  188. <div class="service-list">
  189. <img src="~/assets/img/20.png" alt="">
  190. <ul>
  191. <li class="line-one" v-for="item in mainData[20]">
  192. <nuxt-link :to="{path: '/content', query:{id:item.infoId}}" tag="a" target="_blank">{{item.title}}</nuxt-link>
  193. </li>
  194. </ul>
  195. </div>
  196. <div class="service-list">
  197. <img src="~/assets/img/21.png" alt="">
  198. <ul>
  199. <li class="line-one" v-for="item in mainData[21]">
  200. <nuxt-link :to="{path: '/content', query:{id:item.infoId}}" tag="a" target="_blank">{{item.title}}</nuxt-link>
  201. </li>
  202. </ul>
  203. </div>
  204. <div class="service-list">
  205. <img src="~/assets/img/19.png" alt="">
  206. <ul>
  207. <li class="line-one" v-for="item in mainData[19]">
  208. <nuxt-link :to="{path: '/content', query:{id:item.infoId}}" tag="a" target="_blank">{{item.title}}</nuxt-link>
  209. </li>
  210. </ul>
  211. </div>
  212. <div class="service-list">
  213. <img src="~/assets/img/17.png" alt="">
  214. <ul>
  215. <li class="line-one" v-for="item in mainData[17]">
  216. <nuxt-link :to="{path: '/content', query:{id:item.infoId}}" tag="a" target="_blank">{{item.title}}</nuxt-link>
  217. </li>
  218. </ul>la
  219. </div>
  220. <div class="service-list">
  221. <img src="~/assets/img/14.png" alt="">
  222. <ul>
  223. <li class="line-one" v-for="item in mainData[14]">
  224. <nuxt-link :to="{path: '/content', query:{id:item.infoId}}" tag="a" target="_blank">{{item.title}}</nuxt-link>
  225. </li>
  226. </ul>
  227. </div>
  228. </div>
  229. </div>
  230. </div>
  231. <div class="column-item" style="margin-bottom:10px;">
  232. <div class="column-title mt">
  233. <span></span>
  234. <h4>词条</h4>
  235. </div>
  236. <div class="column-content">
  237. <div class="wiki-top">
  238. <p>中国-东盟自由贸易区&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;中国-东盟信息港</p>
  239. <p>东南亚国家联盟&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;中国-东盟博览会&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;一带一路</p>
  240. </div>
  241. <div>
  242. <Row class="wiki">
  243. <Col :span="8">
  244. <li>
  245. <nuxt-link :to="{path: '/lists', query:{id:5}}"><img src="~/assets/img/ten_icon/kh.png" tag="a" target="_blank" alt="柬埔寨">柬埔寨</nuxt-link>
  246. </li>
  247. </Col>
  248. <Col :span="8">
  249. <li>
  250. <nuxt-link :to="{path: '/lists', query:{id:5}}"><img src="~/assets/img/ten_icon/bn.png" tag="a" target="_blank" alt="文莱">文莱</nuxt-link>
  251. </li>
  252. </Col>
  253. <Col :span="8">
  254. <li>
  255. <nuxt-link :to="{path: '/lists', query:{id:5}}"><img src="~/assets/img/ten_icon/id.png" tag="a" target="_blank" alt="印尼">印尼</nuxt-link>
  256. </li>
  257. </Col>
  258. <Col :span="8">
  259. <li>
  260. <nuxt-link :to="{path: '/lists', query:{id:5}}"><img src="~/assets/img/ten_icon/sg.png" tag="a" target="_blank" alt="新加坡">新加坡</nuxt-link>
  261. </li>
  262. </Col>
  263. <Col :span="8">
  264. <li>
  265. <nuxt-link :to="{path: '/lists', query:{id:5}}"><img src="~/assets/img/ten_icon/vn.png" tag="a" target="_blank" alt="越南">越南</nuxt-link>
  266. </li>
  267. </Col>
  268. <Col :span="8">
  269. <li>
  270. <nuxt-link :to="{path: '/lists', query:{id:5}}"><img src="~/assets/img/ten_icon/mm.png" tag="a" target="_blank" alt="缅甸">缅甸</nuxt-link>
  271. </li>
  272. </Col>
  273. <Col :span="8">
  274. <li>
  275. <nuxt-link :to="{path: '/lists', query:{id:5}}"><img src="~/assets/img/ten_icon/ph.png" tag="a" target="_blank" alt="菲律宾">菲律宾</nuxt-link>
  276. </li>
  277. </Col>
  278. <Col :span="8">
  279. <li>
  280. <nuxt-link :to="{path: '/lists', query:{id:5}}"><img src="~/assets/img/ten_icon/la.png" tag="a" target="_blank" alt="老挝">老挝</nuxt-link>
  281. </li>
  282. </Col>
  283. <Col :span="8">
  284. <li>
  285. <nuxt-link :to="{path: '/lists', query:{id:5}}"><img src="~/assets/img/ten_icon/th.png" tag="a" target="_blank" alt="泰国">泰国</nuxt-link>
  286. </li>
  287. </Col>
  288. <Col :span="8">
  289. <li>
  290. <nuxt-link :to="{path: '/lists', query:{id:5}}"><img src="~/assets/img/ten_icon/my.png" tag="a" target="_blank" alt="马来西亚">马来西亚</nuxt-link>
  291. </li>
  292. </Col>
  293. </Row>
  294. </div>
  295. </div>
  296. </div>
  297. </div>
  298. </div>
  299. <div @click="returnTop" class="return-top"></div>
  300. <div class="f-friend">
  301. <Row>
  302. <Col :span="14">
  303. <div class="declaration">
  304. <p>版权声明</p>
  305. <p>本网站部分信息来源于互联网络,如有侵犯版权,请联系我们及时处理。凡注明“来源:东盟头条”的所有作品,均为东盟头条新闻社、东盟头条新闻网以及东盟头条APP合法拥有版权或有权使用的作品,欢迎媒体转载。</p>
  306. </div>
  307. </Col>
  308. <Col :span="10">
  309. <div class="declaration">
  310. <p>联系我们</p>
  311. <ul>
  312. <li>地址:柬埔寨王国金边市堆谷区606路38号</li>
  313. <li>电话:00855-023235388 传真:00855-023235389</li>
  314. <li>电子邮箱:aseantop@163.com</li>
  315. </ul>
  316. </div>
  317. </Col>
  318. </Row>
  319. </div>
  320. </div>
  321. <!--<Spin fix size="large" v-if="!mainData"></Spin>-->
  322. </div>
  323. </template>
  324. <script>
  325. import { mainAd, getMainData, listColumnInfo, listFocusInfo, listWordbar } from '~/api/homePage';
  326. export default {
  327. data() {
  328. return {
  329. picPath: 'http://pic-asean2.oss-cn-hongkong.aliyuncs.com/',
  330. suffix:'?x-oss-process=image/watermark,image_d2F0ZXJtYXJrL3dtMS5wbmc_eC1vc3MtcHJvY2Vzcz1pbWFnZS9yZXNpemUsUF8zMA==,g_se,x_10,y_10,t_70',
  331. swiperList: [],
  332. adObj: {},
  333. mainData: null,
  334. focusNews:null,
  335. showIndex:5,
  336. lifeColumnKey: 2,
  337. lifeColumnData: [],
  338. swiperOptionTop: {
  339. spaceBetween: 10,
  340. loop: true,
  341. loopedSlides: 5, //looped slides should be the same
  342. navigation: {
  343. nextEl: '.swiper-button-next',
  344. prevEl: '.swiper-button-prev'
  345. },
  346. autoplay: {
  347. delay: 2500,
  348. disableOnInteraction: false
  349. },
  350. },
  351. swiperOptionThumbs: {
  352. spaceBetween: 10,
  353. slidesPerView: 4,
  354. touchRatio: 0.2,
  355. loop: true,
  356. loopedSlides: 5, //looped slides should be the same
  357. slideToClickedSlide: true,
  358. },
  359. // boxHeight:document.documentElement.clientHeight-295+"px"//页面的默认高度
  360. boxHeight:500+'px',
  361. swiperStatic:false,
  362. };
  363. },
  364. async asyncData(){
  365. let swiperListArray = [];
  366. let [adObj, mainData,focusNews,swiperList] = await Promise.all([
  367. mainAd(),
  368. listColumnInfo({reqdata:{columnIds:'2,3,43,23,41,14,17,19,20,21,9,11,12,13'}}),
  369. listFocusInfo({"page": "1","rows": "16", "reqdata": {"type": "focus"}}),
  370. listFocusInfo({"page": "1","rows": "16", "reqdata": {"type": "recommend"}})
  371. ])
  372. swiperList.list.map(item => {
  373. swiperListArray.push({
  374. path: 'http://pic-asean2.oss-cn-hongkong.aliyuncs.com/' + item.infoimg,
  375. infoId: item.infoId,
  376. title:item.title
  377. });
  378. });
  379. return {
  380. adObj:adObj.object,
  381. mainData:mainData.object,
  382. lifeColumnData:mainData.object[2],
  383. focusNews:focusNews.list,
  384. swiperList:swiperListArray
  385. }
  386. },
  387. mounted() {
  388. this.swiperStatic=true;
  389. },
  390. updated(){
  391. this.$nextTick(() => {
  392. const swiperTop = this.$refs.swiperTop.swiper
  393. // const swiperThumbs = this.$refs.swiperThumbs.swiper
  394. // swiperTop.controller.control = swiperThumbs
  395. // swiperThumbs.controller.control = swiperTop
  396. })
  397. },
  398. head() {
  399. return {
  400. title: '东盟头条—聚焦东盟 关注中国 放眼世界',
  401. meta: [{
  402. name: 'keywords',
  403. content: '东盟头条,aseantop,柬埔寨,文莱,印尼,新加坡,越南,缅甸,菲律宾,老挝,泰国,马来西亚'
  404. },{
  405. name: 'description',
  406. content: '东盟头条新闻社(ASEAN TOP NEWS)旗下另一个重要媒体平台东盟头条新闻网(www.aseantop.com;www.aseantop.net)。东盟头条新闻网设有要闻聚焦、东盟动态、中国政情、环球瞭望、头条观察、高端访谈、看中国、华侨华人、文化生活等多个特色板块,网站秉持“独立、客观、公正、专业”的新闻理念,平实报道和评论东盟各国以及中国的重要动态,为各界人士提供可靠可信可读的有价值信息。'
  407. }],
  408. }
  409. },
  410. methods: {
  411. returnTop() {
  412. window.scrollTo(0, 0);
  413. },
  414. showRemark(index){
  415. this.showIndex=index;
  416. },
  417. moreArt(){
  418. // this.$router.push({path:'/lists',query:{id:'focus'}});
  419. let routeData = this.$router.resolve({
  420. path: '/lists',
  421. query: { id: 'focus' }
  422. })
  423. window.open(routeData.href, '_blank')
  424. },
  425. changeLiftColData(columnId){
  426. this.lifeColumnData=this.mainData[columnId]
  427. }
  428. }
  429. };
  430. </script>
  431. <style lang="scss" scoped>
  432. .swiper-container {
  433. background-color: #000;
  434. // opacity: 0.8;
  435. }
  436. .swiper-slide {
  437. background-size: cover;
  438. background-position: center;
  439. }
  440. .gallery-top {
  441. height: 80%!important;
  442. width: 100%;
  443. }
  444. .gallery-thumbs {
  445. height: 20%!important;
  446. box-sizing: border-box;
  447. padding: 10px 0;
  448. }
  449. .gallery-thumbs .swiper-slide {
  450. width: 25%;
  451. height: 100%;
  452. opacity: 0.4;
  453. }
  454. .gallery-thumbs .swiper-slide-active {
  455. opacity: 1;
  456. }
  457. </style>