pages-mine-Feedback.b2b3b6ed.js 7.1 KB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-mine-Feedback"],{"074c":function(t,e,a){"use strict";a.r(e);var n=a("ff38"),o=a.n(n);for(var i in n)"default"!==i&&function(t){a.d(e,t,(function(){return n[t]}))}(i);e["default"]=o.a},"0f0a":function(t,e,a){"use strict";a.d(e,"b",(function(){return o})),a.d(e,"c",(function(){return i})),a.d(e,"a",(function(){return n}));var n={"u-Textarea":a("5183").default},o=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("v-uni-view",{},[a("v-uni-view",{staticClass:"mainBox"},[a("v-uni-view",{staticClass:"title"},[t._v("建议&意见")]),a("u--textarea",{attrs:{autoHeight:!0,maxlength:"300",border:"none",placeholder:"请输入内容"},model:{value:t.content,callback:function(e){t.content=e},expression:"content"}}),a("v-uni-view",{staticClass:"title",staticStyle:{"margin-top":"24rpx"}},[t._v("上传图片(选填)")]),a("v-uni-view",{staticClass:"botImage"},[t._l(t.imgList,(function(e,n){return a("v-uni-view",{key:n,staticClass:"box"},[a("v-uni-image",{staticClass:"close",attrs:{src:"/static/closeImage.png",mode:""},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.delImage(n)}}}),a("v-uni-image",{staticClass:"image",attrs:{src:e.fullurl,mode:""}})],1)})),t.imgList.length<9?a("v-uni-view",{staticClass:"box",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.upload.apply(void 0,arguments)}}},[a("v-uni-image",{attrs:{src:"/static/addPhoto.png",mode:""}})],1):t._e()],2)],1),a("v-uni-view",{staticClass:"botBtn flexC"},[a("v-uni-view",{staticClass:"flexC",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.submit.apply(void 0,arguments)}}},[t._v("提交")])],1)],1)},i=[]},"14ba":function(t,e,a){"use strict";a("d3b7"),Object.defineProperty(e,"__esModule",{value:!0}),e.request=e.baseURL=void 0;var n="http://yuanjie.n.broing.cn/api/";e.baseURL=n;var o=function(t){return new Promise((function(e,a){uni.request({url:n+t.url,method:t.method||"GET",data:t.data||{},header:{"Content-Type":"application/x-www-form-urlencoded",token:uni.getStorageSync("token")||""},success:function(t){console.log(t,uni.getStorageSync("token")),1==t.data.code?e(t.data.data):(401==t.data.code&&(uni.navigateTo({url:"/login/login"}),uni.clearStorageSync()),a(t.data.msg))},fail:function(t){console.log(t),a(t)}})}))};e.request=o},"19de":function(t,e,a){"use strict";var n=a("5d125"),o=a.n(n);o.a},"5d125":function(t,e,a){var n=a("9b94");"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var o=a("4f06").default;o("d2c3a5ca",n,!0,{sourceMap:!1,shadowMode:!1})},"9b94":function(t,e,a){var n=a("24fb");e=n(!1),e.push([t.i,"uni-page-body[data-v-c2269ada]{background:#f6f6f6}.mainBox[data-v-c2269ada]{padding:%?54?% %?30?%}.mainBox .title[data-v-c2269ada]{margin-bottom:%?24?%;color:rgba(0,0,0,.9);font-size:%?36?%;font-weight:700}.u-textarea[data-v-c2269ada]{min-height:%?292?%}.botImage[data-v-c2269ada]{display:flex;flex-wrap:wrap}.botImage .box[data-v-c2269ada]{position:relative;margin-right:%?30?%;margin-bottom:%?20?%}.botImage .box[data-v-c2269ada]:nth-child(3n){margin-right:0}.botImage uni-image[data-v-c2269ada]{width:%?200?%;height:%?200?%}.botImage .close[data-v-c2269ada]{width:%?36?%;height:%?36?%;position:absolute;right:0;top:0}.botBtn[data-v-c2269ada]{position:fixed;left:0;bottom:0;width:%?750?%;height:%?128?%;opacity:1;background:#fff}.botBtn uni-view[data-v-c2269ada]{width:%?686?%;height:%?96?%;color:rgba(0,0,0,.9);font-size:%?32?%;font-weight:500;border-radius:%?28?%;opacity:1;background:linear-gradient(134.8deg,#ffe864,#ffd800)}[data-v-c2269ada] .uni-textarea-wrapper{height:100%!important}body.?%PAGE?%[data-v-c2269ada]{background:#f6f6f6}",""]),t.exports=e},a7cc:function(t,e,a){"use strict";a.r(e);var n=a("0f0a"),o=a("074c");for(var i in o)"default"!==i&&function(t){a.d(e,t,(function(){return o[t]}))}(i);a("19de");var r,c=a("f0c5"),u=Object(c["a"])(o["default"],n["b"],n["c"],!1,null,"c2269ada",null,!1,n["a"],r);e["default"]=u.exports},a8b1:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.doFeedback=e.problemDetail=e.problemList=e.problemSort=e.getContactQrcode=e.logotLogin=e.getUserInfo=void 0;var n=a("14ba"),o=function(){return(0,n.request)({url:"user/index",method:"post",data:{}})};e.getUserInfo=o;var i=function(){return(0,n.request)({url:"user/logout",method:"post",data:{}})};e.logotLogin=i;var r=function(t){return(0,n.request)({url:"common/contact",method:"post",data:{type:t}})};e.getContactQrcode=r;var c=function(){return(0,n.request)({url:"common/problem_sort",method:"post",data:{}})};e.problemSort=c;var u=function(t,e,a){return(0,n.request)({url:"common/problem_list",method:"post",data:{sort_id:t,page:e,pagenum:a}})};e.problemList=u;var s=function(t){return(0,n.request)({url:"common/problem_detail",method:"post",data:{problem_id:t}})};e.problemDetail=s;var d=function(t,e){return(0,n.request)({url:"user/feedback",method:"post",data:{content:t,image:e}})};e.doFeedback=d},d115:function(t,e,a){"use strict";var n=a("4ea4");a("d3b7"),Object.defineProperty(e,"__esModule",{value:!0}),e.uploadFile=void 0;var o=n(a("5530")),i=a("14ba"),r=a("bbe3"),c=function(t,e){return new Promise((function(a,n){r.toa.loading("上传中.."),uni.uploadFile({url:i.baseURL+"/common/upload",filePath:t,name:"file",formData:(0,o.default)((0,o.default)({},e),{},{token:uni.getStorageSync("token")||""}),success:function(t){r.toa.hideLoading(),console.log(t),200==t.statusCode&&a(JSON.parse(t.data).data)},fail:function(t){r.toa.hideLoading(),(0,r.toast)(JSON.parse(t.data).msg),console.log(t,"上传报错"),n(t)}})}))};e.uploadFile=c},ff38:function(t,e,a){"use strict";var n=a("4ea4");a("d81d"),a("a434"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,a("96cf");var o,i=n(a("1da1")),r=a("a8b1"),c=a("bbe3"),u=a("d115"),s={data:function(){return{content:"",image:"",imgList:[]}},onLoad:function(){o=this},methods:{delImage:function(t){this.imgList.splice(t,1)},upload:function(){uni.chooseImage({count:9-o.imgList.length,sizeType:["original"],sourceType:["album"],success:function(){var t=(0,i.default)(regeneratorRuntime.mark((function t(e){var a,n,i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:console.log(JSON.stringify(e.tempFilePaths)),a=e.tempFilePaths,n=0;case 3:if(!(n<a.length)){t.next=12;break}return t.next=6,(0,u.uploadFile)(a[n]);case 6:i=t.sent,console.log(i),o.imgList.push(i);case 9:n++,t.next=3;break;case 12:case"end":return t.stop()}}),t)})));function e(e){return t.apply(this,arguments)}return e}()})},submit:function(){if(!this.content)return c.toa.toast("请输入意见或反馈内容");this.image=this.imgList.map((function(t){return t.url})),this.Feedback()},Feedback:function(){var t=this;return(0,i.default)(regeneratorRuntime.mark((function e(){var a;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(0,r.doFeedback)(t.content,t.image);case 3:a=e.sent,console.log("doFeedback",a),setTimeout((function(){c.toa.success("反馈成功")}),200),uni.navigateBack({}),e.next=13;break;case 9:e.prev=9,e.t0=e["catch"](0),uni.showToast({title:e.t0,icon:"none"}),console.log("doFeedback",e.t0);case 13:case"end":return e.stop()}}),e,null,[[0,9]])})))()}}};e.default=s}}]);