12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- ;(function(){var _excluded=["auditStatus","lessonCoverUrl","lessonPrice","lessonDesc","lessonSubject","lessonName","id"];function _objectWithoutProperties(source,excluded){if(source==null)return{};var target=_objectWithoutPropertiesLoose(source,excluded);var key,i;if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i<sourceSymbolKeys.length;i++){key=sourceSymbolKeys[i];if(excluded.indexOf(key)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(source,key))continue;target[key]=source[key];}}return target;}function _objectWithoutPropertiesLoose(source,excluded){if(source==null)return{};var target={};var sourceKeys=Object.keys(source);var key,i;for(i=0;i<sourceKeys.length;i++){key=sourceKeys[i];if(excluded.indexOf(key)>=0)continue;target[key]=source[key];}return target;}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;})),keys.push.apply(keys,symbols);}return keys;}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?ownKeys(Object(source),!0).forEach(function(key){_defineProperty(target,key,source[key]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key));});}return target;}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg);var value=info.value;}catch(error){reject(error);return;}if(info.done){resolve(value);}else{Promise.resolve(value).then(_next,_throw);}}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value);}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err);}_next(undefined);});};}var __vite_style__=document.createElement('style');__vite_style__.innerHTML="._course-preview_10oze_1{background-color:#f6f8f9;max-height:500px;overflow-y:auto;overflow-x:hidden}._createSubmit_10oze_7 ._introduction_10oze_7{color:#7a7a7a;line-height:23px;padding-bottom:8px}._userDetail_10oze_12 ._banner_10oze_12{width:100%;height:210px;overflow:hidden;vertical-align:middle}._userDetail_10oze_12 ._userInfo_10oze_18{overflow:hidden;border-top:1px solid #ebebeb;display:flex;justify-content:space-between}._userDetail_10oze_12 ._userInfo_10oze_18 ._avatar_10oze_24{width:24px;height:24px;border-radius:50%;overflow:hidden}._userDetail_10oze_12 ._userInfo_10oze_18 ._name_10oze_30{padding-left:8px;font-size:16px;font-weight:600;color:#333;line-height:22px;display:flex;align-items:center}._userDetail_10oze_12 ._userInfo_10oze_18 ._buyNum_10oze_39{color:#ff802c;font-size:14px;display:flex;align-items:center}._userDetail_10oze_12 ._userInfo_10oze_18 ._buyNum_10oze_39:before{content:\" \";display:inline-block;width:1px;height:12px;margin:0 8px;background:#d3d3d3}._userDetail_10oze_12 ._userInfo_10oze_18 ._buyNumInfo_10oze_53{font-size:12px;color:#6a6a6a;display:flex;align-items:center}._userDetail_10oze_12 ._userInfo_10oze_18 ._buyNumInfo_10oze_53 ._iconBuy_10oze_59{margin-right:5px}._userDetail_10oze_12 ._userInfo_10oze_18 ._info_10oze_62{font-size:16px;font-weight:400;color:var(--van-primary);line-height:17px}._userDetail_10oze_12 ._userInfo_10oze_18 ._userTitle_10oze_68{font-size:18px;color:#1a1a1a;font-weight:600;display:block!important}._videoImg_10oze_74{width:100px;height:70px;position:relative}._videoImg_10oze_74 ._videoStop_10oze_79{position:absolute;top:50%;right:0;left:50%;bottom:0;margin-top:-13px;margin-left:-13px;display:flex;align-items:center;justify-content:center}._videoTitle_10oze_91{padding-left:8px;font-size:13px;display:flex;flex-direction:column;height:100%;justify-content:space-around}._videoTitle_10oze_91 ._videoTitleText_10oze_99{font-size:15px;color:#333;max-width:210px}._videoTitle_10oze_91 ._videoTitleContent_10oze_104{color:#7a7a7a;line-height:18px;display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:2;-webkit-box-orient:vertical}._courseContent_znys0_1{--el-component-size-large: 48px}._courseContent_znys0_1 .el-input,._courseContent_znys0_1 .el-select--large,._courseContent_znys0_1 .el-form-item--large .el-form-item__label{height:48px;line-height:48px}._courseContent_znys0_1 .el-form-item__label{font-size:16px;color:rgba(0,0,0,.85)}._courseContent_znys0_1 .el-dialog{--el-dialog-width: 375px !important;border-radius:10px;overflow:hidden}._courseContent_znys0_1 .el-dialog__body{padding:0}._courseContent_znys0_1 .el-dialog__footer{background-color:#f6f8f9}._courseContent_znys0_1 .plyr{width:150px;height:85px;min-width:auto}._tabs_1g4lj_1 .el-tabs__nav-wrap:after{background-color:transparent}._imgCover_1g4lj_4{width:150px}._courseInfo_1g4lj_7{--el-component-size-large: 48px}._courseInfo_1g4lj_7 .el-input,._courseInfo_1g4lj_7 .el-select--large,._courseInfo_1g4lj_7 .el-form-item--large .el-form-item__label{height:48px;line-height:48px}._courseInfo_1g4lj_7 .el-form-item__label{font-size:16px;color:rgba(0,0,0,.85)}\n";document.head.appendChild(__vite_style__);System.register(['./index-legacy.a121ae5c.js','./index-legacy.902a9e5a.js','./index-legacy.e27cf5ae.js','./index-legacy.883b8fc3.js','./vendor-legacy.b19481d4.js','./icon_course_list-legacy.45fadc14.js','./index-legacy.f4149f3a.js','./index-legacy.e85d6089.js','./toolsValidate-legacy.b90c63da.js'],function(exports){'use strict';var ColSteps,state,iconTeacher,request,scrollAnimation,ColUpload,ColUploadVideo,reactive,defineComponent,createVNode,ElImage,createTextVNode,ElIcon,ElMessage,ElForm,ElFormItem,ElTooltip,ElMessageBox,ElInput,ElRow,ElCol,ElButton,ElDialog,ElSelect,ElOption,isVNode,Fragment,iconIn,iconList,ColVideo,ColCropper,verifyNumberIntegerAndFloat;return{setters:[function(module){ColSteps=module.C;},function(module){state=module.q;iconTeacher=module.d;request=module.r;scrollAnimation=module.u;},function(module){ColUpload=module.C;},function(module){ColUploadVideo=module.C;},function(module){reactive=module.r;defineComponent=module.d;createVNode=module.c;ElImage=module.x;createTextVNode=module.a;ElIcon=module.l;ElMessage=module.E;ElForm=module.y;ElFormItem=module.z;ElTooltip=module.a3;ElMessageBox=module.j;ElInput=module.w;ElRow=module.q;ElCol=module.v;ElButton=module.k;ElDialog=module.K;ElSelect=module.a1;ElOption=module.a2;isVNode=module.a8;Fragment=module.F;},function(module){iconIn=module.i;iconList=module.a;},function(module){ColVideo=module.C;},function(module){ColCropper=module.C;},function(module){verifyNumberIntegerAndFloat=module.v;}],execute:function execute(){var original=function original(){return{groupId:0,active:0,tabIndex:1,loadingStatus:false,rate:0,// 手续费
- subjectList:[],// 声部列表
- templateList:['https://ks3-cn-beijing.ksyuncs.com/video-course/1657853010619green.png','https://ks3-cn-beijing.ksyuncs.com/video-course/1657853051064gray.png','https://ks3-cn-beijing.ksyuncs.com/video-course/1657853062314yellow.png','https://ks3-cn-beijing.ksyuncs.com/video-course/1657853076136linear.png'],// 模板列表
- lessonGroup:{id:null,lessonName:'',lessonSubject:null,lessonDesc:'',lessonPrice:null,lessonCoverUrl:'',lessonCoverTemplateUrl:''},lessonList:[// {
- // videoTitle: '',
- // videoContent: '',
- // videoUrl: '',
- // coverUrl: '',
- // posterUrl: '' // 视频封面图
- // }
- ]};};var createState=reactive(original());// 重置对象
- var resestState=function resestState(){Object.assign(createState,original());};var createSubmit="_createSubmit_10oze_7";var introduction="_introduction_10oze_7";var userDetail="_userDetail_10oze_12";var banner="_banner_10oze_12";var userInfo="_userInfo_10oze_18";var avatar="_avatar_10oze_24";var name="_name_10oze_30";var buyNum="_buyNum_10oze_39";var buyNumInfo="_buyNumInfo_10oze_53";var iconBuy="_iconBuy_10oze_59";var info="_info_10oze_62";var userTitle="_userTitle_10oze_68";var videoImg="_videoImg_10oze_74";var videoStop$1="_videoStop_10oze_79";var videoTitle="_videoTitle_10oze_91";var videoTitleText="_videoTitleText_10oze_99";var videoTitleContent="_videoTitleContent_10oze_104";var styles$2={"course-preview":"_course-preview_10oze_1",createSubmit:createSubmit,introduction:introduction,userDetail:userDetail,banner:banner,userInfo:userInfo,avatar:avatar,name:name,buyNum:buyNum,buyNumInfo:buyNumInfo,iconBuy:iconBuy,info:info,userTitle:userTitle,videoImg:videoImg,videoStop:videoStop$1,videoTitle:videoTitle,videoTitleText:videoTitleText,videoTitleContent:videoTitleContent};var videoStop="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA2CAMAAAC/bkrSAAAAAXNSR0IArs4c6QAAAYlQTFRFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQUFDg4OEBAQGRkZHR0dHx8fJSUlKSkpLCwsOzs7Pj4+QEBAVFRUVVVVXl5ea2trbW1teXl5e3t7fX19f39/gYGBkJCQk5OTpKSkp6enp6ensLCwsLCwtra2tra2w8PDxsbGxsbGzs7Oz8/P0NDQ0tLS0tLS09PT29vb29vb4uLi5eXl5ubm5ubm7Ozs7e3t7e3t8PDw8PDw8PDw8fHx8/Pz9vb29/f3+vr6+vr6/f39/f39/v7+/////v7+////////J7wfagAAAIJ0Uk5TAAECAwQFBwgJDQ8VFxkaGyAhIiQqKy4vMDIzNDU3ODk7PT4/QUJDREdJTU5RUlNUVVZXWFpbXV5fYGFkZWZnaGlqa21ucHJydHV1ent8g4SHjI2Sk5OVlp6eqaqrsbK1tr/AwcfIysrNzdPU297e3+bm5+nq6+zu8vL3+Pv8/f3+/h4twksAAAIJSURBVBgZrcEHV9pQAAbQT4SIgKIiigMX7lUVZ7CQzy67996tHa97T631/fI6EPNeEojn9F64qYknu/uGhvq6k/Ea+BLrmbZYYk33xFBBsHWWDrOtQXgLpEy6MlMBeKjP0lO2Hm6qOi2WYXVWwSE0ygpGQ9CEp1jRVBgKY4Y+zBiwqR6nL+PVOJChTxmUJOhbAkWGSd9MA3syVKw+WLt3gl4y2BWxaLf6WUr57Ro9WBHs6Kfivtyx9ewM3fVjWzhPxQu55+dtusqHAbRQJeS+1+fppgXAJFVClvy+u0KnScCwqBLS5t1FOlgGmqgR0m790XHqmtBFjZCqT1eo6cIINUJq/j49RcUIstQI6fDlLO2yWKJGSKfntFvCUWqEdPpKu2UUqBHS6Q3tCshRI6TDnxu0y2GBGiF1369TsYAj1Aip2nxykqpJDFIjpOLjZeoG0UaNkDbrD4/RoQ111Ah54O0FuqhDYJkqIff9urNCF8sBYJiql7Lo1Tm6GgbQQNVjuevHLXpoABBYpOLShpRya+00PSwGsC1F1c0PG++v0lMKO0ImD8EMYVczD6EZRRP0bQL7Ijn6lIugJEGfErDpoC8dUPTSh15o0qwoDYdknmXlk3ARnWMZc1G4Cqbz9JBPB+ElMlCgi8JABOXUpuepmU/XoqJY+5jJInOsPQa/jGi8sTEeNfD//AORQWsF93/GiwAAAABJRU5ErkJggg==";var CoursePreview=defineComponent({name:'course-preview',computed:{userInfo:function userInfo(){var videoDetail=createState.lessonGroup;var users=state.user.data||{};return{id:users.id,username:users.username||"\u6E38\u5BA2".concat(users.id||''),headUrl:users.headUrl,lessonName:videoDetail.lessonName,buyNum:0,lessonDesc:videoDetail.lessonDesc,lessonPrice:videoDetail.lessonPrice,lessonCoverUrl:videoDetail.lessonCoverTemplateUrl||videoDetail.lessonCoverUrl,lessonNum:createState.lessonList.length};},lessonList:function lessonList(){return createState.lessonList||[];}},render:function render(){return createVNode("div",{"class":[styles$2['course-preview'],'pb-3']},[createVNode("div",{"class":styles$2.userDetail},[createVNode(ElImage,{"class":[styles$2.banner],"src":this.userInfo.lessonCoverUrl,"fit":"cover"},null),createVNode("div",{"class":"bg-white"},[createVNode("div",{"class":"p-[14px] text-lg text-[#1a1a1a] font-semibold leading-none"},[createTextVNode("\u6807\u9898")]),createVNode("div",{"class":[styles$2.userInfo,'mx-[14px] py-[14px]']},[createVNode("div",{"class":"flex"},[createVNode(ElImage,{"class":styles$2.avatar,"src":this.userInfo.headUrl||iconTeacher,"fit":""},null),createVNode("div",{"class":styles$2.name},[this.userInfo.username||"\u6E38\u5BA2".concat(this.userInfo.id||''),createVNode("div",{"class":styles$2.buyNum},[this.userInfo.buyNum,createTextVNode("\u4EBA\u5DF2\u8D2D\u4E70")])])]),createVNode("div",{"class":styles$2.info},[createTextVNode("\uFFE5"),this.userInfo.lessonPrice,createTextVNode("/"),this.userInfo.lessonNum,createTextVNode("\u8BFE\u65F6")])])])]),createVNode("div",{"class":[styles$2['section-detail'],'mt-[10px] mx-[14px] rounded-lg bg-white']},[createVNode("div",{"class":"flex items-center py-3 px-[10px] text-[#333333] text-base"},[createVNode(ElIcon,{"size":18,"class":"mr-2"},{default:function _default(){return[createVNode("img",{"src":iconIn},null)];}}),createTextVNode("\u8BFE\u7A0B\u4ECB\u7ECD")]),createVNode("div",{"class":"mx-[10px] pt-[10px] pb-4 text-sm text-[#7A7A7A] border-t border-t-[#EBEBEB]"},[this.userInfo.lessonDesc])]),createVNode("div",{"class":[styles$2['section-detail'],'mt-[10px] mx-[14px] rounded-lg bg-white']},[createVNode("div",{"class":"flex items-center py-3 px-[10px] text-[#333333] text-base"},[createVNode(ElIcon,{"size":18,"class":"mr-2"},{default:function _default(){return[createVNode("img",{"src":iconList},null)];}}),createTextVNode("\u8BFE\u7A0B\u5217\u8868")]),createVNode("div",{"class":"mx-[10px] pt-[10px] pb-4 text-sm text-[#7A7A7A] border-t border-t-[#EBEBEB] flex flex-col"},[createState.lessonList.map(function(item){return createVNode("div",{"class":"flex mb-3"},[createVNode("div",{"class":styles$2.videoImg},[createVNode(ElImage,{"class":"align-middle h-[70px] w-[100px] rounded overflow-hidden","src":item.coverUrl,"fit":"cover"},null),createVNode(ElIcon,{"class":styles$2.videoStop,"size":26},{default:function _default(){return[createVNode("img",{"src":videoStop},null)];}})]),createVNode("div",{"class":[styles$2.videoTitle,'!h-[70px]']},[createVNode("p",{"class":[styles$2.videoTitleText,'whitespace-nowrap overflow-hidden text-ellipsis']},[item.videoTitle]),createVNode("p",{"class":[styles$2.videoTitleContent]},[item.videoContent])])]);})])])]);}});var courseContent="_courseContent_znys0_1";var styles$1={courseContent:courseContent};var iconDown="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADoAAAA6CAMAAADWZboaAAAAAXNSR0IArs4c6QAAAKtQTFRFAAAA////////9vb28/Pz9PT09PT08/Pz8/Pz8/Pz9PT0DQ0NDg4ODw8PERERExMTFRUVFxcXGBgYGxsbHh4eICAgISEhJCQkQUFBRERER0dHS0tLTExMTk5OVVVVXFxcYWFhjY2Nk5OTlZWVlpaWmJiYmZmZnZ2dpaWlrKyss7Ozubm5v7+/xcXFysrKzc3N19fX2NjY5eXl6Ojo6+vr7e3t7u7u7+/v8/PzuMr56AAAAAt0Uk5TAAIFUVWKpNjc8v4WawkrAAABMklEQVRIx+3Xt3LDMBBF0RWDGC6Vc7ICZeVgK9j8/y9zISsV1oBA44KvYIM5DbGYeSsiImI5eS9IlBJ4eceSW2w/SRXf/oU5N0xSJnRzIiLiJhpxRUTsUIeGtojlJ1rxLXESzTiS16V58XSpJ4EuDeTV6bTZnP59+oruIoh2WnQGMNOiMUCc0YxmNKP/gn70G6PDMz2MGv1PBdoD2sdHemwDPQVaAeie7vTUBago0A4Ag/OVngcAdBTovg7A2/eFfr0BUN+r/OFtDYDhBGAyBKC2VbucTRWA1u1DdaN6r+syTymv1UdiVXqUpVWaaVoW77K4TDeIi8JVFhZpZ3geXWQ0Tz/+8YXGOi9nDDDWenTJe6s1e1FDDMqPQeUyKHoG9dKg1BpUaZMCb7I2GCwruivSD/jVkGLI5Sc4AAAAAElFTkSuQmCC";var iconUp="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADoAAAA6CAMAAADWZboaAAAAAXNSR0IArs4c6QAAAKtQTFRFAAAA////////9vb28/Pz9PT09PT08/Pz8/Pz8/Pz9PT0DQ0NDg4ODw8PERERExMTFRUVFxcXGBgYGxsbHh4eICAgISEhJCQkQkJCRERER0dHSEhIS0tLTExMTk5OVVVVXFxcYWFhjY2Nk5OTlZWVlpaWmJiYmZmZnZ2dpKSkq6urs7Ozubm5v7+/xcXFysrKzc3N19fX2NjY5eXl6Ojo6+vr7e3t7+/v8/PzQBqgLwAAAAt0Uk5TAAIFUVWKpNjc8v4WawkrAAABMElEQVRIx+3XuXLCMBhF4R9sjO1j9j1hx+xrwqb3f7IUEEKKMLJUpPEp3Gi+Tp65EhERybpePlBaBXnPzcojx1eJ8p07zORClbAwlxERkZwyKCci4oQmNHREsr4yys+KqwxzxTOlnuRNaV4CUxrIq9NZqzX7+/QVHQOMTWgMAHFyuohuNFokpcsC9wrLZHRV5FFxlYSuSzxVWuvTTZlflTe6dFsFoPX4UN3q0V0NgOEEYDIEoLbToYc6AINrDBBfBwDUDxq0A0D/crsTsbr0Aeho0ArA+1l9U3V+A6ho0C7QPqkfqk5toKtBP3qN0VE9U3UcNXqfSf6c+OXtT2lKU5rS/6FzgLkR3UcQ7Y2omjab0xczxGL8WEwui6FnMS8tRq3FlLYZ8DbPBovHiukT6QvDn5DJjUbpuAAAAABJRU5ErkJggg==";var iconDelete="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADoAAAA6CAMAAADWZboaAAAAAXNSR0IArs4c6QAAAEhQTFRFAAAA////////9vb28/Pz9PT09PT08/Pz8/Pz8/Pz9PT0AAAACwsLGhoaLS0tNDQ0RUVFi4uLra2t19fX2NjY2dnZ7Ozs8/PzedusZQAAAAt0Uk5TAAIFUVWKpNjc8v4WawkrAAABBElEQVRIx+2XUQ6DIAxAq6KoExHd4P43HbppnNKAVLMf3w9Jw4uVlLQAjKSs4JUJouIFS2EhK80hyuwrJnltDlLnyaTmJoJ8yraOUWubc1qaKMoUmImEQRGrFsCd8V48vogeUTm4K2ExrYvVBphY1SBqQMKYGsI5ar/6QTe/yYPzaFD3fJWQ8H9O+JO0uwRccdgVoEAKU3jU8TDWX5nXOR6gzl+Z1wMqtt7qrd7qRZeOcNW3XKs2dsuwNwcbbjyqtHu6nTt0Niw9qsK7hvKousXMVvsaxxNx25e/52glm63XSKUdPaeK7VYVMnIFwCmDHmG8JAy1hFGaMsBTng2Ex0rsE+kNjFEHody3dJ8AAAAASUVORK5CYII=";var CourseContent=defineComponent({name:'course-content',data:function data(){return{show:false,form:{lessonList:[{key:1,videoTitle:'',videoContent:'',videoUrl:'',coverUrl:''}]}};},methods:{handleUpload:function handleUpload(urls){console.log(urls);// 上传视频连接s
- var urlList=urls||[];urlList.forEach(function(item){createState.lessonList.push({videoTitle:'',videoContent:'',videoUrl:item,coverUrl:''});});},handleSubmit:function handleSubmit(){var _this=this;this.$refs.form.validate(/*#__PURE__*/function(){var _ref=_asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee(valid){return regeneratorRuntime.wrap(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:if(!valid){_context.next=8;break;}if(!(createState.lessonList.length<=0)){_context.next=4;break;}ElMessage.error('请上传课程视频');return _context.abrupt("return");case 4:// 提交数据
- console.log('提交数据');_this.show=true;_context.next=10;break;case 8:_this.$nextTick(function(){var isError=document.getElementsByClassName('is-error');isError[0].scrollIntoView({block:'center',behavior:'smooth'});});return _context.abrupt("return",false);case 10:case"end":return _context.stop();}}},_callee);}));return function(_x){return _ref.apply(this,arguments);};}());},createSubmit:function createSubmit(){var _this2=this;return _asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee2(){var videoDetail,params;return regeneratorRuntime.wrap(function _callee2$(_context2){while(1){switch(_context2.prev=_context2.next){case 0:_context2.prev=0;videoDetail=createState.lessonGroup;params={lessonList:createState.lessonList,lessonGroup:_objectSpread(_objectSpread({},videoDetail),{},{lessonCoverUrl:videoDetail.lessonCoverTemplateUrl||videoDetail.lessonCoverUrl})};if(!createState.groupId){_context2.next=9;break;}_context2.next=6;return request.post('/api-website/videoLessonGroup/update',{data:params});case 6:ElMessage.success('修改成功');_context2.next=12;break;case 9:_context2.next=11;return request.post('/api-website/videoLessonGroup/add',{data:params});case 11:ElMessage.success('创建成功');case 12:sessionStorage.setItem('videoActiveName','DOING');_this2.$router.back();_context2.next=18;break;case 16:_context2.prev=16;_context2.t0=_context2["catch"](0);case 18:case"end":return _context2.stop();}}},_callee2,null,[[0,16]]);}))();},swapItems:function swapItems(arr,index1,index2){arr[index1]=arr.splice(index2,1,arr[index1])[0];return arr;}},render:function render(){var _this3=this;return createVNode("div",{"class":styles$1.courseContent},[createVNode(ElForm,{"class":"px-6 pb-10 pt-7 min-h-[280px]","size":"large","labelWidth":'120px',"labelPosition":"left","ref":"form","model":createState},{default:function _default(){return[createVNode(ElFormItem,{"label":"课程视频","required":true},{default:function _default(){return[createVNode("div",null,[createVNode(ColUploadVideo,{"multiple":true,"limit":3,"bucket":"video-course","multipleModel":function multipleModel(urls){_this3.handleUpload(urls);}},null)])];}}),createState.lessonList.map(function(item,index){return createVNode("div",{"class":"p-4 mb-10 border-b border-solid border-[#E7E6E6] relative","key":item.key},[createVNode("div",{"class":"absolute right-4 top-4 z-10 flex"},[index!==0&&createVNode(ElTooltip,{"class":"box-item","effect":"dark","content":"上移","placement":"top"},{default:function _default(){return[createVNode("div",{"onClick":function onClick(){_this3.swapItems(createState.lessonList,index,index-1);}},[createVNode(ElIcon,{"size":29},{default:function _default(){return[createVNode("img",{"src":iconUp},null)];}})])];}}),createState.lessonList.length-1!==index&&createVNode(ElTooltip,{"class":"box-item","effect":"dark","content":"下移","placement":"top"},{default:function _default(){return[createVNode("div",{"onClick":function onClick(){_this3.swapItems(createState.lessonList,index,index+1);}},[createVNode(ElIcon,{"size":29,"class":"ml-3"},{default:function _default(){return[createVNode("img",{"src":iconDown,"title":"向下移动"},null)];}})])];}}),createState.lessonList.length>1&&createVNode(ElTooltip,{"class":"box-item","effect":"dark","content":"删除","placement":"top"},{default:function _default(){return[createVNode("div",{"onClick":function onClick(){ElMessageBox.confirm('确定删除该条数据吗?','提示',{type:'warning'}).then(function(){createState.lessonList.splice(index,1);});}},[createVNode(ElIcon,{"size":29,"class":"ml-3"},{default:function _default(){return[createVNode("img",{"src":iconDelete},null)];}})])];}})]),createVNode("h2",{"class":"text-xl font-semibold pb-5"},["\u7B2C ".concat(index+1," \u8BFE")]),createVNode(ElFormItem,{"label":"课程标题","prop":"lessonList.".concat(index,".videoTitle"),"rules":[{required:true,message:'请输入课程标题'}]},{default:function _default(){return[createVNode(ElInput,{"placeholder":"请输入课程标题","maxlength":50,"modelValue":item.videoTitle,"onUpdate:modelValue":function onUpdateModelValue($event){return item.videoTitle=$event;}},null)];}}),createVNode(ElFormItem,{"label":"课程介绍","prop":"lessonList.".concat(index,".videoContent"),"rules":[{required:true,message:'请输入课程介绍'}]},{default:function _default(){return[createVNode(ElInput,{"placeholder":"请输入课程介绍","modelValue":item.videoContent,"onUpdate:modelValue":function onUpdateModelValue($event){return item.videoContent=$event;},"type":"textarea","maxlength":200,"rows":4,"showWordLimit":true},null)];}}),createVNode(ElRow,null,{default:function _default(){return[createVNode(ElCol,{"span":12},{default:function _default(){return[createVNode(ElFormItem,{"label":"课程视频","required":true},{default:function _default(){return[createVNode(ColVideo,{"styleValue":{with:'150px',height:'85px'},"controls":false,"src":item.videoUrl,"volume":false},null),createVNode("p",null,null)];}})];}}),createVNode(ElCol,{"span":10},{default:function _default(){return[createVNode(ElFormItem,{"label":"视频封面","prop":"lessonList.".concat(index,".coverUrl"),"rules":[{required:true,message:'请上传视频封面'}]},{default:function _default(){return[createVNode(ColUpload,{"modelValue":item.coverUrl,"onUpdate:modelValue":function onUpdateModelValue($event){return item.coverUrl=$event;},"bucket":"video-course"},null)];}})];}})];}})]);})];}}),createVNode("div",{"class":"text-center pt-6 pb-7"},[createVNode(ElButton,{"round":true,"class":"!w-44 !h-[48px] !text-base","onClick":function onClick(){createState.active=0;var currentY=document.documentElement.scrollTop||document.body.scrollTop;scrollAnimation(currentY,0);}},{default:function _default(){return[createTextVNode("\u4E0A\u4E00\u6B65")];}}),createVNode(ElButton,{"round":true,"type":"primary","class":"!w-44 !h-[48px] !text-base","onClick":this.handleSubmit},{default:function _default(){return[createTextVNode("\u4E0B\u4E00\u6B65")];}})]),createVNode(ElDialog,{"modelValue":this.show,"onUpdate:modelValue":function onUpdateModelValue($event){return _this3.show=$event;},"title":"预览"},{default:function _default(){return[createVNode(CoursePreview,null,null)];},footer:function footer(){return createVNode("span",{"class":"dialog-footer !text-center block "},[createVNode(ElButton,{"size":"large","round":true,"onClick":function onClick(){_this3.show=false;}},{default:function _default(){return[createTextVNode("\u8FD4\u56DE\u7F16\u8F91")];}}),createVNode(ElButton,{"size":"large","round":true,"type":"primary","onClick":_this3.createSubmit},{default:function _default(){return[createState.groupId?'确认修改':'创建完成'];}})]);}})]);}});var tabs="_tabs_1g4lj_1";var imgCover="_imgCover_1g4lj_4";var courseInfo="_courseInfo_1g4lj_7";var styles={tabs:tabs,imgCover:imgCover,courseInfo:courseInfo};function _isSlot(s){return typeof s==='function'||Object.prototype.toString.call(s)==='[object Object]'&&!isVNode(s);}var CourseInfo=defineComponent({name:'course-info',data:function data(){return{url:''// calcRatePrice: 0 as any
- };},computed:{choiceSubjectIds:function choiceSubjectIds(){// 选择的科目编号
- var ids=createState.lessonGroup.lessonSubject?Number(createState.lessonGroup.lessonSubject):null;return ids?[ids]:[];},subjectList:function subjectList(){// 学科列表
- return createState.subjectList||[];},lessonSubjectName:function lessonSubjectName(){var _this4=this;// 选择的科目
- var tempStr='';this.subjectList.forEach(function(item){if(_this4.choiceSubjectIds.includes(item.id)){tempStr=item.name;}});return tempStr;},calcRatePrice:function calcRatePrice(){// 计算手续费
- var rate=createState.rate||0;var price=createState.lessonGroup.lessonPrice||0;return(price-rate/100*price).toFixed(2);}},mounted:function mounted(){return _asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee3(){var res,rate,price;return regeneratorRuntime.wrap(function _callee3$(_context3){while(1){switch(_context3.prev=_context3.next){case 0:_context3.prev=0;if(!(createState.subjectList.length<=0)){_context3.next=6;break;}_context3.next=4;return request.post('/api-website/teacher/querySubject');case 4:res=_context3.sent;createState.subjectList=res.data||[];case 6:rate=createState.rate||0;price=createState.lessonGroup.lessonPrice||0;// this.calcRatePrice = (price - (rate / 100) * price).toFixed(2)
- // setInterval(() => {
- // console.log(
- // createState.lessonGroup.lessonCoverTemplateUrl,
- // 'createState.lessonGroup.lessonCoverTemplateUrl'
- // )
- // }, 1000)
- _context3.next=12;break;case 10:_context3.prev=10;_context3.t0=_context3["catch"](0);case 12:case"end":return _context3.stop();}}},_callee3,null,[[0,10]]);}))();},methods:{// onChoice(id: number) {
- // createState.lessonGroup.lessonSubject = id
- // this.subjectStatus = false
- // },
- onFormatter:function onFormatter(e){e.target.value=verifyNumberIntegerAndFloat(e.target.value);// 计算手续费
- createState.rate||0;e.target.value||0;// this.calcRatePrice = (price - (rate / 100) * price).toFixed(2)
- },tabChange:function tabChange(name){this.$refs.form.clearValidate('lessonCoverTemplateUrl');this.$refs.form.clearValidate('lessonCoverUrl');createState.tabIndex=name;},selectImg:function selectImg(val){createState.lessonGroup.lessonCoverUrl='';createState.lessonGroup.lessonCoverTemplateUrl=val;}},render:function render(){var _this5=this;var _slot;return createVNode("div",{"class":styles.courseInfo},[createVNode(ElForm,{"class":"px-6 pb-10 pt-7","size":"large","ref":"form","labelWidth":'120px',"labelPosition":"left","model":createState.lessonGroup},{default:function _default(){return[createVNode(ElFormItem,{"label":"课程名称","prop":"lessonName","rules":[{required:true,message:'请输入课程名称'}]},{default:function _default(){return[createVNode(ElInput,{"modelValue":createState.lessonGroup.lessonName,"onUpdate:modelValue":function onUpdateModelValue($event){return createState.lessonGroup.lessonName=$event;},"maxlength":20,"placeholder":"请输入课程名称"},null)];}}),createVNode(ElFormItem,{"label":"课程声部","prop":"lessonSubject","rules":[{required:true,message:'请选择课程声部'}]},{default:function _default(){return[createVNode(ElSelect,{"class":"w-full","modelValue":createState.lessonGroup.lessonSubject,"onUpdate:modelValue":function onUpdateModelValue($event){return createState.lessonGroup.lessonSubject=$event;},"placeholder":"请选择课程声部"},_isSlot(_slot=createState.subjectList.map(function(item){return createVNode(ElOption,{"key":item.id,"value":item.id,"label":item.name},null);}))?_slot:{default:function _default(){return[_slot];}})];}}),createVNode(ElFormItem,{"label":"课程介绍","prop":"lessonDesc","rules":[{required:true,message:'请输入课程介绍'}]},{default:function _default(){return[createVNode(ElInput,{"placeholder":"请输入课程介绍","modelValue":createState.lessonGroup.lessonDesc,"onUpdate:modelValue":function onUpdateModelValue($event){return createState.lessonGroup.lessonDesc=$event;},"type":"textarea","maxlength":200,"rows":4,"showWordLimit":true},null)];}}),createVNode(ElFormItem,{"label":"课程组售价","prop":"lessonPrice","rules":[{required:true,message:'请输入课程组售价'}]},{default:function _default(){return[createVNode(ElInput,{"placeholder":"请输入课程组售价","modelValue":createState.lessonGroup.lessonPrice,"onUpdate:modelValue":function onUpdateModelValue($event){return createState.lessonGroup.lessonPrice=$event;},"onKeyup":_this5.onFormatter,"maxlength":9},{suffix:function suffix(){return createVNode("span",{"class":"text-base text-[#999]"},[createTextVNode("\u5143")]);}})];}}),createVNode("div",{"class":"text-sm text-[#999] pl-[120px] leading-relaxed pb-2"},[createVNode("p",null,[createTextVNode("\u6263\u9664\u624B\u7EED\u8D39\u540E\u60A8\u7684\u8BFE\u7A0B\u9884\u8BA1\u6536\u5165\u4E3A\uFF1A ")]),createVNode("p",null,[createTextVNode("\u8BFE\u7A0B\u7EC4\u603B\u6536\u5165"),createVNode("span",{"class":"px-1 text-[#FF4E19]"},[_this5.calcRatePrice]),createTextVNode("\u5143/\u4EBA")]),createVNode("p",null,[createTextVNode("\u60A8\u7684\u8BFE\u7A0B\u6536\u5165\u5C06\u5728\u8BFE\u7A0B\u7ED3\u675F\u540E\u7ED3\u7B97\u5230\u60A8\u7684\u8D26\u6237\u4E2D ")])]),createVNode(ElFormItem,{"label":"课程封面","class":"!mb-0","prop":"lessonCoverUrl","rules":[{required:true,message:'请上传课程封面',trigger:'change'}]},{default:function _default(){return[createVNode(ColCropper,{"modelValue":createState.lessonGroup.lessonCoverUrl,"bucket":"video-course","cropUploadSuccess":function cropUploadSuccess(data){createState.lessonGroup.lessonCoverUrl=data;createState.lessonGroup.lessonCoverTemplateUrl='';},"options":{title:'课程封面',fixedNumber:[3.34,2],autoCropWidth:375,autoCropHeight:212// fixedNumber: [3, 2],
- // autoCropWidth: 300,
- // autoCropHeight: 200
- }},null)];}})];}}),createVNode("div",{"class":" text-center pt-6 pb-7"},[createVNode(ElButton,{"type":"primary","round":true,"class":"!w-44 !h-[48px] !text-base","onClick":function onClick(){_this5.$refs.form.validate(/*#__PURE__*/function(){var _ref2=_asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee4(valid){var currentY;return regeneratorRuntime.wrap(function _callee4$(_context4){while(1){switch(_context4.prev=_context4.next){case 0:if(!valid){_context4.next=6;break;}createState.active=1;currentY=document.documentElement.scrollTop||document.body.scrollTop;scrollAnimation(currentY,0);_context4.next=8;break;case 6:_this5.$nextTick(function(){var isError=document.getElementsByClassName('is-error');isError[0].scrollIntoView({block:'center',behavior:'smooth'});});return _context4.abrupt("return",false);case 8:case"end":return _context4.stop();}}},_callee4);}));return function(_x2){return _ref2.apply(this,arguments);};}());}},{default:function _default(){return[createTextVNode("\u4E0B\u4E00\u6B65")];}})])]);}});var index=exports('default',defineComponent({name:'video-operation',data:function data(){var query=this.$route.query;return{type:query.type||'create'};},created:function created(){var _this6=this;return _asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee5(){var query,res,result,_result$lessonGroup,auditStatus,lessonCoverUrl,lessonPrice,lessonDesc,lessonSubject,lessonName,id,group;return regeneratorRuntime.wrap(function _callee5$(_context5){while(1){switch(_context5.prev=_context5.next){case 0:// 重置数据
- resestState();query=_this6.$route.query;createState.groupId=Number(query.groupId)||0;// 判断是否是编辑
- if(createState.groupId){_context5.next=5;break;}return _context5.abrupt("return",false);case 5:_context5.prev=5;createState.loadingStatus=true;_context5.next=9;return request.get('/api-website/videoLessonGroup/selectVideoLesson',{params:{groupId:createState.groupId}});case 9:res=_context5.sent;result=res.data;_result$lessonGroup=result.lessonGroup,auditStatus=_result$lessonGroup.auditStatus,lessonCoverUrl=_result$lessonGroup.lessonCoverUrl,lessonPrice=_result$lessonGroup.lessonPrice,lessonDesc=_result$lessonGroup.lessonDesc,lessonSubject=_result$lessonGroup.lessonSubject,lessonName=_result$lessonGroup.lessonName,id=_result$lessonGroup.id,group=_objectWithoutProperties(_result$lessonGroup,_excluded);// 判断模板图片是否在模板列表中,如果不在则是用户自己上传的图片
- // const statusUrl = createState.templateList.includes(lessonCoverUrl)
- // ? true
- // : false
- createState.lessonGroup={id:id,lessonName:lessonName,lessonSubject:Number(lessonSubject),lessonDesc:lessonDesc,lessonPrice:lessonPrice,// lessonCoverTemplateUrl: statusUrl ? lessonCoverUrl : '',
- lessonCoverUrl:lessonCoverUrl};createState.lessonList=[];result.detailList&&result.detailList.forEach(function(item){createState.lessonList.push({videoTitle:item.videoTitle,videoContent:item.videoContent,videoUrl:item.videoUrl,coverUrl:item.coverUrl,posterUrl:item.posterUrl// 视频封面图
- });});createState.loadingStatus=false;_context5.next=20;break;case 18:_context5.prev=18;_context5.t0=_context5["catch"](5);case 20:if(createState.lessonGroup.lessonCoverUrl&&!createState.templateList.includes(createState.lessonGroup.lessonCoverUrl)){createState.tabIndex=2;}else{createState.tabIndex=1;}case 21:case"end":return _context5.stop();}}},_callee5,null,[[5,18]]);}))();},mounted:function mounted(){var _this7=this;return _asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee6(){var sysConfig;return regeneratorRuntime.wrap(function _callee6$(_context6){while(1){switch(_context6.prev=_context6.next){case 0:document.title=_this7.type==='create'?'新建视频课':'编辑视频课';_context6.prev=1;_context6.next=4;return request.get('/api-website/sysConfig/queryByParamName',{params:{paramName:'video_lesson_service_fee'}});case 4:sysConfig=_context6.sent;createState.rate=sysConfig.data.paramValue;_context6.next=10;break;case 8:_context6.prev=8;_context6.t0=_context6["catch"](1);case 10:case"end":return _context6.stop();}}},_callee6,null,[[1,8]]);}))();},render:function render(){return createVNode(Fragment,null,[createVNode("div",{"class":"text-2xl font-semibold text-black leading-none px-6 py-5 "},[this.type==='create'?'新建视频课':'编辑视频课']),createVNode("div",{"class":"pt-12"},[createVNode(ColSteps,{"class":"pl-[60px] pr-7","type":"large","active":createState.active},null),createState.active===0&&createVNode(CourseInfo,null,null),createState.active===1&&createVNode(CourseContent,null,null)])]);}}));}};});})();
|