require('./common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages_course/feedback"],{5978:function(e,t,n){},"64c5":function(e,t,n){"use strict";(function(e){var i=n("47a9");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n("7eb4")),r=i(n("ee10")),a=i(n("7ca3")),u=n("8f59"),s=n("a562");function c(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw r}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n1.5?1.5*n+"px":i<1?n+"px":n*i+"px"}}}),watch:{coureLogin:{immediate:!0,handler:function(e){2==e&&(console.log("AppToken失效,请重新登录"),this.isLogin=!1,this.goLogin())}}},onLoad:function(e){var t=this;this.userId=e.userId||"",this.courseId=e.courseId||"",this.videoId=e.videoId||"",this.utils.isLoginCourse().then((function(e){e?(t.isLogin=!0,t.getMenuButton(),t.getList()):(t.isLogin=!1,t.goLogin())}),(function(e){}))},methods:{getMenuButton:function(){var t=e.getMenuButtonBoundingClientRect();this.menuButtonH=t.height},goBack:function(){if(0==this.pageIndex)e.navigateBack();else if(this.pageIndex--,this.formdata={complaintContent:""},1==this.isLastChild)this.isLastChild=0;else if(0==this.pageIndex)this.feedbackItems=this.list,this.templateId=0;else{var t=this.findGrandparentOrAllData(this.list,this.templateId);this.feedbackItems=t.childrenType,this.templateId=t.complaintTypeId}},findGrandparentOrAllData:function(e,t){function n(e,t){if(!e||!e.childrenType)return null;var i,o=c(e.childrenType);try{for(o.s();!(i=o.n()).done;){var r=i.value;if(r.complaintTypeId===t)return e;var a=n(r,t);if(a)return a}}catch(u){o.e(u)}finally{o.f()}return null}var i,o=c(e);try{for(o.s();!(i=o.n()).done;){var r=i.value;if(r.complaintTypeId===t)return e;var a=n(r,t);if(a){var u=n(r,a.complaintTypeId);return u||e}}}catch(s){o.e(s)}finally{o.f()}return e},handleClick:function(e,t){var n=this;if(1!=this.isLastChild&&this.pageIndex>=0){this.pageIndex++;var i=this.feedbackItems[t].childrenType||[];this.templateId=this.feedbackItems[t].complaintTypeId,this.formdata={complaintContent:""},this.text=this.feedbackItems[t].complaintTypeName,i.length>0?(this.isLastChild=0,this.feedbackItems=i,this.templateId=this.feedbackItems[0].complaintTypeId):(this.isLastChild=1,this.formdata={complaintContent:""},setTimeout((function(){n.$refs.uForm.setRules(n.rules)}),200))}},getList:function(){var e=this;(0,s.getTypeTree)().then((function(t){200==t.code&&(e.list=t.data,e.pageIndex=0,e.feedbackItems=e.list)}))},submit:function(){var t=this;if(this.fileList1.some((function(e){return"uploading"==e.status})))e.showToast({title:"等待图片上传中",icon:"none"});else{var n=[];this.fileList1.forEach((function(e){n.push(e.url)})),this.$refs.uForm.validate().then((function(i){if(i){var o={userId:t.userId,complaintTypeId:t.templateId,complaintContent:t.formdata.complaintContent,courseId:t.courseId,videoId:t.videoId,complaintUrl:n.toString()};(0,s.complaintRecord)(o).then((function(t){e.showModal({title:"",content:"我们已收到您的反馈,谢谢",showCancel:!1,success:function(t){(t.confirm||t.cancel)&&e.navigateBack()}})}))}}))}},deletePic:function(e){this["fileList".concat(e.name)].splice(e.index,1)},afterRead:function(e){var t=this;return(0,r.default)(o.default.mark((function n(){var i,r,a,u,s;return o.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:i=[].concat(e.file),r=t["fileList".concat(e.name)].length,i.map((function(n){t["fileList".concat(e.name)].push(d(d({},n),{},{status:"uploading",message:"上传中"}))})),a=0;case 4:if(!(a