(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pagesDemand/demand/details"],{"0836":function(e,t,n){"use strict";(function(e){var i=n("47a9");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n("7ca3")),s=n("8f59"),o=i(n("f5e9"));function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}var d={data:function(){return{loadEnd:!1,titleBarHeight:0,demandId:0,demandDetails:{},showLogin:!1}},computed:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){(0,a.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},(0,s.mapState)({themeColor:function(e){return e.app.themeColor},iconSecurity:function(e){return o.default.svgToUrl("security",e.app.themeColor)},iconAddress:function(e){return o.default.svgToUrl("address",e.app.themeColor)},iconShare:function(e){return o.default.svgToUrl("share",e.app.themeColor)},loginImg:function(e){return e.app.loginImg}})),mounted:function(){var t=e.getSystemInfoSync().statusBarHeight,n=e.getMenuButtonBoundingClientRect();this.titleBarHeight=t+2*(n.top-t)+n.height},onLoad:function(t){var n=this;this.demandId=t.id,e.showLoading({title:"加载中"}),this.getDemandDetails((function(){e.hideLoading(),n.loadEnd=!0}))},onShow:function(){this.loadEnd&&this.getDemandDetails()},onShareAppMessage:function(){return{title:this.demandDetails.business.title,imageUrl:this.demandDetails.business.images.length?this.demandDetails.business.images[0]:this.demandDetails.member.avatar}},onShareTimeline:function(){return{title:this.demandDetails.business.title,imageUrl:this.demandDetails.business.images.length?this.demandDetails.business.images[0]:this.demandDetails.member.avatar}},methods:{getDemandDetails:function(t){var n=this;this.$util.request("demand.businessDetails",{id:this.demandId}).then((function(i){t&&t(),1==i.code?(n.demandDetails=i.data,n.demandDetails.business.images=n.splitImages(i.data.business.images),n.demandDetails.business.time=n.$util.getDateBeforeNow(n.demandDetails.business.createtime)):e.showToast({title:i.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[]}},toMemberDetails:function(){var e,t;null!==(e=this.demandDetails)&&void 0!==e&&null!==(t=e.member)&&void 0!==t&&t.id?this.$util.toPage({mode:1,path:"/pages/member/details?id="+this.demandDetails.member.id}):this.$util.toPage({mode:1,path:"/pages/index/association"})},onContact:function(){this.$util.toPage({mode:6,phone:this.demandDetails.member.mobile})},previewImage:function(t){e.previewImage({urls:this.demandDetails.business.images,current:t})},toLogin:function(){e.redirectTo({url:"/pagesDemand/demand/details?id=".concat(this.demandId)})}}};t.default=d}).call(this,n("df3c")["default"])},2654:function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return a})),n.d(t,"a",(function(){}));var i=function(){var e=this,t=e.$createElement,n=(e._self._c,e.loadEnd&&e.demandDetails.business?e.demandDetails.business.images.length:null),i=e.loadEnd&&e.demandDetails.business&&n?e.demandDetails.business.images.length<3||4===e.demandDetails.business.images.length:null;e.$mp.data=Object.assign({},{$root:{g0:n,g1:i}})},a=[]},"66e9":function(e,t,n){},"6faa":function(e,t,n){"use strict";var i=n("66e9"),a=n.n(i);a.a},"87d7":function(e,t,n){"use strict";n.r(t);var i=n("2654"),a=n("8c57");for(var s in a)["default"].indexOf(s)<0&&function(e){n.d(t,e,(function(){return a[e]}))}(s);n("6faa");var o=n("828b"),r=Object(o["a"])(a["default"],i["b"],i["c"],!1,null,null,null,!1,i["a"],void 0);t["default"]=r.exports},"8c57":function(e,t,n){"use strict";n.r(t);var i=n("0836"),a=n.n(i);for(var s in i)["default"].indexOf(s)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(s);t["default"]=a.a},ce99:function(e,t,n){"use strict";(function(e,t){var i=n("47a9");n("aa6c");i(n("3240"));var a=i(n("87d7"));e.__webpack_require_UNI_MP_PLUGIN__=n,t(a.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])}},[["ce99","common/runtime","common/vendor"]]]);