(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pagesTools/suggest/index"],{"26bd":function(t,e,n){"use strict";(function(t,e){var o=n("47a9");n("aa6c");o(n("3240"));var i=o(n("ba36"));t.__webpack_require_UNI_MP_PLUGIN__=n,e(i.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])},"324f":function(t,e,n){"use strict";(function(t){var o=n("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=o(n("7ca3")),a=n("8f59");function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}var c={data:function(){return{formData:{title:"",content:"",image:"",is_anonymity:""},selectImage:"",isShowTips:!1}},computed:function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(Object(n),!0).forEach((function(e){(0,i.default)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},(0,a.mapState)({themeColor:function(t){return t.app.themeColor}})),methods:{chooseImage:function(){var e=this;t.chooseMedia({count:1,mediaType:["image"],sourceType:["album","camera"],sizeType:["compressed"],success:function(t){e.selectImage=t.tempFiles[0].tempFilePath}})},deleteImage:function(){this.selectImage=""},previewImage:function(){t.previewImage({urls:this.selectImage,current:0})},changeAnonymity:function(){1==this.formData.is_anonymity?this.formData.is_anonymity=2:this.formData.is_anonymity=1},handleSubmit:function(){var e=this;this.formData.title?this.formData.content?this.selectImage?(t.showLoading({title:"提交中",mask:!0}),this.$util.uploadFile(this.selectImage).then((function(n){1==n.code?(e.formData.image=n.data.fullurl,e.submitEvent()):(t.hideLoading(),t.showToast({title:(null===n||void 0===n?void 0:n.msg)||"上传失败",icon:"none",duration:2e3}))})).catch((function(e){t.hideLoading(),console.error("上传图片 ",e)}))):(t.showLoading({title:"提交中",mask:!0}),this.submitEvent()):t.showToast({title:"请输入需求建议内容",icon:"none",duration:2e3}):t.showToast({title:"请输入需求建议标题",icon:"none",duration:2e3})},submitEvent:function(){this.$util.request("main.addDemand",this.formData).then((function(e){t.hideLoading(),1==e.code?t.redirectTo({url:"/pagesTools/suggest/success"}):t.showToast({title:e.msg,icon:"none",duration:2e3})})).catch((function(e){t.hideLoading(),console.error("提交反馈",e)}))}}};e.default=c}).call(this,n("df3c")["default"])},"59b5":function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){}));var o=function(){var t=this,e=t.$createElement;t._self._c;t._isMounted||(t.e0=function(e){t.isShowTips=!t.isShowTips})},i=[]},ba36:function(t,e,n){"use strict";n.r(e);var o=n("59b5"),i=n("eada");for(var a in i)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(a);n("bd7b");var r=n("828b"),c=Object(r["a"])(i["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],void 0);e["default"]=c.exports},bd7b:function(t,e,n){"use strict";var o=n("e720"),i=n.n(o);i.a},e720:function(t,e,n){},eada:function(t,e,n){"use strict";n.r(e);var o=n("324f"),i=n.n(o);for(var a in o)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return o[t]}))}(a);e["default"]=i.a}},[["26bd","common/runtime","common/vendor"]]]);