You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
4.6 KiB
1 lines
4.6 KiB
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["package1/index/feedBack"],{6013:function(e,t,n){"use strict";n.r(t);var r=n("8f15"),o=n.n(r);for(var a in r)["default"].indexOf(a)<0&&function(e){n.d(t,e,(function(){return r[e]}))}(a);t["default"]=o.a},"82ca1":function(e,t,n){"use strict";(function(e,t){var r=n("47a9");n("82ca");r(n("3240"));var o=r(n("8d05"));e.__webpack_require_UNI_MP_PLUGIN__=n,t(o.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])},"8d05":function(e,t,n){"use strict";n.r(t);var r=n("b9ec"),o=n("6013");for(var a in o)["default"].indexOf(a)<0&&function(e){n.d(t,e,(function(){return o[e]}))}(a);n("f421");var i=n("828b"),u=Object(i["a"])(o["default"],r["b"],r["c"],!1,null,"716c29ca",null,!1,r["a"],void 0);t["default"]=u.exports},"8f15":function(e,t,n){"use strict";(function(e){var r=n("47a9");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n("7eb4")),a=r(n("7ca3")),i=r(n("ee10"));function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){(0,a.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var s={data:function(){return{fileList1:[],formData:{productPicture:"",productIntro:""},categoryList:[],productId:"",arrtList:[],arrtChange:[],dataList:[],shopName:"",rules:{productIntro:{rules:[{required:!0,errorMessage:"请简要描述问题"}]}}}},onLoad:function(t){this.shopName=e.getStorageSync("shopName")},methods:{backPage:function(){e.navigateBack()},deletePic:function(e){this["fileList".concat(e.name)].splice(e.index,1)},afterRead:function(e){var t=this;return(0,i.default)(o.default.mark((function n(){var r,a,i,u,s;return o.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:r=[].concat(e.file),void 0==t.formData.productPicture&&(t.formData.productPicture=[]),a=t["fileList".concat(e.name)].length,r.map((function(n){t["fileList".concat(e.name)].push(c(c({},n),{},{status:"uploading",message:"上传中"}))})),i=0;case 5:if(!(i<r.length)){n.next=15;break}return n.next=8,t.uploadFilePromise(r[i].url);case 8:u=n.sent,s=t["fileList".concat(e.name)][a],t["fileList".concat(e.name)].splice(a,1,Object.assign(s,{status:"success",message:"",url:u})),a++;case 12:i++,n.next=5;break;case 15:case"end":return n.stop()}}),n)})))()},uploadFilePromise:function(t){var n=this,r=this;return new Promise((function(o,a){e.uploadFile({url:r.tui.interfaceUrl()+"/upload/file",filePath:t,name:"file",header:{"content-type":"multipart/form-data",accessToken:n.tui.getToken()},formData:{},success:function(e){var t=JSON.parse(e.data);n.formData.productPicture=t.result}})}))},makeCall:function(t){e.makePhoneCall({phoneNumber:t+""})},submit:function(){var t=this,n=this;this.$refs.form.validate().then((function(r){n.tui.request("/app/problemFeedback/saveOrUpdateProblemFeedback","post",{problemPicture:n.formData.productPicture,problemContent:n.formData.productIntro,shopName:t.shopName},!1,!1).then((function(n){200==n.code?(t.tui.toast("反馈成功!"),setTimeout((function(t){e.navigateBack({delta:2})}),1e3)):e.showToast({title:"添加失败",icon:"none"})}))})).catch((function(e){}))}}};t.default=s}).call(this,n("df3c")["default"])},b9ec:function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return a})),n.d(t,"a",(function(){return r}));var r={uniIcons:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uni-icons/components/uni-icons/uni-icons")]).then(n.bind(null,"d3ec"))},uniForms:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uni-forms/components/uni-forms/uni-forms")]).then(n.bind(null,"9657"))},uniFormsItem:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uni-forms/components/uni-forms-item/uni-forms-item")]).then(n.bind(null,"ac84"))},uUpload:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uview-ui/components/u-upload/u-upload")]).then(n.bind(null,"1a9a"))},uniEasyinput:function(){return n.e("uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput").then(n.bind(null,"bc9c"))}},o=function(){var e=this.$createElement;this._self._c},a=[]},c324:function(e,t,n){},f421:function(e,t,n){"use strict";var r=n("c324"),o=n.n(r);o.a}},[["82ca1","common/runtime","common/vendor"]]]);
|