(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pagesub/info/edit"],{"0889":function(e,t,a){"use strict";(function(e,t){var i=a("47a9");a("90c2");i(a("3240"));var s=i(a("83cc"));e.__webpack_require_UNI_MP_PLUGIN__=a,t(s.default)}).call(this,a("3223")["default"],a("df3c")["createPage"])},"355e":function(e,t,a){"use strict";a.r(t);var i=a("dced"),s=a.n(i);for(var o in i)["default"].indexOf(o)<0&&function(e){a.d(t,e,(function(){return i[e]}))}(o);t["default"]=s.a},"475d":function(e,t,a){},7733:function(e,t,a){"use strict";a.d(t,"b",(function(){return i})),a.d(t,"c",(function(){return s})),a.d(t,"a",(function(){}));var i=function(){var e=this,t=e.$createElement;e._self._c;e._isMounted||(e.e0=function(t){var a=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){var t="_value"in e?e._value:e.value;return t}));e.$set(e.formData,"category_id",t.target.multiple?a:a[0])},e.e1=function(t){var a=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){var t="_value"in e?e._value:e.value;return t}));e.$set(e.formData,"message_area",t.target.multiple?a:a[0])})},s=[]},"83cc":function(e,t,a){"use strict";a.r(t);var i=a("7733"),s=a("355e");for(var o in s)["default"].indexOf(o)<0&&function(e){a.d(t,e,(function(){return s[e]}))}(o);a("fce9");var n=a("828b"),r=Object(n["a"])(s["default"],i["b"],i["c"],!1,null,"6467734e",null,!1,i["a"],void 0);t["default"]=r.exports},dced:function(e,t,a){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=a("8f59"),s=[],o={components:{mpvueCityPicker:function(){a.e("components/mpvue-citypicker/mpvueCityPicker").then(function(){return resolve(a("7da9"))}.bind(null,a)).catch(a.oe)}},data:function(){return{formData:{category_content:"",message_keywords:"",category_id:"",message_area:"",message_full_area:"",message_address:"",message_username:"",message_mobile:""},themeColor:"#007AFF",cityPickerValueDefault:[0,0,0],form:{},story_video:"",ImgList:[],Pindex:0,selectedProId:0,selectedCityId:0,selectedCountyId:0,selectedPro:"",selectedCity:"",selectedCounty:"",seladstr:"请选择所属地区",category:[],area:[],isShow:!1}},computed:(0,i.mapState)(["Config"]),onLoad:function(t){e.setNavigationBarTitle({title:this.__("发布信息")}),this.GetAddressList()},methods:{onUnload:function(){this.$refs.mpvueCityPicker.showPicker&&this.$refs.mpvueCityPicker.pickerCancel()},onBackPress:function(){if(this.$refs.mpvueCityPicker.showPicker)return this.$refs.mpvueCityPicker.pickerCancel(),!0},onConfirm:function(e){console.info(e),console.info(JSON.stringify(e)),this.pickerText=JSON.stringify(e),this.setData({Pindex:this.cityCode,selectedProId:e.value[0],selectedCityId:e.value[1],selectedCountyId:e.value[2],selectedPro:e.label[0],selectedCity:e.label[1],selectedCounty:e.label[2],seladstr:this.$.isNull(e.label.toString())?this.__("请选择地址"):e.label.toString()})},onCancel:function(e){console.log(e)},GetAddressList:function(){var t=this;t.setData({isdata:!1,category:[],area:[]}),t.$.request({url:t.Config.URL.user.serviceMessage,data:{},success:function(a,i,s,o){200==i&&(a.items.length>0?(t.addresslist=a.items,t.setData({isdata:!0,category:a.category,area:a.area})):t.setData({isdata:!1})),e.stopPullDownRefresh()}})},submitInfo:function(e){var t=this,a=this.formData;a.message_full_area=this.seladstr,a.photos_area=JSON.stringify(t.ImgList),a.user_birthday==t.__("请选择生日日期")&&(a.user_birthday=""),t.$.request({url:this.Config.URL.user.addServiceMessage,data:a,success:function(e,a,i,s){200==a?(t.$.showToast({title:t.__("更新成功!")}),setTimeout((function(){t.$.navigateBack(1)}),2e3)):t.$.confirm(i)}})},chooseVideoImage:function(){var t=this;e.showActionSheet({title:this.__("选择上传类型"),itemList:[this.__("图片")],success:function(e){console.log(e),0==e.tapIndex?t.chooseImages():t.chooseVideo()}})},UploadImg:function(){var e=this,t=9;e.$.isNull(e.ImgList)||(t=9-e.ImgList.length),0!=t?e.$.chooseImage({count:t,sizeType:["compressed"],sourceType:["album","camera"],success:function(t){for(var a=e.ImgList.length,i=t.tempFilePaths,o=0;os[r+1].order){var c=s[r];s[r]=s[r+1],s[r+1]=c}e.setData({ImgList:s})},fail:function(e){},complete:function(e){}})},fail:function(e){},complete:function(e){}}):e.$.alert(e.__("最多上传9张图片!"))},delImg:function(e){var t=this;t.$.confirm("是否放弃上传本张图片?",(function(a){if(a.confirm){var i=t.ImgList,o=[];for(var n in s=[],i)n!=e.target.dataset.index&&(o.push(i[n]),s.push(i[n]));t.setData({ImgList:o})}}),!0)},chooseImages:function(){this.UploadImg()},showbox:function(){this.$refs.mpvueCityPicker.show()}}};t.default=o}).call(this,a("df3c")["default"])},fce9:function(e,t,a){"use strict";var i=a("475d"),s=a.n(i);s.a}},[["0889","common/runtime","common/vendor"]]]);