(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pagesDemand/demand/list"],{1418:function(t,e,n){"use strict";(function(t,e){var i=n("47a9");n("aa6c");i(n("3240"));var a=i(n("6f0c"));t.__webpack_require_UNI_MP_PLUGIN__=n,e(a.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])},"1dec":function(t,e,n){"use strict";var i=n("9330"),a=n.n(i);a.a},"6f0c":function(t,e,n){"use strict";n.r(e);var i=n("e7b6"),a=n("78a6");for(var o in a)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(o);n("1dec");var r=n("828b"),c=Object(r["a"])(a["default"],i["b"],i["c"],!1,null,null,null,!1,i["a"],void 0);e["default"]=c.exports},"78a6":function(t,e,n){"use strict";n.r(e);var i=n("bc3d"),a=n.n(i);for(var o in i)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(o);e["default"]=a.a},9330:function(t,e,n){},bc3d:function(t,e,n){"use strict";(function(t){var i=n("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n("af34")),o=i(n("7ca3")),r=n("8f59"),c=i(n("f5e9"));function s(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}var u={components:{demandItem:function(){Promise.all([n.e("common/vendor"),n.e("pages/component/demand/index")]).then(function(){return resolve(n("b36c"))}.bind(null,n)).catch(n.oe)}},data:function(){return{loadEnd:!1,titleBarHeight:0,selectScreen:0,page:1,limit:20,hasMore:!1,demandScreen:[{id:0,name:"全部"},{id:1,name:"审核中"},{id:2,name:"发布中"},{id:3,name:"已驳回"}],demandList:[]}},computed:function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?s(Object(n),!0).forEach((function(e){(0,o.default)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},(0,r.mapState)({themeColor:function(t){return t.app.themeColor},iconRelease:function(t){return c.default.svgToUrl("release",t.app.themeColor)}})),mounted:function(){var e=t.getSystemInfoSync().statusBarHeight,n=t.getMenuButtonBoundingClientRect();this.titleBarHeight=e+2*(n.top-e)+n.height},onLoad:function(){var e=this;t.showLoading({title:"加载中"}),this.getDemandList((function(){t.hideLoading(),e.loadEnd=!0}))},onShow:function(){this.loadEnd&&(t.pageScrollTo({scrollTop:0,duration:0}),this.page=1,this.getDemandList())},onPullDownRefresh:function(){this.page=1,this.getDemandList((function(){t.stopPullDownRefresh()}))},onReachBottom:function(){this.hasMore&&(this.page++,this.getDemandList())},methods:{getDemandList:function(e){var n=this;this.$util.request("demand.businessList",{state:this.selectScreen,page:this.page,limit:this.limit}).then((function(i){if(e&&e(),1==i.code){var o=i.data.data||[];o.forEach((function(t){t.images=n.splitImages(t.images)})),n.hasMore=n.page<i.data.total/n.limit,n.demandList=1==n.page?o:[].concat((0,a.default)(n.demandList),(0,a.default)(o))}else t.showToast({title:i.msg,icon:"none"})})).catch((function(t){e&&e(),console.error("获取供需列表",t)}))},splitImages:function(t){try{return t?t.split(","):[]}catch(e){return[]}},resetDemandList:function(){this.page=1,this.getDemandList()},toPublish:function(){this.$util.toPage({mode:1,path:"/pagesDemand/demand/edit"})},screenChange:function(t){this.selectScreen!=t&&(this.selectScreen=t,this.page=1,this.getDemandList())}}};e.default=u}).call(this,n("df3c")["default"])},e7b6:function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){}));var i=function(){var t=this.$createElement,e=(this._self._c,this.loadEnd?this.demandList.length:null);this.$mp.data=Object.assign({},{$root:{g0:e}})},a=[]}},[["1418","common/runtime","common/vendor"]]]);