(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/publicity/publicity"],{1473:function(e,t,i){"use strict";var n;i.d(t,"b",(function(){return a})),i.d(t,"c",(function(){return s})),i.d(t,"a",(function(){return n}));var a=function(){var e=this,t=e.$createElement;e._self._c},s=[]},2906:function(e,t,i){"use strict";(function(e){i("40da");n(i("66fd"));var t=n(i("6fcd"));function n(e){return e&&e.__esModule?e:{default:e}}e(t.default)}).call(this,i("543d")["createPage"])},"2ea9":function(e,t,i){},"4f13":function(e,t,i){"use strict";i.r(t);var n=i("5121"),a=i.n(n);for(var s in n)"default"!==s&&function(e){i.d(t,e,(function(){return n[e]}))}(s);t["default"]=a.a},5121:function(e,t,i){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i("2f62");function a(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function s(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?a(Object(i),!0).forEach((function(t){o(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):a(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function o(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var r={data:function(){for(var t=new Date,i=t.getFullYear(),n=t.getMonth()+1,a=(t.getDate(),[]),s=[],o=2015,r=1;r<=12;r++)s.push(r+"月");for(var u=o;u<=i;u++)a.push(u+"年");var c=this.$util.cutDate(new Date,"YYYY年MM月");return{showPicker:!1,pageMsg:{pageIndex:1,pageSize:16,totalCount:0,showDate:c,selectDate:i+"-"+n,selectPart:0,isEnd:!1,isLoading:!0},visible:!0,dateCodes:[a,s],values:[a.length-1,n-1],indicatorStyle:"height: ".concat(Math.round(e.getSystemInfoSync().screenWidth/7.5),"px;"),publicity:[],screenPartCodes:[]}},computed:s({},(0,n.mapGetters)({user:"getUser",isReloading:"shouldReLoadingList"})),methods:s(s({},(0,n.mapMutations)(["shouldReLoadingList"])),{},{bindDateChange:function(){var e=this.values;this.pageMsg.showDate=this.dateCodes[0][e[0]]+this.dateCodes[1][e[1]],this.pageMsg.selectDate=this.dateCodes[0][e[0]].replace("年","")+"-"+this.dateCodes[1][e[1]].replace("月",""),this.pageMsg.pageIndex=1,this.loadingType=1,this.getpublicity()},bindDateColumnChange:function(e){this.values[e.detail.column]=e.detail.value},bindPartChange:function(e){this.pageMsg.selectPart=e.detail.value,this.pageMsg.pageIndex=1,this.loadingType=1,this.getpublicity()},pickerCancel:function(){this.showPicker=!1},tapPublicity:function(e){var t=this;t.$request.$post("updatePublicityThumbs",{publicityId:e.PUBLICITY_ID}).then((function(t){1==e.THUMBUP_STATE?(e.THUMBUP_STATE=0,e.THUMBUP_COUNT-=1):(e.THUMBUP_STATE=1,e.THUMBUP_COUNT+=1)}))},getServerList:function(){var e=this;e.$request.$get("GetPendingItemsBySP",{moduleguid:"c870b1bc-95c8-473d-81c8-8596eb793bd4"}).then((function(t){e.screenPartCodes=t.Data.List,e.screenPartCodes.unshift({ServerPart_Name:"全部服务区",ServerPartID:""})}))},getpublicity:function(){var t=this;t.$request.$get("getPublicityList",{serverpartId:0==t.pageMsg.selectPart?"":t.screenPartCodes[t.pageMsg.selectPart].ServerPartID,startDate:this.pageMsg.selectDate,pageIndex:this.pageMsg.pageIndex,pageSize:this.pageMsg.pageSize}).then((function(i){if(e.hideLoading(),100==i.ResultCode&&i.Data.List instanceof Array){var n=i.Data;t.pageMsg.totalCount=n.TotalCount,t.publicity=1==t.pageMsg.pageIndex?n.List:t.publicity.concat(n.List),n.List.length<t.pageMsg.pageSize&&(t.pageMsg.isEnd=!0)}else t.publicity=[],t.pageMsg.isEnd=!0,t.pageMsg.isLoading=!1;t.$forceUpdate()}))},gopublicityDetail:function(e){this.$util.toNextRoute("navigateTo","/pages/publicity/publicityDetail?PUBLICITY_ID="+e.PUBLICITY_ID)},reloading:function(){var t=this;e.showLoading({title:"正在加载"}),t.publicity=[],t.publicitySum=[],t.getpublicity(),t.getServerList()},reachBottom:function(){var t=this;t.pageMsg.isEnd||(e.showLoading({title:"正在加载"}),t.pageMsg.pageIndex+=1,t.getpublicity())}}),onLoad:function(){this.reloading()},onReachBottom:function(){this.reachBottom()},onPullDownRefresh:function(){this.reloading(),setTimeout((function(){e.stopPullDownRefresh()}),1e3)},onShow:function(){this.isReloading&&(this.reloading(),this.shouldReLoadingList(!1))},onUnload:function(){this.$util.addUserBehavior()}};t.default=r}).call(this,i("543d")["default"])},"6fcd":function(e,t,i){"use strict";i.r(t);var n=i("1473"),a=i("4f13");for(var s in a)"default"!==s&&function(e){i.d(t,e,(function(){return a[e]}))}(s);i("d770");var o,r=i("f0c5"),u=Object(r["a"])(a["default"],n["b"],n["c"],!1,null,"400d3f66",null,!1,n["a"],o);t["default"]=u.exports},d770:function(e,t,i){"use strict";var n=i("2ea9"),a=i.n(n);a.a}},[["2906","common/runtime","common/vendor"]]]);