(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/my/feedBack/index"],{"28b2":function(e,t,n){"use strict";(function(e){var a=n("4ea4");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var c=a(n("2eee")),r=a(n("c973")),u=a(n("91cb")),i=n("9ca2"),o={components:{},data:function(){return{picUrl:this.$picUrl,content:"",phone:"",pic_url:[]}},onLoad:function(e){},methods:{post:function(){var t=this;return(0,r.default)(c.default.mark((function n(){var a,r,u;return c.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(a=/^[1][3,4,5,7,8,9][0-9]{9}$/,""!=t.content){n.next=3;break}return n.abrupt("return",t.$toast("请输入反馈内容"));case 3:if(""!=t.phone){n.next=5;break}return n.abrupt("return",t.$toast("请输入联系方式"));case 5:if(a.test(t.phone)){n.next=7;break}return n.abrupt("return",t.$toast("请输入合法的手机号"));case 7:return r="",t.pic_url.forEach((function(e,n){n==t.pic_url.length-1?r+=e:r+=e+","})),n.next=11,(0,i.submitFeedbackReq)({phone:t.phone,content:t.content,image:r});case 11:u=n.sent,0==u.code?(console.log("反馈返回值",u),t.$toast("提交成功"),setTimeout((function(){e.navigateBack()}),1500)):e.showToast({title:u.message,icon:"none"});case 13:case"end":return n.stop()}}),n)})))()},delectImg:function(e){this.pic_url.splice(e,1)},previewImg:function(){e.previewImage({current:this.current,urls:this.formData.pic_url,loop:!0,indicator:"default"})},addquesPic:function(){var t=this,n=[];e.chooseImage({count:9-t.pic_url.length,sizeType:["original","compressed"],sourceType:["album"],success:function(a){t.pic_url.length>=9?t.$toast("只能选择9张照片"):a.tempFilePaths.length>0&&(n=a.tempFilePaths,n.forEach((function(a,c){e.uploadFile({url:u.default.baseUrl+"/api/upload",filePath:n[c],name:"file",formData:{tag:"lamp"},success:function(e){var n=JSON.parse(e.data);0==n.code&&(t.pic_url=t.pic_url.concat(n.data.file),console.log("上传后的头像url地址",n.data.file))}})})))}})}}};t.default=o}).call(this,n("543d")["default"])},"2cdc":function(e,t,n){"use strict";n.r(t);var a=n("991b"),c=n("abff");for(var r in c)["default"].indexOf(r)<0&&function(e){n.d(t,e,(function(){return c[e]}))}(r);n("5a22");var u=n("f0c5"),i=Object(u["a"])(c["default"],a["b"],a["c"],!1,null,"ab9c6882",null,!1,a["a"],void 0);t["default"]=i.exports},"5a22":function(e,t,n){"use strict";var a=n("66ea"),c=n.n(a);c.a},"66ea":function(e,t,n){},"991b":function(e,t,n){"use strict";n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return r})),n.d(t,"a",(function(){return a}));var a={"u-Textarea":function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uview-ui/components/u--textarea/u--textarea")]).then(n.bind(null,"c71e"))}},c=function(){var e=this.$createElement,t=(this._self._c,this.pic_url.length),n=this.pic_url.length;this.$mp.data=Object.assign({},{$root:{g0:t,g1:n}})},r=[]},abff:function(e,t,n){"use strict";n.r(t);var a=n("28b2"),c=n.n(a);for(var r in a)["default"].indexOf(r)<0&&function(e){n.d(t,e,(function(){return a[e]}))}(r);t["default"]=c.a},d174:function(e,t,n){"use strict";(function(e,t){var a=n("4ea4");n("d716");a(n("66fd"));var c=a(n("2cdc"));e.__webpack_require_UNI_MP_PLUGIN__=n,t(c.default)}).call(this,n("bc2e")["default"],n("543d")["createPage"])}},[["d174","common/runtime","common/vendor"]]]);