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.5 KiB
1 lines
4.5 KiB
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["package1/index/feedBack"],{"1a2b":function(e,t,n){"use strict";var r=n("4804"),o=n.n(r);o.a},"26ca":function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return u})),n.d(t,"a",(function(){return r}));var r={uniForms:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uni-forms/components/uni-forms/uni-forms")]).then(n.bind(null,"ac36"))},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,"b258"))},uUpload:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uview-ui/components/u-upload/u-upload")]).then(n.bind(null,"adf0"))},uniEasyinput:function(){return n.e("uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput").then(n.bind(null,"5fa6"))},uButton:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uview-ui/components/u-button/u-button")]).then(n.bind(null,"e681"))}},o=function(){var e=this.$createElement;this._self._c},u=[]},4804:function(e,t,n){},"4b44":function(e,t,n){"use strict";n.r(t);var r=n("26ca"),o=n("71e9");for(var u in o)["default"].indexOf(u)<0&&function(e){n.d(t,e,(function(){return o[e]}))}(u);n("1a2b");var a=n("828b"),i=Object(a["a"])(o["default"],r["b"],r["c"],!1,null,"1c76a706",null,!1,r["a"],void 0);t["default"]=i.exports},"71e9":function(e,t,n){"use strict";n.r(t);var r=n("ec97"),o=n.n(r);for(var u in r)["default"].indexOf(u)<0&&function(e){n.d(t,e,(function(){return r[e]}))}(u);t["default"]=o.a},"9a867":function(e,t,n){"use strict";(function(e,t){var r=n("47a9");n("7859");r(n("3240"));var o=r(n("4b44"));e.__webpack_require_UNI_MP_PLUGIN__=n,t(o.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])},ec97: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")),u=r(n("7ca3")),a=r(n("ee10"));function i(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?i(Object(n),!0).forEach((function(t){(0,u.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(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:{deletePic:function(e){this["fileList".concat(e.name)].splice(e.index,1)},afterRead:function(e){var t=this;return(0,a.default)(o.default.mark((function n(){var r,u,a,i,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=[]),u=t["fileList".concat(e.name)].length,r.map((function(n){t["fileList".concat(e.name)].push(c(c({},n),{},{status:"uploading",message:"上传中"}))})),a=0;case 5:if(!(a<r.length)){n.next=15;break}return n.next=8,t.uploadFilePromise(r[a].url);case 8:i=n.sent,s=t["fileList".concat(e.name)][u],t["fileList".concat(e.name)].splice(u,1,Object.assign(s,{status:"success",message:"",url:i})),u++;case 12:a++,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,u){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"])}},[["9a867","common/runtime","common/vendor"]]]);
|