12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- ;(function(){var _excluded=["auditStatus","lessonCoverUrl","lessonPrice","lessonDesc","payType","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_1cmfh_1{background-color:#f6f8f9;max-height:500px;overflow-y:auto;overflow-x:hidden}._createSubmit_1cmfh_7 ._introduction_1cmfh_7{color:#7a7a7a;line-height:23px;padding-bottom:8px}._userDetail_1cmfh_12 ._banner_1cmfh_12{width:100%;height:210px;overflow:hidden;vertical-align:middle}._userDetail_1cmfh_12 ._userInfo_1cmfh_18{overflow:hidden;border-top:1px solid #ebebeb;display:flex;justify-content:space-between}._userDetail_1cmfh_12 ._userInfo_1cmfh_18 ._avatar_1cmfh_24{width:24px;height:24px;border-radius:50%;overflow:hidden}._userDetail_1cmfh_12 ._userInfo_1cmfh_18 ._name_1cmfh_30{padding-left:8px;font-size:16px;font-weight:600;color:#333;line-height:22px;display:flex;align-items:center}._userDetail_1cmfh_12 ._userInfo_1cmfh_18 ._name_1cmfh_30 ._userName_1cmfh_39{max-width:80px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}._userDetail_1cmfh_12 ._userInfo_1cmfh_18 ._buyNum_1cmfh_45{color:#ff802c;font-size:14px;display:flex;align-items:center}._userDetail_1cmfh_12 ._userInfo_1cmfh_18 ._buyNumInfo_1cmfh_51{font-size:12px;color:#6a6a6a;display:flex;align-items:center}._userDetail_1cmfh_12 ._userInfo_1cmfh_18 ._buyNumInfo_1cmfh_51 ._iconBuy_1cmfh_57{margin-right:5px}._userDetail_1cmfh_12 ._userInfo_1cmfh_18 ._info_1cmfh_60{font-size:16px;font-weight:400;color:var(--van-primary);line-height:17px}._userDetail_1cmfh_12 ._userInfo_1cmfh_18 ._info_1cmfh_60._infoVip_1cmfh_66{display:flex;align-items:center}._userDetail_1cmfh_12 ._userInfo_1cmfh_18 ._info_1cmfh_60 ._memberIcon_1cmfh_70{color:#c76e21}._userDetail_1cmfh_12 ._userInfo_1cmfh_18 ._userTitle_1cmfh_73{font-size:18px;color:#1a1a1a;font-weight:600;display:block!important}._videoImg_1cmfh_79{width:100px;height:70px;position:relative}._videoImg_1cmfh_79 ._videoStop_1cmfh_84{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_1cmfh_96{padding-left:8px;font-size:13px;display:flex;flex-direction:column;height:100%;justify-content:space-around}._videoTitle_1cmfh_96 ._videoTitleText_1cmfh_104{font-size:15px;color:#333;max-width:210px}._videoTitle_1cmfh_96 ._videoTitleContent_1cmfh_109{color:#7a7a7a;line-height:18px;display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:2;-webkit-box-orient:vertical}._infoVideo_1cmfh_118{margin-top:10px;padding:8px 10px;border-radius:6px;font-size:13px;line-height:1;display:flex;align-items:center;justify-content:space-between}._infoVideo_1cmfh_118>div{display:flex;align-items:center}._infoVideo_1cmfh_118 img{width:16px;height:16px}._infoVideo_1cmfh_118 span{padding-left:8px;max-width:240px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}._infoVideo_1cmfh_118._albumInfo_1cmfh_143{background:#e0f7f3;color:#2dc7aa}._infoVideo_1cmfh_118._musicInfo_1cmfh_147{background:#ffefe0;color:#ff8900}._courseContent_1il47_1{--el-component-size-large: 48px}._courseContent_1il47_1 .el-input,._courseContent_1il47_1 .el-select--large,._courseContent_1il47_1 .el-form-item--large .el-form-item__label{height:48px;line-height:48px}._courseContent_1il47_1 .el-form-item__label{font-size:16px;color:rgba(0,0,0,.85)}._courseContent_1il47_1 .el-dialog{border-radius:10px;overflow:hidden}._courseContent_1il47_1 .el-dialog__body{padding:0}._courseContent_1il47_1 .el-dialog__footer{background-color:#f6f8f9}._courseContent_1il47_1 .plyr{width:150px;height:85px;min-width:auto}._courseContent_1il47_1 .video-js{width:150px!important;height:85px!important;min-width:auto}._courseContent_1il47_1 .el-loading-mask{height:85px}._courseContent_1il47_1 ._relationList_1il47_37{width:100%;height:48px;position:absolute;top:0;z-index:99;right:0}._albumList_tm2yu_1 .el-button--large{--el-button-size: 48px !important}._albumList_tm2yu_1 .el-pagination .el-input{height:32px;line-height:32px}._tabs_10c1i_1 .el-tabs__nav-wrap:after{background-color:transparent}._imgCover_10c1i_4{width:150px}._courseInfo_10c1i_7{--el-component-size-large: 48px}._courseInfo_10c1i_7 .el-input,._courseInfo_10c1i_7 .el-select--large,._courseInfo_10c1i_7 .el-form-item--large .el-form-item__label{height:48px;line-height:48px}._courseInfo_10c1i_7 .el-form-item__label{font-size:16px;color:rgba(0,0,0,.85)}._courseInfo_10c1i_7 .el-radio-button__inner{border:var(--el-border);border-radius:var(--el-border-radius-base)!important;width:100%;padding:16px 19px!important}._courseInfo_10c1i_7 .el-radio-button__original-radio:checked+.el-radio-button__inner{background-color:#e9fff8;color:var(--el-color-primary);box-shadow:none}\n";document.head.appendChild(__vite_style__);System.register(['./index-legacy.faaab262.js','./index-legacy.3e06faf1.js','./index-legacy.f40047b3.js','./index-legacy.92fe1809.js','./vendor-legacy.2ed87b03.js','./icon_course_list-legacy.45fadc14.js','./icon_album_active-legacy.72d719cb.js','./index-legacy.16163f6a.js','./index-legacy.b5758dd8.js','./index-legacy.6decf365.js','./index-legacy.29059b4f.js','./index-legacy.549530e3.js','./index-legacy.61b0916a.js','./toolsValidate-legacy.b90c63da.js','./lineStart-legacy.cf9abd3c.js','./icon-legacy.aed5a5b3.js','./music-legacy.146bf361.js'],function(exports){'use strict';var ColSteps,state,iconTeacher,getUserType,request,scrollAnimation,ColUpload,ColUploadVideo,reactive,defineComponent,createVNode,ElImage,createTextVNode,ElIcon,Fragment,arrow_right_default,ElRow,ElCol,ElInput,ElButton,ElSkeleton,ElSkeletonItem,ElTabs,ElTabPane,ElMessage,ElForm,ElFormItem,ElTooltip,ElMessageBox,arrow_down_default,ElDialog,ElSelect,ElOption,ElRadioGroup,ElRadioButton,isVNode,iconIn,iconList,iconAlbum,ColVideo,ColEmpty,Pagination,Item,musicLIstItem,ColCropper,verifyNumberIntegerAndFloat;return{setters:[function(module){ColSteps=module.C;},function(module){state=module.c;iconTeacher=module.f;getUserType=module.g;request=module.r;scrollAnimation=module.d;},function(module){ColUpload=module.C;},function(module){ColUploadVideo=module.C;},function(module){reactive=module.r;defineComponent=module.d;createVNode=module.c;ElImage=module.J;createTextVNode=module.a;ElIcon=module.C;Fragment=module.F;arrow_right_default=module.aK;ElRow=module.G;ElCol=module.H;ElInput=module.I;ElButton=module.l;ElSkeleton=module.aw;ElSkeletonItem=module.ax;ElTabs=module.O;ElTabPane=module.P;ElMessage=module.f;ElForm=module.K;ElFormItem=module.L;ElTooltip=module.ae;ElMessageBox=module.k;arrow_down_default=module.aL;ElDialog=module.W;ElSelect=module.ab;ElOption=module.ac;ElRadioGroup=module.al;ElRadioButton=module.am;isVNode=module.ai;},function(module){iconIn=module.i;iconList=module.a;},function(module){iconAlbum=module.a;},function(module){ColVideo=module.C;},function(module){ColEmpty=module.C;},function(module){Pagination=module.P;},function(module){Item=module.I;},function(module){musicLIstItem=module.m;},function(module){ColCropper=module.C;},function(module){verifyNumberIntegerAndFloat=module.v;},function(){},function(){},function(){}],execute:function execute(){var original=function original(){return{groupId:0,active:0,tabIndex:1,loadingStatus:false,rate:0,// 手续费
- video_account_period:0,//平台账期
- subjectList:[],// 声部列表
- templateList:['https://oss.dayaedu.com/video-course/1657853010619green.png','https://oss.dayaedu.com/video-course/1657853051064gray.png','https://oss.dayaedu.com/video-course/1657853062314yellow.png','https://oss.dayaedu.com/video-course/1657853076136linear.png'],// 模板列表
- lessonGroup:{id:null,lessonName:'',lessonSubject:null,lessonDesc:'',payType:'PAY',lessonPrice:null,lessonCoverUrl:'',relationType:'RECOMMEND',lessonCoverTemplateUrl:''},lessonList:[// {
- // videoTitle: '',
- // videoContent: '',
- // videoUrl: '',
- // coverUrl: '',
- // relationList: [],
- // posterUrl: '' // 视频封面图
- // }
- ]};};var createState=reactive(original());// 重置对象
- var resestState=function resestState(){Object.assign(createState,original());};var createSubmit="_createSubmit_1cmfh_7";var introduction="_introduction_1cmfh_7";var userDetail="_userDetail_1cmfh_12";var banner="_banner_1cmfh_12";var userInfo="_userInfo_1cmfh_18";var avatar="_avatar_1cmfh_24";var name="_name_1cmfh_30";var userName="_userName_1cmfh_39";var buyNum="_buyNum_1cmfh_45";var buyNumInfo="_buyNumInfo_1cmfh_51";var iconBuy="_iconBuy_1cmfh_57";var info="_info_1cmfh_60";var infoVip="_infoVip_1cmfh_66";var memberIcon="_memberIcon_1cmfh_70";var userTitle="_userTitle_1cmfh_73";var videoImg="_videoImg_1cmfh_79";var videoStop$1="_videoStop_1cmfh_84";var videoTitle="_videoTitle_1cmfh_96";var videoTitleText="_videoTitleText_1cmfh_104";var videoTitleContent="_videoTitleContent_1cmfh_109";var infoVideo="_infoVideo_1cmfh_118";var albumInfo="_albumInfo_1cmfh_143";var musicInfo="_musicInfo_1cmfh_147";var styles$3={"course-preview":"_course-preview_1cmfh_1",createSubmit:createSubmit,introduction:introduction,userDetail:userDetail,banner:banner,userInfo:userInfo,avatar:avatar,name:name,userName:userName,buyNum:buyNum,buyNumInfo:buyNumInfo,iconBuy:iconBuy,info:info,infoVip:infoVip,memberIcon:memberIcon,userTitle:userTitle,videoImg:videoImg,videoStop:videoStop$1,videoTitle:videoTitle,videoTitleText:videoTitleText,videoTitleContent:videoTitleContent,infoVideo:infoVideo,albumInfo:albumInfo,musicInfo:musicInfo};var videoStop="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA2CAMAAAC/bkrSAAAAAXNSR0IArs4c6QAAAYlQTFRFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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bE3AyTwMFJVB1Q6IrIOdHfB1HC5rAAiTot4NkITOyWgAqEnACQ+AFWug+TxE785yOBCHX7QMDIl6mw7wKUNj4ZIobHsV7qyH0tVQEYMuOwRObB96HWpeyQ1gfxx+9gDw3qJmGb6jOYge7YENT+Y67/QwsPM4bH4+16a3CX7/QpdV+wwAEWYLHMXPXYewpT2tSlHwXgQyN7PvbrsX9lyA8Err3bWL8PEO+DuvCnPmpSii0rqM3vJcRu7b8Il+WNuQXWziBzhTk7szw76sCtbvhvQNuPqJtbi3/Nx+Q3TLi8QtAG8SgzzXsfExug4e6YKq7TDxPXzVCn9e1lGr+54GquUl+zo2QbzxPwoSoV1edgkSE8BxwkwzsIRK2I+FQZbTIC9YMj1XlLZTCS5RGlz/2wlqr+knWg1RCnVyICvPF8rypC3LWWJZji3LDxaQ5fOVZjCRWeLGpJgW986dtfxbMyMnpjgC7J8Xq36zvKHKPhvZfowoh52YexND35y2EaOIBGoRzSmkwG5O2/5lc+pFqtqIGK0Vil2I3Z5jt+fY7bniEkKf0dpJW7D2/B9uhkq/8pKvsQAAAABJRU5ErkJggg==";var CoursePreview=defineComponent({name:'course-preview',computed:{userInfo:function userInfo(){var videoDetail=createState.lessonGroup;var users=state.user.data||{};console.log(users);return{id:users.userId,username:users.username||"\u6E38\u5BA2".concat(users.userId||''),headUrl:users.heardUrl,lessonName:videoDetail.lessonName,buyNum:0,payType:videoDetail.payType,lessonDesc:videoDetail.lessonDesc,lessonPrice:videoDetail.lessonPrice,lessonCoverUrl:videoDetail.lessonCoverTemplateUrl||videoDetail.lessonCoverUrl,lessonNum:createState.lessonList.length};},lessonList:function lessonList(){return createState.lessonList||[];}},render:function render(){console.log(this.userInfo);return createVNode("div",{"class":[styles$3['course-preview'],'pb-3']},[createVNode("div",{"class":styles$3.userDetail},[createVNode(ElImage,{"class":[styles$3.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"},[this.userInfo.lessonName]),createVNode("div",{"class":[styles$3.userInfo,'mx-[14px] py-[14px]']},[createVNode("div",{"class":"flex","style":{alignItems:'center'}},[createVNode(ElImage,{"class":styles$3.avatar,"src":this.userInfo.headUrl||iconTeacher,"fit":""},null),createVNode("div",{"class":styles$3.name},[createVNode("div",{"class":styles$3.userName},[this.userInfo.username||"\u6E38\u5BA2".concat(this.userInfo.id||'')])])]),this.userInfo.payType==='VIP'?createVNode("div",{"class":[styles$3.info]},[createVNode("div",null,[createVNode("span",{"class":styles$3.memberIcon},[createTextVNode("\u4F1A\u5458")]),createTextVNode("/"),this.userInfo.lessonNum,createTextVNode("\u8BFE\u65F6")]),createVNode("div",{"class":styles$3.buyNum},[this.userInfo.buyNum,createTextVNode("\u4EBA\u5B66\u4E60")])]):createVNode("div",{"class":styles$3.info},[createVNode("div",null,[createTextVNode("\uFFE5"),this.userInfo.lessonPrice,createTextVNode("/"),this.userInfo.lessonNum,createTextVNode("\u8BFE\u65F6")]),createVNode("div",{"class":styles$3.buyNum},[this.userInfo.buyNum,createTextVNode("\u4EBA\u5B66\u4E60")])])])])]),createVNode("div",{"class":[styles$3['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$3['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(Fragment,null,[createVNode("div",{"class":"flex"},[createVNode("div",{"class":styles$3.videoImg},[createVNode(ElImage,{"class":"align-middle h-[70px] w-[100px] rounded overflow-hidden","src":item.coverUrl,"fit":"cover"},null),createVNode(ElIcon,{"class":styles$3.videoStop,"size":26},{default:function _default(){return[createVNode("img",{"src":videoStop},null)];}})]),createVNode("div",{"class":[styles$3.videoTitle,'!h-[70px]']},[createVNode("p",{"class":[styles$3.videoTitleText,'whitespace-nowrap overflow-hidden text-ellipsis']},[item.videoTitle]),createVNode("p",{"class":[styles$3.videoTitleContent]},[item.videoContent])])]),item.relationList&&item.relationList.map(function(info){return createVNode("div",{"class":[styles$3.infoVideo,info.relationMusicAlbum==='ALBUM'?styles$3.albumInfo:styles$3.musicInfo]},[createVNode("div",null,[createVNode("img",{"src":info.relationMusicAlbum==='ALBUM'?iconAlbum:iconMusic},null),info.relationMusicAlbum==='ALBUM'?createVNode("span",null,[createTextVNode("\u4E13\u8F91\uFF1A"),info.musicAlbumName]):createVNode("span",null,[createTextVNode("\u66F2\u76EE\uFF1A"),info.musicAlbumName])]),createVNode(ElIcon,null,{default:function _default(){return[createVNode(arrow_right_default,null,null)];}})]);})]);})])])]);}});var courseContent="_courseContent_1il47_1";var relationList="_relationList_1il47_37";var styles$2={courseContent:courseContent,relationList:relationList};var iconDown="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADoAAAA6CAMAAADWZboaAAAAAXNSR0IArs4c6QAAAKtQTFRFAAAA////////9vb28/Pz9PT09PT08/Pz8/Pz8/Pz9PT0DQ0NDg4ODw8PERERExMTFRUVFxcXGBgYGxsbHh4eICAgISEhJCQkQUFBRERER0dHS0tLTExMTk5OVVVVXFxcYWFhjY2Nk5OTlZWVlpaWmJiYmZmZnZ2dpaWlrKyss7Ozub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HRV5FFxlYSuSzxVWuvTTZlflTe6dFsFoPX4UN3q0V0NgOEEYDIEoLbToYc6AINrDBBfBwDUDxq0A0D/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 albumList="_albumList_tm2yu_1";var styles$1={albumList:albumList};var AlbumList=defineComponent({name:'album-list',props:{subjectIds:{type:Number},onSelect:{type:Function,default:function _default(item){}}},data:function data(){return{clientType:'',idAndName:'',pageInfo:{// 分页规则
- limit:8,// 限制显示条数
- page:1,// 当前页
- total:0,// 总条数
- page_size:[8,16]// 选择限制显示条数
- },list:[],loading:false,dataShow:false// 是否有数据
- };},mounted:function mounted(){var clientType=getUserType();if(clientType==='TEACHER')this.clientType=clientType;this.getList();},methods:{onSearch:function onSearch(){this.pageInfo.page=1;this.list=[];this.dataShow=false;this.loading=false;this.getList();},getList:function getList(){var _this=this;return _asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee(){var _yield$request$post,data;return regeneratorRuntime.wrap(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:_this.loading=true;_context.prev=1;_context.next=4;return request.post('/api-website/open/music/album/list',{data:{idAndName:_this.idAndName,albumStatus:1,subjectIds:_this.subjectIds,page:_this.pageInfo.page,rows:_this.pageInfo.limit,clientType:_this.clientType},params:{clientType:getUserType()}});case 4:_yield$request$post=_context.sent;data=_yield$request$post.data;_this.list=data.rows||[];_this.pageInfo.total=data.total;if(data.total<=0){_this.dataShow=true;}_context.next=13;break;case 11:_context.prev=11;_context.t0=_context["catch"](1);case 13:if(_this.dataShow){_this.loading=false;}else{setTimeout(function(){_this.loading=false;},200);}case 14:case"end":return _context.stop();}}},_callee,null,[[1,11]]);}))();}},render:function render(){var _this2=this;return createVNode("div",{"class":styles$1.albumList},[createVNode(ElRow,{"style":{paddingBottom:'16px'}},{default:function _default(){return[createVNode(ElCol,{"span":12},{default:function _default(){return[createVNode(ElInput,{"placeholder":"请输入专辑名称","clearable":true,"size":"large","modelValue":_this2.idAndName,"onUpdate:modelValue":function onUpdateModelValue($event){return _this2.idAndName=$event;}},null)];}}),createVNode(ElCol,{"span":11,"offset":1},{default:function _default(){return[createVNode(ElButton,{"type":"primary","size":"large","onClick":function onClick(){_this2.onSearch();}},{default:function _default(){return[createTextVNode("\u641C\u7D22")];}})];}})];}}),createVNode("div",{"class":"flex flex-wrap"},[createVNode(ElSkeleton,{"loading":this.loading,"animated":true,"class":"px-[14px] flex items-center flex-row justify-between","count":4},{default:function _default(){return[_this2.list.map(function(item){return createVNode(Fragment,null,[createVNode("div",{"class":"w-1/4 pb-5"},[createVNode(Item,{"class":"m-auto","item":item,"onItemClick":function onItemClick(item){_this2.onSelect(_objectSpread({selectType:'ALBUM'},item));}},null)])]);})];},template:function template(){return createVNode("div",{"class":"flex items-center flex-col justify-between w-[156px]"},[createVNode(ElSkeletonItem,{"variant":"image","style":{width:'156px',height:'156px'}},null),createVNode(ElSkeletonItem,{"variant":"p","style":{width:'100%',margin:'4px 0'}},null),createVNode("div",{"class":"flex w-full justify-between"},[createVNode(ElSkeletonItem,{"variant":"p","style":{width:'35%'}},null),createVNode(ElSkeletonItem,{"variant":"p","style":{width:'35%'}},null)])]);}})]),createVNode(Pagination,{"total":this.pageInfo.total,"page":this.pageInfo.page,"onUpdate:page":function onUpdatePage($event){return _this2.pageInfo.page=$event;},"limit":this.pageInfo.limit,"onUpdate:limit":function onUpdateLimit($event){return _this2.pageInfo.limit=$event;},"pageSizes":this.pageInfo.page_size,"pagination":this.getList},null),this.dataShow&&createVNode(ColEmpty,null,null)]);}});var MusicList=defineComponent({name:'album-list',props:{subjectIds:{type:Number},onSelect:{type:Function,default:function _default(item){}}},components:{musicLIstItem:musicLIstItem},data:function data(){return{clientType:'',idAndName:'',pageInfo:{// 分页规则
- limit:5,// 限制显示条数
- page:1,// 当前页
- total:0,// 总条数
- page_size:[5,10]// 选择限制显示条数
- },list:[],loading:false,dataShow:false// 是否有数据
- };},mounted:function mounted(){var clientType=getUserType();if(clientType==='TEACHER')this.clientType=clientType;this.getList();},methods:{onSearch:function onSearch(){this.pageInfo.page=1;this.list=[];this.dataShow=false;this.loading=false;this.getList();},getList:function getList(){var _this3=this;return _asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee2(){var _yield$request$post2,data;return regeneratorRuntime.wrap(function _callee2$(_context2){while(1){switch(_context2.prev=_context2.next){case 0:_this3.loading=true;_context2.prev=1;_context2.next=4;return request.post('/api-website/open/music/sheet/list',{data:{idAndName:_this3.idAndName,subjectIds:_this3.subjectIds,albumStatus:'PASS',page:_this3.pageInfo.page,rows:_this3.pageInfo.limit,state:1},params:{clientType:getUserType()}});case 4:_yield$request$post2=_context2.sent;data=_yield$request$post2.data;_this3.list=data.rows||[];_this3.pageInfo.total=data.total;if(data.total<=0){_this3.dataShow=true;}_context2.next=13;break;case 11:_context2.prev=11;_context2.t0=_context2["catch"](1);case 13:if(_this3.dataShow){_this3.loading=false;}else{setTimeout(function(){_this3.loading=false;},200);}case 14:case"end":return _context2.stop();}}},_callee2,null,[[1,11]]);}))();}},render:function render(){var _this4=this;return createVNode(Fragment,null,[createVNode(ElRow,{"style":{paddingBottom:'16px'}},{default:function _default(){return[createVNode(ElCol,{"span":12},{default:function _default(){return[createVNode(ElInput,{"placeholder":"请输入曲目名称","clearable":true,"size":"large","modelValue":_this4.idAndName,"onUpdate:modelValue":function onUpdateModelValue($event){return _this4.idAndName=$event;}},null)];}}),createVNode(ElCol,{"span":11,"offset":1},{default:function _default(){return[createVNode(ElButton,{"type":"primary","size":"large","onClick":function onClick(){_this4.onSearch();}},{default:function _default(){return[createTextVNode("\u641C\u7D22")];}})];}})];}}),createVNode("div",{"class":"mt-2"},[createVNode(ElSkeleton,{"loading":this.loading,"animated":true,"class":" w-full m-auto px-[14px] flex items-center flex-col","count":3},{default:function _default(){return[_this4.list.map(function(item){return createVNode(musicLIstItem,{"item":item,"hiddenCollect":true,"isClick":true,"onClick":function onClick(item){_this4.onSelect(_objectSpread({selectType:'MUSIC'},item));}},null);})];},template:function template(){return createVNode("div",{"class":"h-[94px] flex items-center justify-between w-full pt-2 mb-2"},[createVNode("div",{"class":"w-2/3 flex items-center"},[createVNode(ElSkeletonItem,{"variant":"circle","style":{width:'88px',height:'88px'}},null),createVNode("div",{"class":"w-1/2 pl-2"},[createVNode(ElSkeletonItem,{"variant":"h3"},null),createVNode(ElSkeletonItem,{"variant":"p","style":{width:'50%'}},null)])]),createVNode(ElSkeletonItem,{"variant":"p","style":{width:'20%'}},null)]);}})]),createVNode(Pagination,{"total":this.pageInfo.total,"page":this.pageInfo.page,"onUpdate:page":function onUpdatePage($event){return _this4.pageInfo.page=$event;},"limit":this.pageInfo.limit,"onUpdate:limit":function onUpdateLimit($event){return _this4.pageInfo.limit=$event;},"pageSizes":this.pageInfo.page_size,"pagination":this.getList},null),this.dataShow&&createVNode(ColEmpty,{"style":{marginBottom:'30px'}},null)]);}});var SelectMusicAlbum=defineComponent({name:'select-music-album',props:{subjectIds:{type:Number},onSelect:{type:Function,default:function _default(item){}}},data:function data(){return{tabVal:'music'};},render:function render(){var _this5=this;return createVNode("div",{"style":"padding: 0 16px 16px;"},[createVNode(ElTabs,{"modelValue":this.tabVal,"onUpdate:modelValue":function onUpdateModelValue($event){return _this5.tabVal=$event;}},{default:function _default(){return[createVNode(ElTabPane,{"label":"曲目","name":"music"},{default:function _default(){return[createVNode(MusicList,{"subjectIds":_this5.subjectIds,"onSelect":function onSelect(item){_this5.onSelect(item);}},null)];}}),createVNode(ElTabPane,{"label":"专辑","name":"album"},{default:function _default(){return[createVNode(AlbumList,{"subjectIds":_this5.subjectIds,"onSelect":function onSelect(item){_this5.onSelect(item);}},null)];}})];}})]);}});var CourseContent=defineComponent({name:'course-content',data:function data(){return{show:false,form:{lessonList:[{key:1,videoTitle:'',videoContent:'',videoUrl:'',relationList:[],coverUrl:''}]},musicStatus:false,selectItem:{}// 选中的课程
- };},methods:{handleUpload:function handleUpload(urls){console.log(urls);// 上传视频连接s
- var urlList=urls||[];urlList.forEach(function(item){createState.lessonList.push({videoTitle:'',videoContent:'',videoUrl:item,relationList:[],coverUrl:''});});},handleSubmit:function handleSubmit(){var _this6=this;this.$refs.form.validate(/*#__PURE__*/function(){var _ref=_asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee3(valid){return regeneratorRuntime.wrap(function _callee3$(_context3){while(1){switch(_context3.prev=_context3.next){case 0:if(!valid){_context3.next=8;break;}if(!(createState.lessonList.length<=0)){_context3.next=4;break;}ElMessage.error('请上传课程视频');return _context3.abrupt("return");case 4:// 提交数据
- console.log('提交数据');_this6.show=true;_context3.next=10;break;case 8:_this6.$nextTick(function(){var isError=document.getElementsByClassName('is-error');isError[0].scrollIntoView({block:'center',behavior:'smooth'});});return _context3.abrupt("return",false);case 10:case"end":return _context3.stop();}}},_callee3);}));return function(_x){return _ref.apply(this,arguments);};}());},createSubmit:function createSubmit(){var _this7=this;return _asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee4(){var videoDetail,params;return regeneratorRuntime.wrap(function _callee4$(_context4){while(1){switch(_context4.prev=_context4.next){case 0:_context4.prev=0;videoDetail=createState.lessonGroup;params={lessonList:createState.lessonList,lessonGroup:_objectSpread(_objectSpread({},videoDetail),{},{lessonPrice:videoDetail.payType==='VIP'?0:videoDetail.lessonPrice,lessonCoverUrl:videoDetail.lessonCoverTemplateUrl||videoDetail.lessonCoverUrl})};if(!createState.groupId){_context4.next=9;break;}_context4.next=6;return request.post('/api-website/videoLessonGroup/update',{data:params});case 6:ElMessage.success('修改成功');_context4.next=12;break;case 9:_context4.next=11;return request.post('/api-website/videoLessonGroup/add',{data:params});case 11:ElMessage.success('创建成功');case 12:sessionStorage.setItem('videoActiveName','DOING');_this7.$router.back();_context4.next=18;break;case 16:_context4.prev=16;_context4.t0=_context4["catch"](0);case 18:case"end":return _context4.stop();}}},_callee4,null,[[0,16]]);}))();},swapItems:function swapItems(arr,index1,index2){arr[index1]=arr.splice(index2,1,arr[index1])[0];return arr;},getName:function getName(item){var relation=item.relationList.length>0?item.relationList[0]:null;return relation?(relation.relationMusicAlbum==='ALBUM'?'专辑:':'曲目:')+relation.musicAlbumName:'';}},render:function render(){var _this8=this;return createVNode("div",{"class":styles$2.courseContent},[createVNode(ElForm,{"class":"px-6 pb-10 pt-7 min-h-[280px]","size":"large","labelWidth":'140px',"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){_this8.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(){_this8.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(){_this8.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,"preview":true,"src":item.videoUrl,"volume":false},null),createVNode("p",null,null)];}})];}}),createVNode(ElCol,{"span":11},{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(ElFormItem,{"label":"关联曲目或专辑","prop":"lessonList.".concat(index,".relationList"),"onClick":function onClick(){_this8.selectItem=item;_this8.musicStatus=true;}},{default:function _default(){return[createVNode("div",{"class":styles$2.relationList},null),createVNode(ElInput,{"placeholder":"请选择关联曲目或专辑","modelValue":item.relationList.length>0?_this8.getName(item):'',"readonly":true,"suffixIcon":arrow_down_default},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 _this8.show=$event;},"width":375,"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(){_this8.show=false;}},{default:function _default(){return[createTextVNode("\u8FD4\u56DE\u7F16\u8F91")];}}),createVNode(ElButton,{"size":"large","round":true,"type":"primary","onClick":_this8.createSubmit},{default:function _default(){return[createState.groupId?'确认修改':'创建完成'];}})]);}}),createVNode(ElDialog,{"modelValue":this.musicStatus,"onUpdate:modelValue":function onUpdateModelValue($event){return _this8.musicStatus=$event;},"title":"选择曲目或专辑","width":750},{default:function _default(){return[createVNode(SelectMusicAlbum,{"subjectIds":createState.lessonGroup.lessonSubject,"onSelect":function onSelect(item){_this8.musicStatus=false;_this8.selectItem.relationList=[{musicAlbumId:item.id,musicAlbumName:item.selectType==='ALBUM'?item.albumName:item.musicSheetName,relationMusicAlbum:item.selectType,useRelationType:'RECOMMEND'}];}},null)];}})]);}});var tabs="_tabs_10c1i_1";var imgCover="_imgCover_10c1i_4";var courseInfo="_courseInfo_10c1i_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 _this9=this;// 选择的科目
- var tempStr='';this.subjectList.forEach(function(item){if(_this9.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 _callee5(){var res,rate,price;return regeneratorRuntime.wrap(function _callee5$(_context5){while(1){switch(_context5.prev=_context5.next){case 0:_context5.prev=0;if(!(createState.subjectList.length<=0)){_context5.next=6;break;}_context5.next=4;return request.post('/api-website/teacher/querySubject');case 4:res=_context5.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)
- _context5.next=12;break;case 10:_context5.prev=10;_context5.t0=_context5["catch"](0);case 12:case"end":return _context5.stop();}}},_callee5,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 _this10=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":"请选择课程声部","onChange":function onChange(){createState.lessonList.forEach(function(item){item.relationList=[];});}},_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":"payType","rules":[{required:true,message:'请选择收费方式'}]},{default:function _default(){return[createVNode(ElRadioGroup,{"modelValue":createState.lessonGroup.payType,"onUpdate:modelValue":function onUpdateModelValue($event){return createState.lessonGroup.payType=$event;}},{default:function _default(){return[createVNode(ElRadioButton,{"label":'PAY',"class":"mr-3 w-24"},{default:function _default(){return[createTextVNode("\u8D2D\u4E70")];}}),createVNode(ElRadioButton,{"label":'VIP',"class":"w-24"},{default:function _default(){return[createTextVNode("\u4F1A\u5458")];}})];}})];}}),createState.lessonGroup.payType==='PAY'&&createVNode(Fragment,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":_this10.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]"},[_this10.calcRatePrice]),createTextVNode("\u5143/\u4EBA")]),createVNode("p",null,[createTextVNode("\u60A8\u7684\u8BFE\u7A0B\u6536\u5165\u5C06\u5728\u5B66\u5458\u8D2D\u4E70"),createState.video_account_period,createTextVNode("\u5929\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(){_this10.$refs.form.validate(/*#__PURE__*/function(){var _ref2=_asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee6(valid){var currentY;return regeneratorRuntime.wrap(function _callee6$(_context6){while(1){switch(_context6.prev=_context6.next){case 0:if(!valid){_context6.next=6;break;}createState.active=1;currentY=document.documentElement.scrollTop||document.body.scrollTop;scrollAnimation(currentY,0);_context6.next=8;break;case 6:_this10.$nextTick(function(){var isError=document.getElementsByClassName('is-error');isError[0].scrollIntoView({block:'center',behavior:'smooth'});});return _context6.abrupt("return",false);case 8:case"end":return _context6.stop();}}},_callee6);}));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 _this11=this;return _asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee7(){var query,res,result,_result$lessonGroup,auditStatus,lessonCoverUrl,lessonPrice,lessonDesc,payType,lessonSubject,lessonName,id,group;return regeneratorRuntime.wrap(function _callee7$(_context7){while(1){switch(_context7.prev=_context7.next){case 0:// 重置数据
- resestState();query=_this11.$route.query;createState.groupId=Number(query.groupId)||0;// 判断是否是编辑
- if(createState.groupId){_context7.next=5;break;}return _context7.abrupt("return",false);case 5:_context7.prev=5;createState.loadingStatus=true;_context7.next=9;return request.get('/api-website/videoLessonGroup/selectVideoLesson',{params:{groupId:createState.groupId}});case 9:res=_context7.sent;result=res.data;_result$lessonGroup=result.lessonGroup,auditStatus=_result$lessonGroup.auditStatus,lessonCoverUrl=_result$lessonGroup.lessonCoverUrl,lessonPrice=_result$lessonGroup.lessonPrice,lessonDesc=_result$lessonGroup.lessonDesc,payType=_result$lessonGroup.payType,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,payType:payType,lessonPrice:lessonPrice,relationType:'RECOMMEND',// lessonCoverTemplateUrl: statusUrl ? lessonCoverUrl : '',
- lessonCoverUrl:lessonCoverUrl};createState.lessonList=[];result.detailList&&result.detailList.forEach(function(item){var tempInfo=item.musicAlbumInfos||[];var relationList=tempInfo.map(function(info){return{relationMusicAlbum:info.relationType,musicAlbumName:info.name,musicAlbumId:info.musicAlbumId,relationId:info.id,useRelationType:'RECOMMEND'};});createState.lessonList.push({videoTitle:item.videoTitle,videoContent:item.videoContent,videoUrl:item.videoUrl,coverUrl:item.coverUrl,relationList:relationList,posterUrl:item.posterUrl// 视频封面图
- });});createState.loadingStatus=false;_context7.next=20;break;case 18:_context7.prev=18;_context7.t0=_context7["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 _context7.stop();}}},_callee7,null,[[5,18]]);}))();},mounted:function mounted(){var _this12=this;return _asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee8(){return regeneratorRuntime.wrap(function _callee8$(_context8){while(1){switch(_context8.prev=_context8.next){case 0:document.title=_this12.type==='create'?'新建视频课':'编辑视频课';try{// const sysConfig = await request.get(
- // '/api-website/sysConfig/queryByParamName',
- // {
- // params: {
- // paramName: 'video_lesson_service_fee'
- // }
- // }
- // )
- // createState.rate = sysConfig.data.paramValue
- request.get('/api-website/sysConfig/queryByParamNameList',{params:{paramNames:'video_lesson_service_fee,video_account_period'}}).then(function(res){var data=res.data||[];data.forEach(function(item){if(item.paramName==='video_lesson_service_fee'){createState.rate=item.paramValue;}else if(item.paramName==='video_account_period'){createState.video_account_period=item.paramValue;}});});}catch(_unused6){}case 2:case"end":return _context8.stop();}}},_callee8);}))();},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)])]);}}));}};});})();
|