12 |
- (self["webpackChunkapp"]=self["webpackChunkapp"]||[]).push([[182],{182:function(t,e,i){"use strict";i.r(e),i.d(e,{default:function(){return g}});var s=function(){var t=this,e=t._self._c;return e("div",[e("div",[e("div",{staticClass:"menu_cn"},[t._v("新闻动态")]),e("div",{staticClass:"menu_en"},[t._v("News feed")]),e("div",{staticClass:"newsWrapper"},[e("div",{staticStyle:{width:"600px"}},[e("el-carousel",{attrs:{interval:5e3,arrow:"always",height:"400px"}},t._l(t.news,(function(t,i){return e("el-carousel-item",{key:i,attrs:{width:"100%",height:"100%"}},[e("img",{attrs:{src:t.picturePath,height:"100%",width:"100%"}})])})),1)],1),e("div",{staticStyle:{"max-height":"400px",overflow:"hidden"}},[e("ul",t._l(t.news,(function(i,s){return e("li",{key:s,staticClass:"lieBiao liPointer",on:{click:function(e){return t.goto(i.link)}}},[e("div",{staticClass:"time"},[t._v(" "+t._s(null!=i.generateDate?i.generateDate.substring(0,10):"")+" ")]),e("div",{staticClass:"title"},[t._v(" "+t._s(i.title)+" ")])])})),0)])])]),e("div",[e("div",{staticClass:"menu_cn"},[t._v("数据精选")]),e("div",{staticClass:"menu_en"},[t._v("Data selection")]),e("div",{staticClass:"datasetWrapper"},t._l(t.datasets,(function(i,s){return e("div",{key:s,staticClass:"imgWrapper",attrs:{"v-model":t.datasets,span:6},on:{click:function(e){return t.goto("/dataset/"+i.id)}}},[e("img",{staticClass:"dataset_pic",attrs:{src:i.imgUrl}}),e("span",{staticClass:"dataset_name"},[t._v(t._s(i.title))])])})),0)])])},n=[],a=i(64720),r=i(75299);function o(){return(0,r.Z)({url:"/news/allNews",method:"GET"})}var u=i(38183),l={name:"homePage",components:{"el-carousel":a.Carousel,"el-carousel-item":a.CarouselItem},data(){return{datasets:[],news:[]}},created(){this.init()},methods:{initDigitalTop(){(0,u.iv)(4).then((t=>{this.datasets=t.data;for(let e=0;e<this.datasets.length;e++)if(null==this.datasets[e].imgUrl){let t=Math.floor(3*Math.random())+1;this.datasets[e].imgUrl=i(98007)("./"+t+".jpg")}}))},initNewsList(){o().then((t=>{this.news=t.data}))},init(){this.initDigitalTop(),this.initNewsList()},goto(t){window.open(t)}}},c=l,d=i(1001),p=(0,d.Z)(c,s,n,!1,null,"3450bacf",null),g=p.exports},38183:function(t,e,i){"use strict";i.d(e,{JS:function(){return o},Mw:function(){return r},Th:function(){return a},iv:function(){return n}});var s=i(75299);function n(t){return(0,s.Z)({url:"/digital/getTopByActive/"+t,method:"GET"})}function a(t){return(0,s.Z)({url:"/digital/getDigitalById/"+t,method:"GET"})}function r(t){return(0,s.Z)({url:"/dataset/getById/"+t,method:"GET"})}function o(t){return(0,s.Z)({url:"/file/getFilesByDigitalId/"+t,method:"GET"})}},98007:function(t,e,i){var s={"./1.jpg":45038,"./2.jpg":57350,"./3.jpg":8505,"./logo.jpg":7283};function n(t){var e=a(t);return i(e)}function a(t){if(!i.o(s,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return s[t]}n.keys=function(){return Object.keys(s)},n.resolve=a,t.exports=n,n.id=98007},75299:function(t,e,i){"use strict";var s=i(59521);s.Z.defaults.withCredentials=!0;const n=s.Z.create({baseURL:"/api",withCredentinpmals:!0,timeout:1e5});n.interceptors.response.use((t=>{const e=t.data;if(0!==e.code)return e}),(t=>(console.log("err requestjs err",t),t.response.data.length,Promise.reject(t)))),n.interceptors.request.use((function(t){let e=window.localStorage.getItem("accessToken");return e?(t.headers.accessToken=e,t):t})),e["Z"]=n},45038:function(t,e,i){"use strict";t.exports=i.p+"img/1.19edf8d5.jpg"},57350:function(t,e,i){"use strict";t.exports=i.p+"img/2.86592310.jpg"},8505:function(t,e,i){"use strict";t.exports=i.p+"img/3.57aee606.jpg"},7283:function(t,e,i){"use strict";t.exports=i.p+"img/logo.d019c192.jpg"}}]);
- //# sourceMappingURL=182.367a3a8d.js.map
|