(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/demand/search/result"],{"2ee1":function(e,t,n){"use strict";n.r(t);var a=n("4229"),r=n.n(a);for(var i in a)["default"].indexOf(i)<0&&function(e){n.d(t,e,(function(){return a[e]}))}(i);t["default"]=r.a},4229:function(e,t,n){"use strict";(function(e){var a=n("47a9");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n("af34")),i=a(n("7ca3")),o=n("8f59");function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}var c={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,keywords:"",page:1,limit:20,hasMore:!1,demandList:[],shareData:{},showLogin:!1}},computed:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){(0,i.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},(0,o.mapState)({themeColor:function(e){return e.app.themeColor},shareImage:function(e){return e.app.shareImage},shareTitle:function(e){return e.app.shareTitle},loginImg:function(e){return e.app.loginImg}})),onLoad:function(t){var n=this;e.showLoading({title:"加载中"}),this.keywords=decodeURIComponent(t.keyword),this.getDemandList((function(){e.hideLoading(),n.loadEnd=!0}))},onReachBottom:function(){this.hasMore&&(this.page++,this.getDemandList())},onShareAppMessage:function(e){return"button"==e.from?{title:this.shareData.title,path:this.shareData.path,imageUrl:this.shareData.imageUrl||this.shareImage}:"menu"==e.from?{title:this.shareTitle,imageUrl:this.shareImage,path:"/pages/demand/index"}:void 0},onShareTimeline:function(){return{title:this.shareTitle,imageUrl:this.shareImage,path:"/pages/demand/index"}},methods:{getDemandList:function(t){var n=this;this.$util.request("demand.businessIndexList",{title:this.keywords,page:this.page,limit:this.limit}).then((function(a){if(t&&t(),1==a.code){var i=a.data.data||[];i.forEach((function(e){e.images=n.splitImages(e.images),e.createtime&&(e.time=n.$util.getDateBeforeNow(e.createtime))})),n.hasMore=n.page<a.data.total/n.limit,n.demandList=1==n.page?i:[].concat((0,r.default)(n.demandList),(0,r.default)(i))}else e.showToast({title:a.msg,icon:"none"})})).catch((function(e){401==e?n.showLogin=!0:(t&&t(),console.error("获取供需列表",e))}))},splitImages:function(e){try{return e?e.split(","):[]}catch(t){return[]}},toLogin:function(){e.redirectTo({url:"/pages/demand/search/result?keyword=".concat(encodeURIComponent(this.keywords))})},setShareData:function(e){this.shareData=e}}};t.default=c}).call(this,n("df3c")["default"])},"5c4f3":function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return r})),n.d(t,"a",(function(){}));var a=function(){var e=this.$createElement,t=(this._self._c,this.loadEnd?this.demandList.length:null);this.$mp.data=Object.assign({},{$root:{g0:t}})},r=[]},"902e":function(e,t,n){"use strict";var a=n("fb2e"),r=n.n(a);r.a},b228:function(e,t,n){"use strict";n.r(t);var a=n("5c4f3"),r=n("2ee1");for(var i in r)["default"].indexOf(i)<0&&function(e){n.d(t,e,(function(){return r[e]}))}(i);n("902e");var o=n("828b"),s=Object(o["a"])(r["default"],a["b"],a["c"],!1,null,null,null,!1,a["a"],void 0);t["default"]=s.exports},e2b7:function(e,t,n){"use strict";(function(e,t){var a=n("47a9");n("aa6c");a(n("3240"));var r=a(n("b228"));e.__webpack_require_UNI_MP_PLUGIN__=n,t(r.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])},fb2e:function(e,t,n){}},[["e2b7","common/runtime","common/vendor"]]]);