text: webpackJsonp([15],{"98dh":function(n,t,e){var a=e("Yeix");"string"==typeof a&&(a=[[n.i,a,""]]),a.locals&&(n.exports=a.locals);e("rjj0")("1b37d0aa",a,!0)},Yeix:function(n,t,e){(n.exports=e("FZ+f")(!1)).push([n.i,"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",""])},gIMz:function(n,t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=e("NYxO"),o=[{prop:"height",label:"区块高度"},{prop:"blockHash",label:"区块哈希"},{prop:"age",label:"生成时间"},{prop:"txCount",label:"交易"},{prop:"reward",label:"挖矿奖励"}],l={data:function(){return{columns:o,data:[],loading:null,totalPage:1,pageNo:1,pageSize:10,blocks:[]}},computed:Object(a.c)({device:function(n){return n.app.device}}),mounted:function(){this.initBlocks()},methods:{initData:function(){this.data=[{height:222,hash:"0xfjslfje323jdflsfj",age:"one hour ago",tx:"fjsljfdlsfjsldjfd",reward:1.32}]},initBlocks:function(n,t){var e=this;this.loading=this.$loading(),n||(n=10),t||(t=1),this.$http.post("/node/blk/pbgbb.do",{pageSize:n,pageNo:t}).then(function(n){e.loading.close(),1==n.retCode&&n.blocks&&(e.totalPage=n.totalCount,e.blocks=n.blocks.map(function(n,t){var a=n.header,o=(new Date).getTime(),l=Math.floor((o-a.timestamp)/1e3);return a.age=l<=10?l+"s ago":e.timeago().format(a.timestamp),a.reward=parseFloat(a.reward)?parseFloat(a.reward):0,a}))}).catch(function(n){e.loading.close(),console.log("errr",n),e.$message.error("网络请求错误，请稍后重试")})},pageChange:function(n){var t=n;this.pageNo=t;var e=this.pageSize;this.initBlocks(e,t)},initLates:function(){var n=this;this.$http({method:"post",url:"/node/blk/pbgtb.do"}).then(function(t){1==t.retCode&&t.block&&(console.log("latest --- block",t.block),t.block.header&&t.block.header.height&&(n.totalPage=t.block.header.height))}).catch(function(n){console.warn("err",n)})},detail:function(n,t){var e=t.blockHash?t.blockHash:"";e&&this.$router.push({name:"BlockInfo",query:{hash:e}})}}},r={render:function(){var n=this,t=n.$createElement,e=n._self._c||t;return e("div",[e("div",[e("h3",{staticClass:"title"},[n._v("block 信息")]),n._v(" "),e("el-table",{staticStyle:{width:"100%"},attrs:{data:n.blocks}},[n._l(n.columns,function(t){return["height"==t.prop?e("el-table-column",{key:t.prop,attrs:{width:"150",label:t.label},scopedSlots:n._u([{key:"default",fn:function(t){return[e("router-link",{staticClass:"link",attrs:{to:{name:"BlockInfo",query:{height:t.row.height}}}},[n._v(n._s(t.row.height))])]}}])}):"blockHash"==t.prop?e("el-table-column",{key:t.prop,attrs:{label:t.label},scopedSlots:n._u([{key:"default",fn:function(t){return[e("span",{staticClass:"link",on:{click:function(e){n.detail(e,t.row)}}},[n._v(n._s(t.row.blockHash))])]}}])}):e("el-table-column",{key:t.prop,attrs:{width:"150",prop:t.prop,label:t.label}})]})],2),n._v(" "),e("div",{staticClass:"pager"},[e("div",{staticClass:"pager-inner"},[e("el-pagination",{attrs:{small:"mobile"==n.device,background:"",layout:"prev, pager, next, jumper",total:n.totalPage},on:{"current-change":n.pageChange}})],1)])],1)])},staticRenderFns:[]};var i=e("VU/8")(l,r,!1,function(n){e("98dh")},null,null);t.default=i.exports}});