"use weex:vue";

if (typeof Promise !== 'undefined' && !Promise.prototype.finally) {
  Promise.prototype.finally = function(callback) {
    const promise = this.constructor
    return this.then(
      value => promise.resolve(callback()).then(() => value),
      reason => promise.resolve(callback()).then(() => {
        throw reason
      })
    )
  }
};

if (typeof uni !== 'undefined' && uni && uni.requireGlobal) {
  const global = uni.requireGlobal()
  ArrayBuffer = global.ArrayBuffer
  Int8Array = global.Int8Array
  Uint8Array = global.Uint8Array
  Uint8ClampedArray = global.Uint8ClampedArray
  Int16Array = global.Int16Array
  Uint16Array = global.Uint16Array
  Int32Array = global.Int32Array
  Uint32Array = global.Uint32Array
  Float32Array = global.Float32Array
  Float64Array = global.Float64Array
  BigInt64Array = global.BigInt64Array
  BigUint64Array = global.BigUint64Array
};


(()=>{var y=Object.create;var m=Object.defineProperty;var v=Object.getOwnPropertyDescriptor;var A=Object.getOwnPropertyNames;var T=Object.getPrototypeOf,C=Object.prototype.hasOwnProperty;var D=(t,i)=>()=>(i||t((i={exports:{}}).exports,i),i.exports);var k=(t,i,r,s)=>{if(i&&typeof i=="object"||typeof i=="function")for(let a of A(i))!C.call(t,a)&&a!==r&&m(t,a,{get:()=>i[a],enumerable:!(s=v(i,a))||s.enumerable});return t};var I=(t,i,r)=>(r=t!=null?y(T(t)):{},k(i||!t||!t.__esModule?m(r,"default",{value:t,enumerable:!0}):r,t));var x=D((J,f)=>{f.exports=Vue});var e=I(x());var g=(t,i)=>{let r=t.__vccOpts||t;for(let[s,a]of i)r[s]=a;return r};var B={view:{"":{flexDirection:"column"}},"flex-row":{"":{flexDirection:"row"}},"flex-col":{"":{flexDirection:"column"}},"list-cell":{"":{width:"750rpx",paddingTop:0,paddingRight:"30rpx",paddingBottom:0,paddingLeft:"30rpx"}},"uni-list-cell-hover":{"":{backgroundColor:"#eeeeee"}},"media-item":{"":{position:"relative",flex:1,flexDirection:"column",paddingTop:"20rpx",paddingRight:"30rpx",paddingBottom:"21rpx",paddingLeft:"30rpx"}},"media-item-hover":{"":{backgroundColor:"#eeeeee"}},"media-item-line":{"":{position:"absolute",left:"30rpx",right:"30rpx",bottom:0,height:"1rpx",backgroundColor:"#ebebeb"}},"media-image-right":{"":{flexDirection:"row"}},"media-image-left":{"":{flexDirection:"row-reverse"}},"media-title":{"":{flex:1,lines:3,textOverflow:"ellipsis",fontSize:"30rpx",color:"#555555"}},"media-title2":{"":{flex:1,marginTop:"6rpx",lineHeight:"40rpx"}},"image-section":{"":{marginTop:"20rpx",flexDirection:"row",justifyContent:"space-between"}},"image-section-right":{"":{marginTop:"0rpx",marginLeft:"10rpx",width:"225rpx",height:"146rpx"}},"image-section-left":{"":{marginTop:"0rpx",marginRight:"10rpx",width:"225rpx",height:"146rpx"}},"image-list1":{"":{width:"690rpx",height:"481rpx"}},"image-list2":{"":{width:"225rpx",height:"146rpx"}},"image-list3":{"":{width:"225rpx",height:"146rpx"}},"media-info":{"":{flexDirection:"row",alignItems:"center"}},"info-text":{"":{marginRight:"20rpx",color:"#999999",fontSize:"24rpx"}},"media-foot":{"":{marginTop:"25rpx",flexDirection:"row",alignItems:"center",justifyContent:"space-between"}},"max-close-view":{"":{position:"relative",alignItems:"center",flexDirection:"row",width:"40rpx",height:"30rpx",lineHeight:"30rpx",borderWidth:"1rpx",borderStyle:"solid",borderColor:"#aaaaaa",borderRadius:4,justifyContent:"center",textAlign:"center"}},"close-l":{"":{position:"absolute",width:"18rpx",height:"1rpx",backgroundColor:"#aaaaaa"}},"close-h":{"":{transform:"rotate(45deg)"}},"close-v":{"":{transform:"rotate(-45deg)"}}},L={props:{options:{type:Object,default:function(t){return{}}}},methods:{click(){this.$emit("click")},close(t){this.$emit("close")}}};function j(t,i,r,s,a,o){return r.options.title?((0,e.openBlock)(),(0,e.createElementBlock)("view",{key:0,class:"media-item view",hoverClass:"media-item-hover",onClick:i[1]||(i[1]=(...c)=>o.click&&o.click(...c)),renderWhole:!0},[(0,e.createElementVNode)("view",{class:"view",style:(0,e.normalizeStyle)({flexDirection:r.options.article_type===1||r.options.article_type===2?r.options.article_type===2?"row":"row-reverse":"column"})},[(0,e.createElementVNode)("u-text",{class:(0,e.normalizeClass)(["media-title",{"media-title2":r.options.article_type===1||r.options.article_type===2}])},(0,e.toDisplayString)(r.options.title),3),r.options.image_list||r.options.image_url?((0,e.openBlock)(),(0,e.createElementBlock)("view",{key:0,class:(0,e.normalizeClass)(["image-section flex-row",{"image-section-right":r.options.article_type===2,"image-section-left":r.options.article_type===1}]),style:{flexDirection:"row"}},[r.options.image_url?((0,e.openBlock)(),(0,e.createElementBlock)("u-image",{key:0,class:(0,e.normalizeClass)(["image-list1",{"image-list2":r.options.article_type===1||r.options.article_type===2}]),src:r.options.image_url},null,10,["src"])):(0,e.createCommentVNode)("",!0),r.options.image_list?((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,{key:1},(0,e.renderList)(r.options.image_list,(c,u)=>((0,e.openBlock)(),(0,e.createElementBlock)("u-image",{class:"image-list3",src:c.url,key:u},null,8,["src"]))),128)):(0,e.createCommentVNode)("",!0)],2)):(0,e.createCommentVNode)("",!0)],4),(0,e.createElementVNode)("view",{class:"media-foot flex-row",style:{"flex-direction":"row"}},[(0,e.createElementVNode)("view",{class:"media-info flex-row",style:{"flex-direction":"row"}},[(0,e.createElementVNode)("u-text",{class:"info-text"},(0,e.toDisplayString)(r.options.source),1),(0,e.createElementVNode)("u-text",{class:"info-text"},(0,e.toDisplayString)(r.options.comment_count)+"\u6761\u8BC4\u8BBA",1),(0,e.createElementVNode)("u-text",{class:"info-text"},(0,e.toDisplayString)(r.options.datetime),1)]),(0,e.createElementVNode)("view",{class:"max-close-view",onClick:i[0]||(i[0]=(0,e.withModifiers)((...c)=>o.close&&o.close(...c),["stop"]))},[(0,e.createElementVNode)("view",{class:"close-l close-h"}),(0,e.createElementVNode)("view",{class:"close-l close-v"})])]),(0,e.createElementVNode)("view",{class:"media-item-line",style:{position:"absolute"}})])):(0,e.createCommentVNode)("",!0)}var F=g(L,[["render",j],["styles",[B]]]),S={tabs:{"":{flex:1,flexDirection:"column",overflow:"hidden",backgroundColor:"#ffffff"}},"scroll-h":{"":{width:"750rpx",height:"80rpx",flexDirection:"row"}},"line-h":{"":{height:"1rpx",backgroundColor:"#cccccc"}},"uni-tab-item":{"":{flexWrap:"nowrap",paddingLeft:"34rpx",paddingRight:"34rpx"}},"uni-tab-item-title":{"":{color:"#555555",fontSize:"30rpx",height:"80rpx",lineHeight:"80rpx",flexWrap:"nowrap"}},"uni-tab-item-title-active":{"":{color:"#007AFF"}},"swiper-box":{"":{flex:1}},"swiper-item":{"":{flex:1,flexDirection:"row"}},"scroll-v":{"":{flex:1,flexDirection:"column",width:100}},"update-tips":{"":{position:"absolute",left:0,top:41,right:0,paddingTop:5,paddingBottom:5,backgroundColor:"#FDDD9B",alignItems:"center",justifyContent:"center",textAlign:"center"}},"update-tips-text":{"":{fontSize:14,color:"#ffffff"}},refresh:{"":{width:100,height:64,justifyContent:"center"}},"refresh-view":{"":{flexDirection:"row",flexWrap:"nowrap",alignItems:"center",justifyContent:"center"}},"refresh-icon":{"":{width:30,height:30,transitionDuration:500,transitionProperty:"transform",transform:"rotate(0deg)",transformOrigin:"15px 15px"}},"refresh-icon-active":{"":{transform:"rotate(180deg)"}},"loading-icon":{"":{width:20,height:20,marginRight:5,color:"#999999"}},"loading-text":{"":{marginLeft:2,fontSize:16,color:"#999999"}},"loading-more":{"":{alignItems:"center",justifyContent:"center",paddingTop:10,paddingBottom:10,textAlign:"center"}},"loading-more-text":{"":{fontSize:"28rpx",color:"#999999"}},"@TRANSITION":{"refresh-icon":{duration:500,property:"transform"}}},R=100,M=3,z={data0:{datetime:"40\u5206\u949F\u524D",article_type:0,title:"uni-app\u884C\u4E1A\u5CF0\u4F1A\u9891\u9891\u4EAE\u76F8\uFF0C\u5F00\u53D1\u8005\u53CD\u54CD\u70ED\u70C8!",source:"DCloud",comment_count:639},data1:{datetime:"\u4E00\u5929\u524D",article_type:1,title:"DCloud\u5B8C\u6210B2\u8F6E\u878D\u8D44\uFF0Cuni-app\u9707\u64BC\u53D1\u5E03!",image_url:"https://web-assets.dcloud.net.cn/unidoc/zh/shuijiao-small.jpg",source:"DCloud",comment_count:11395},data2:{datetime:"\u4E00\u5929\u524D",article_type:2,title:"\u4E2D\u56FD\u6280\u672F\u754C\u5C0F\u5947\u8FF9\uFF1AHBuilder\u5F00\u53D1\u8005\u7A81\u7834200\u4E07",image_url:"https://web-assets.dcloud.net.cn/unidoc/zh/muwu-samll.jpg",source:"DCloud",comment_count:11395},data3:{article_type:3,image_list:[{url:"https://web-assets.dcloud.net.cn/unidoc/zh/cbd%20-small.jpg",width:563,height:316},{url:"https://web-ext-storage.dcloud.net.cn/hello-uni-app/template-tabbar-2.jpg",width:641,height:360},{url:"https://web-assets.dcloud.net.cn/unidoc/zh/shuijiao-small.jpg",width:640,height:360}],datetime:"5\u5206\u949F\u524D",title:"uni-app \u652F\u6301\u4F7F\u7528 npm \u5B89\u88C5\u7B2C\u4E09\u65B9\u5305\uFF0C\u751F\u6001\u66F4\u8D8B\u4E30\u5BCC",source:"DCloud",comment_count:11},data4:{datetime:"2\u5C0F\u65F6\u524D",article_type:4,title:"uni-app \u652F\u6301\u539F\u751F\u5C0F\u7A0B\u5E8F\u81EA\u5B9A\u4E49\u7EC4\u4EF6\uFF0C\u66F4\u5F00\u653E\u3001\u66F4\u81EA\u7531",image_url:"https://web-ext-storage.dcloud.net.cn/hello-uni-app/template-tabbar-1.jpg",source:"DCloud",comment_count:69}},H={components:{mediaItem:F},data(){return{newsList:[],cacheTab:[],tabIndex:0,tabBars:[{name:"\u5173\u6CE8",id:"guanzhu"},{name:"\u63A8\u8350",id:"tuijian"},{name:"\u4F53\u80B2",id:"tiyu"},{name:"\u70ED\u70B9",id:"redian"},{name:"\u8D22\u7ECF",id:"caijing"},{name:"\u5A31\u4E50",id:"yule"},{name:"\u519B\u4E8B",id:"junshi"},{name:"\u5386\u53F2",id:"lishi"},{name:"\u672C\u5730",id:"bendi"}],scrollInto:"",showTips:!1,navigateFlag:!1,pulling:!1,refreshIcon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAB5QTFRFcHBw3Nzct7e39vb2ycnJioqK7e3tpqam29vb////D8oK7wAAAAp0Uk5T////////////ALLMLM8AAABxSURBVHja7JVBDoAgDASrjqj//7CJBi90iyYeOHTPMwmFZrHjYyyFYYUy1bwUZqtJIYVxhf1a6u0R7iUvWsCcrEtwJHp8MwMdvh2amHduiZD3rpWId9+BgPd7Cc2LIkPyqvlQvKxKBJ//Qwq/CacAAwDUv0a0YuKhzgAAAABJRU5ErkJggg=="}},onLoad(){setTimeout(()=>{this.tabBars.forEach(t=>{this.newsList.push({data:[],isLoading:!1,refreshText:"",loadingText:"\u52A0\u8F7D\u66F4\u591A..."})}),this.getList(0)},350)},methods:{getList(t){let i=this.newsList[t],r=[];for(let s=1;s<=10;s++){let a=Object.assign({},z["data"+Math.floor(Math.random()*5)]);a.id=this.newGuid(),r.push(a)}i.data=i.data.concat(r)},goDetail(t){this.navigateFlag||(this.navigateFlag=!0,uni.navigateTo({url:"./detail/detail?title="+t.title}),setTimeout(()=>{this.navigateFlag=!1},200))},close(t,i){uni.showModal({content:"\u662F\u5426\u5220\u9664\u672C\u6761\u4FE1\u606F\uFF1F",success:r=>{r.confirm&&this.newsList[t].data.splice(i,1)}})},loadMore(t){setTimeout(()=>{this.getList(this.tabIndex)},500)},ontabtap(t){let i=t.target.dataset.current||t.currentTarget.dataset.current;this.switchTab(i)},ontabchange(t){let i=t.target.current||t.detail.current;this.switchTab(i)},switchTab(t){if(this.newsList[t].data.length===0&&this.getList(t),this.tabIndex!==t&&(this.newsList[this.tabIndex].data.length>R&&this.cacheTab.indexOf(this.tabIndex)<0&&this.cacheTab.push(this.tabIndex),this.tabIndex=t,this.scrollInto=this.tabBars[t].id,this.cacheTab.length>M)){let i=this.cacheTab[0];this.clearTabData(i),this.cacheTab.splice(0,1)}},clearTabData(t){this.newsList[t].data.length=0,this.newsList[t].loadingText="\u52A0\u8F7D\u66F4\u591A..."},refreshData(){},onrefresh(t){var i=this.newsList[this.tabIndex];i.refreshFlag&&(i.refreshing=!0,i.refreshText="\u6B63\u5728\u5237\u65B0...",setTimeout(()=>{this.refreshData(),this.pulling=!0,i.refreshing=!1,i.refreshFlag=!1,i.refreshText="\u5DF2\u5237\u65B0",setTimeout(()=>{this.pulling=!1},500)},2e3))},onpullingdown(t){var i=this.newsList[this.tabIndex];i.refreshing||this.pulling||(Math.abs(t.pullingDistance)>Math.abs(t.viewHeight)?(i.refreshFlag=!0,i.refreshText="\u91CA\u653E\u7ACB\u5373\u5237\u65B0"):(i.refreshFlag=!1,i.refreshText="\u4E0B\u62C9\u53EF\u4EE5\u5237\u65B0"))},newGuid(){let t=function(){return(65536*(1+Math.random())|0).toString(16).substring(1)};return(t()+t()+"-"+t()+"-4"+t().substr(0,3)+"-"+t()+"-"+t()+t()+t()).toUpperCase()}}};function V(t,i,r,s,a,o){let c=(0,e.resolveComponent)("media-item"),u=(0,e.resolveComponent)("swiper-item"),w=(0,e.resolveComponent)("swiper");return(0,e.openBlock)(),(0,e.createElementBlock)("scroll-view",{scrollY:!0,showScrollbar:!0,enableBackToTop:!0,bubble:"true",style:{flexDirection:"column"}},[(0,e.createElementVNode)("view",{class:"tabs"},[(0,e.createElementVNode)("scroll-view",{id:"tab-bar",class:"scroll-h",scrollX:!0,showScrollbar:!1,scrollIntoView:a.scrollInto},[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(a.tabBars,(n,d)=>((0,e.openBlock)(),(0,e.createElementBlock)("view",{key:n.id,class:"uni-tab-item",id:n.id,"data-current":d,onClick:i[0]||(i[0]=(...l)=>o.ontabtap&&o.ontabtap(...l))},[(0,e.createElementVNode)("u-text",{class:(0,e.normalizeClass)(["uni-tab-item-title",a.tabIndex==d?"uni-tab-item-title-active":""])},(0,e.toDisplayString)(n.name),3)],8,["id","data-current"]))),128))],8,["scrollIntoView"]),(0,e.createElementVNode)("view",{class:"line-h"}),(0,e.createVNode)(w,{current:a.tabIndex,class:"swiper-box",style:{flex:"1"},duration:300,onChange:o.ontabchange},{default:(0,e.withCtx)(()=>[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(a.newsList,(n,d)=>((0,e.openBlock)(),(0,e.createBlock)(u,{class:"swiper-item",key:d},{default:(0,e.withCtx)(()=>[(0,e.createElementVNode)("list",{class:"scroll-v list",enableBackToTop:"true",scrollY:"",loadmoreoffset:"15",onLoadmore:l=>o.loadMore(d)},[(0,e.createElementVNode)("refresh",{class:"refresh",onRefresh:l=>o.onrefresh(d),onPullingdown:i[1]||(i[1]=(...l)=>o.onpullingdown&&o.onpullingdown(...l)),display:n.refreshing?"show":"hide"},[(0,e.createElementVNode)("div",{class:"refresh-view"},[(0,e.createElementVNode)("u-image",{class:(0,e.normalizeClass)(["refresh-icon",{"refresh-icon-active":n.refreshFlag}]),src:a.refreshIcon,style:(0,e.normalizeStyle)({width:n.refreshing||a.pulling?0:"30px"})},null,14,["src"]),n.refreshing?((0,e.openBlock)(),(0,e.createElementBlock)("loading-indicator",{key:0,class:"loading-icon",animating:"true"})):(0,e.createCommentVNode)("",!0),(0,e.createElementVNode)("u-text",{class:"loading-text"},(0,e.toDisplayString)(n.refreshText),1)])],40,["onRefresh","display"]),((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(n.data,(l,b)=>((0,e.openBlock)(),(0,e.createElementBlock)("cell",{key:l.id},[(0,e.createVNode)(c,{options:l,onClose:_=>o.close(d,b),onClick:_=>o.goDetail(l)},null,8,["options","onClose","onClick"])]))),128)),n.isLoading||n.data.length>4?((0,e.openBlock)(),(0,e.createElementBlock)("cell",{key:0,class:"loading-more"},[(0,e.createElementVNode)("u-text",{class:"loading-more-text"},(0,e.toDisplayString)(n.loadingText),1)])):(0,e.createCommentVNode)("",!0)],40,["onLoadmore"])]),_:2},1024))),128))]),_:1},8,["current","onChange"])])])}var h=g(H,[["render",V],["styles",[S]]]);var p=plus.webview.currentWebview();if(p){let t=parseInt(p.id),i="pages/template/tabbar/tabbar",r={};try{r=JSON.parse(p.__query__)}catch(a){}h.mpType="page";let s=Vue.createPageApp(h,{$store:getApp({allowDefault:!0}).$store,__pageId:t,__pagePath:i,__pageQuery:r});s.provide("__globalStyles",Vue.useCssStyles([...__uniConfig.styles,...h.styles||[]])),s.mount("#root")}})();
