create.378cbd8a.js 29 KB

1
  1. import{Q as K,d as S,w as c,g as v,j as t,z as a,B as b,C as Y,D as R,F as g,M as U,T as E,n as H,Z as Q}from"./index.e6d6174e.js";import{G as Z,a as y}from"./index.c3601b28.js";import{S as C}from"./index.9093bc60.js";import{C as f,a as r}from"./index.3dbd60dd.js";import{C as T}from"./index.62005a6f.js";import{C as w}from"./index.80eb2440.js";import{v as O}from"./toolsValidate.add49407.js";import{R as D,C as B}from"./index.83d3716a.js";import"./index.af99cf22.js";import{F as u}from"./index.17d70acf.js";import{S as x}from"./index.68e8d63d.js";import{F as M}from"./index.41be4a84.js";import{C as J}from"./index.527b7753.js";import{S as X}from"./index.c42f80e3.js";import{M as _}from"./index.f5daa90d.js";import{S as $}from"./index.311acfa6.js";import{L as V}from"./index.f904775d.js";import"./index.b4a53c6a.js";import{T as ee,a as I}from"./index.54627972.js";import{U as te}from"./index.af98ec6d.js";import{S as N}from"./index.884a0e76.js";import{C as se}from"./index.43f63892.js";import"./index.67c54471.js";import"./index.4324e3af.js";import"./use-id.f239f36f.js";import"./index.3d7e5752.js";import"./index.d92a5aca.js";import"./index.cbc70232.js";import"./checkbox_default.8d9b037b.js";import"./index.c67b3500.js";import"./icon-xin.df8ab2d7.js";import"./icon_uploader.9f387137.js";import"./icon_album.fa329df6.js";import"./icon_album_active.ce98b2a8.js";import"./icon_exquisite.69e33c80.js";import"./icon_music_active.3b316ab8.js";import"./icon-play.bc9e7aab.js";import"./use-tab-status.e9ba8498.js";import"./use-refs.eb803454.js";import"./index.4aea64de.js";import"./icon_teacher.40b6f077.js";import"./icon_timer2.5fb1750d.js";import"./icon-jiaozi.20e415ca.js";import"./index.05f2b7dd.js";import"./bars.4f1962a6.js";const oe="_gridName_10d6c_1",le="_active_10d6c_8",ae="_gridColumn_10d6c_14";var d={"video-create":"_video-create_10d6c_1",gridName:oe,active:le,gridColumn:ae};const ie="_classInfo_umod2_1",ue="_infoField_umod2_1",re="_boxStyle_umod2_14",ne="_imgContainer_umod2_34",ce="_btnGroup_umod2_48",me="_photoTip_umod2_61";var p={classInfo:ie,infoField:ue,boxStyle:re,imgContainer:ne,btnGroup:ce,"class-info-tip":"_class-info-tip_umod2_52",photoTip:me};const s=K({groupId:0,active:1,tabIndex:1,loadingStatus:!1,rate:0,video_account_period: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:"",relationType:"RECOMMEND",lessonCoverTemplateUrl:""},lessonList:[{videoTitle:"",videoContent:"",videoUrl:"",coverUrl:"",relationList:[],posterUrl:""}]});var de=S({name:"ClassInfo",data(){return{subjectStatus:!1,checked:!1}},computed:{choiceSubjectIds(){const e=s.lessonGroup.lessonSubject?Number(s.lessonGroup.lessonSubject):null;return console.log(e),e?[e]:[]},subjectList(){return s.subjectList||[]},lessonSubjectName(){let e="";return this.subjectList.forEach(o=>{this.choiceSubjectIds.includes(o.id)&&(e=o.name)}),e},calcRatePrice(){let e=s.rate||0,o=s.lessonGroup.lessonPrice||0;return(o-e/100*o).toFixed(2)}},async mounted(){try{if(s.subjectList.length<=0){const o=await c.post("/api-teacher/teacher/querySubject");s.subjectList=o.data||[]}const e=await c.post("/api-teacher/open/appVersion",{data:{platform:v.platformType==="STUDENT"?"ios-student":"ios-teacher",version:v.version}});this.checked=!!e.data.check,this.checked&&(s.lessonGroup.lessonPrice=0)}catch{}},methods:{onChoice(e){e!=s.lessonGroup.lessonSubject&&s.lessonList.forEach(o=>{o.relationList=[]}),s.lessonGroup.lessonSubject=e,this.subjectStatus=!1},onFormatter(e){return O(e)},tabChange(e){this.$refs.form.resetValidation("lessonCoverTemplateUrl"),this.$refs.form.resetValidation("lessonCoverUrl"),s.tabIndex=e},selectImg(e){s.lessonGroup.lessonCoverUrl="",s.lessonGroup.lessonCoverTemplateUrl=e}},render(){return s.loadingStatus?t("div",null,null):t(M,{class:p.classInfo,ref:"form",onSubmit:()=>s.active=2,onFailed:e=>console.log(e),scrollToError:!0},{default:()=>[t(f,null,{default:()=>[t(r,{title:"\u8BFE\u7A0B\u540D\u79F0",required:!0},{default:()=>[t(u,{modelValue:s.lessonGroup.lessonName,"onUpdate:modelValue":e=>s.lessonGroup.lessonName=e,name:"lessonName",maxlength:50,placeholder:"\u8BF7\u8F93\u5165\u60A8\u7684\u8BFE\u7A0B\u540D\u79F0",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u60A8\u7684\u8BFE\u7A0B\u540D\u79F0"}]},null)]}),t(r,{title:"\u8BFE\u7A0B\u58F0\u90E8",required:!0},{default:()=>[t(u,{modelValue:this.lessonSubjectName,name:"lessonSubjectName",readonly:!0,isLink:!0,onClick:()=>{this.subjectStatus=!0},rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u8BFE\u7A0B\u58F0\u90E8"}],placeholder:"\u8BF7\u9009\u62E9\u8BFE\u7A0B\u58F0\u90E8"},null)]})]}),t(f,null,{default:()=>[t(r,{title:"\u8BFE\u7A0B\u4ECB\u7ECD",required:!0,border:!1},{default:()=>[t(u,{modelValue:s.lessonGroup.lessonDesc,"onUpdate:modelValue":e=>s.lessonGroup.lessonDesc=e,name:"lessonDesc",placeholder:"\u8BF7\u8F93\u5165\u8BFE\u7A0B\u4ECB\u7ECD",rows:"3",maxlength:200,showWordLimit:!0,autosize:!0,rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8BFE\u7A0B\u4ECB\u7ECD"}],type:"textarea"},null)]})]}),!this.checked&&t(f,null,{default:()=>[t(r,{title:"\u8BFE\u7A0B\u7EC4\u552E\u4EF7",required:!0},{default:()=>[t(u,{modelValue:s.lessonGroup.lessonPrice,"onUpdate:modelValue":e=>s.lessonGroup.lessonPrice=e,name:"lessonPrice",placeholder:"\u8BF7\u8F93\u5165\u60A8\u7684\u8BFE\u7A0B\u7EC4\u552E\u4EF7",formatter:this.onFormatter,type:"number",maxlength:8,rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u60A8\u7684\u8BFE\u7A0B\u7EC4\u552E\u4EF7"}]},{button:()=>t("span",null,[a("\u5143")])})]})]}),t("div",{class:p["class-info-tip"]},[t("p",null,[a("\u6263\u9664\u624B\u7EED\u8D39\u540E\u60A8\u7684\u8BFE\u7A0B\u9884\u8BA1\u6536\u5165\u4E3A\uFF1A")]),t("p",null,[a("\u8BFE\u7A0B\u7EC4\u603B\u6536\u5165"),t("span",null,[this.calcRatePrice]),a("\u5143/\u4EBA")]),t("p",null,[a("\u60A8\u7684\u8BFE\u7A0B\u6536\u5165\u5C06\u5728\u5B66\u5458\u8D2D\u4E70"),s.video_account_period,a("\u5929\u540E\u7ED3\u7B97\u5230\u60A8\u7684\u8D26\u6237\u4E2D")])]),t(f,null,{default:()=>[t(r,{required:!0,border:!1},{default:()=>[t("p",{class:p.photoTip},[a("\u6A21\u677F\u56FE\u7247\u5C06\u4F5C\u4E3A\u8BE5\u8BFE\u7A0B\u5C01\u9762\u4E3A\u5B66\u5458\u5C55\u793A")]),t(u,{name:"lessonCoverUrl",rules:[{required:!0,message:"\u8BF7\u4E0A\u4F20\u81EA\u5B9A\u4E49\u6A21\u677F"}]},{input:()=>t(D,{justify:"space-between",style:{width:"100%"}},{default:()=>[t(B,{span:12,class:p.imgContainer},{default:()=>[t(w,{cropper:!0,bucket:"video-course",options:{fixedNumber:[1.77,1],autoCropWidth:750,autoCropHeight:424},onUploadChange:e=>{e&&(s.lessonGroup.lessonCoverTemplateUrl="")},modelValue:s.lessonGroup.lessonCoverUrl,"onUpdate:modelValue":e=>s.lessonGroup.lessonCoverUrl=e,class:p.imgContainer},null)]}),t(B,{span:24},{default:()=>[t("p",{class:p.photoTip,style:{color:"#ff4e19",padding:"0"}},[a("\u56FE\u7247\u5C3A\u5BF8\u4E3A750*424\u80FD\u8FBE\u5230\u6700\u4F73\u663E\u793A\u6548\u679C")])]})]})})],title:()=>t("p",null,[a("\u8BF7\u4E0A\u4F20\u81EA\u5B9A\u4E49\u6A21\u677F")])})]}),t(C,{offsetBottom:0,position:"bottom"},{default:()=>[t("div",{class:["btnGroup"]},[t(b,{block:!0,round:!0,type:"primary","native-type":"submit"},{default:()=>[a("\u4E0B\u4E00\u6B65")]})])]}),t(T,{modelValue:this.subjectStatus,"onUpdate:modelValue":e=>this.subjectStatus=e,destroy:!0},{default:()=>[t(x,{selectType:"Radio",single:!0,subjectList:s.subjectList,choiceSubjectIds:this.choiceSubjectIds,onChoice:this.onChoice},null)]})]})}});const pe="_upload_1784h_1",he="_disabled_1784h_7",ge="_titleSection_1784h_10",be="_title_1784h_10",Ae="_createVideoTips_1784h_47";var n={"class-content":"_class-content_1784h_1",upload:pe,disabled:he,titleSection:ge,title:be,"add-item":"_add-item_1784h_32",createVideoTips:Ae};const fe="_musicAlbum_1md18_1",ve="_musicSong_1md18_6",Se="_musicName_1md18_10",Ce="_author_1md18_13",Le="_musicGrid_1md18_16";var h={musicAlbum:fe,musicSong:ve,musicName:Se,author:Ce,musicGrid:Le},Be=S({name:"music-album",props:{subjectId:{type:Number,required:!0},onSelect:{type:Function,default:e=>{}}},data(){return{tabVal:"music",dataShow:!0,lockLoading:!1,musicState:{loading:!1,finished:!1},musicList:[],musicParams:{myself:!1,auditStatus:"PASS",page:1,rows:20,idAndName:"",subjectIds:this.subjectId},albumState:{loading:!1,finished:!1},albumList:[],albumParams:{page:1,rows:20,idAndName:"",subjectIds:this.subjectId}}},async mounted(){await this.getMusicList()},methods:{onSearch(e){this.musicParams.idAndName=e,this.albumParams.idAndName=e,this.tabVal==="music"?(this.musicParams.page=1,this.musicList=[],this.getMusicList()):this.tabVal==="album"&&(this.albumParams.page=1,this.albumList=[],this.getAlbumList())},async getMusicList(){try{if(this.lockLoading)return;this.lockLoading=!0,this.dataShow=!0;const e=await c.post(`${v.platformApi}/music/sheet/list`,{data:{...this.musicParams}});this.lockLoading=!1,this.musicState.loading=!1;const o=e.data||{};this.musicList=this.musicList.concat(o.rows||[]),this.musicState.finished=o.pageNo>=o.totalPage,this.musicParams.page=o.pageNo+1,this.dataShow=this.musicList.length>0}catch{this.dataShow=!1,this.musicState.finished=!0,this.lockLoading=!1}},async getAlbumList(){try{if(this.lockLoading)return;this.lockLoading=!0,this.dataShow=!0;const e=await c.post(`${v.platformApi}/music/album/list`,{data:{...this.albumParams}});this.lockLoading=!1,this.albumState.loading=!1;const o=e.data||{};this.albumList=this.albumList.concat(o.rows||[]),this.albumState.finished=o.pageNo>=o.totalPage,this.albumParams.page=o.pageNo+1,this.dataShow=this.albumList.length>0}catch{this.dataShow=!1,this.albumState.finished=!0,this.lockLoading=!1}}},render(){return t("div",{class:h.musicAlbum},[t(C,{position:"top",offsetTop:0},{default:()=>[t(X,{onSearch:this.onSearch,placeholder:"\u8BF7\u8F93\u5165\u66F2\u76EE\u6216\u4E13\u8F91\u540D\u79F0"},null),t(ee,{active:this.tabVal,"onUpdate:active":e=>this.tabVal=e,color:"var(--van-primary)",lineWidth:25,onChange:e=>{e==="music"?(this.musicParams.page=1,this.musicList=[],this.getMusicList()):e==="album"&&(this.albumParams.page=1,this.albumList=[],this.getAlbumList())}},{default:()=>[t(I,{title:"\u66F2\u76EE",name:"music"},null),t(I,{title:"\u4E13\u8F91",name:"album"},null)]})]}),t("div",{class:h.container},[this.dataShow&&this.tabVal==="music"&&t(V,{loading:this.musicState.loading,"onUpdate:loading":e=>this.musicState.loading=e,finished:this.musicState.finished,finishedText:" ",onLoad:this.getMusicList,immediateCheck:!1},{default:()=>[t("div",{class:h.musicSong},[t($,{list:this.musicList,musicNameClass:h.musicName,authorClass:h.author,showPlay:!1,onDetail:e=>{this.onSelect({selectType:"MUSIC",...e})}},null)])]}),this.dataShow&&this.tabVal==="album"&&t(V,{loading:this.albumState.loading,"onUpdate:loading":e=>this.albumState.loading=e,finished:this.albumState.finished,finishedText:" ",onLoad:this.getAlbumList,immediateCheck:!1},{default:()=>[t("div",{class:h.musicGrid},[t(_,{list:this.albumList,onGoto:e=>{this.onSelect({selectType:"ALBUM",...e})}},null)])]}),!this.dataShow&&t(Y,{btnStatus:!1,classImgSize:"SMALL",tips:"\u6682\u65E0\u6570\u636E"},null)])])}}),Ue=S({name:"ClassContent",data(){return{url:"",checked:null,musicStatus:!1,selectItem:{}}},methods:{onSubmit(e){s.active=3},addItem(){s.lessonList.push({videoTitle:"",videoContent:"",videoUrl:"",coverUrl:"",relationList:[],posterUrl:""})},removeItem(e){s.lessonList.length<=1||R.confirm({title:"\u64CD\u4F5C",message:"\u786E\u5B9A\u5220\u9664\u8BE5\u6761\u6570\u636E\u5417\uFF1F",confirmButtonColor:"#2DC7AA"}).then(()=>{s.lessonList.splice(e,1)})},getName(e){const o=e.relationList.length>0?e.relationList[0]:null;return o?(o.relationMusicAlbum==="ALBUM"?"\u4E13\u8F91\uFF1A":"\u66F2\u76EE\uFF1A")+o.musicAlbumName:""}},render(){return t(M,{class:n["class-content"],onSubmit:this.onSubmit,scrollToError:!0},{default:()=>[t("div",{class:n.createVideoTips},[a("\u60A8\u53EF\u4E3A\u6BCF\u4E2A\u89C6\u9891\u5173\u8054\u66F2\u76EE\u6216\u4E13\u8F91\u4F5C\u4E3A\u672C\u8BFE\u7A0B\u6559\u5B66\u5185\u5BB9\u63A8\u8350")]),s.lessonList.map((e,o)=>t(g,null,[t("div",{class:n.titleSection},[t("span",{class:n.title},[a("\u7B2C"),o+1,a("\u8BFE")]),t(U,{name:"delete-o",style:{fontWeight:600},class:s.lessonList.length<=1?n.disabled:null,onClick:()=>this.removeItem(o),size:20},null)]),t(f,null,{default:()=>[t(r,{title:"\u8BFE\u7A0B\u6807\u9898",required:!0},{default:()=>[t(u,{modelValue:e.videoTitle,"onUpdate:modelValue":l=>e.videoTitle=l,maxlength:50,rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8BFE\u7A0B\u6807\u9898"}],name:"videoTitle",placeholder:"\u8BF7\u8F93\u5165\u60A8\u7684\u8BFE\u7A0B\u6807\u9898"},null)]}),t(r,{title:"\u8BFE\u7A0B\u5185\u5BB9",required:!0},{default:()=>[t(u,{modelValue:e.videoContent,"onUpdate:modelValue":l=>e.videoContent=l,type:"textarea",rows:"2",autosize:!0,showWordLimit:!0,maxlength:200,rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8BFE\u7A0B\u5185\u5BB9"}],name:"videoContent",placeholder:"\u8BF7\u8F93\u5165\u60A8\u7684\u8BFE\u7A0B\u5185\u5BB9"},null)]}),t(r,{title:"\u8BFE\u7A0B\u89C6\u9891\u53CA\u89C6\u9891\u5C01\u9762",required:!0,border:!1},{default:()=>[t(D,{justify:"space-between",style:{width:"100%",paddingTop:"12px"}},{default:()=>[t(B,{span:12},{default:()=>[t(u,{style:{padding:0},name:"videoUrl",rules:[{required:!0,message:"\u8BF7\u4E0A\u4F20\u8BFE\u7A0B\u89C6\u9891"}]},{input:()=>t(J,{bucket:"video-course",modelValue:e.videoUrl,"onUpdate:modelValue":l=>e.videoUrl=l,posterUrl:e.posterUrl,"onUpdate:posterUrl":l=>e.posterUrl=l,class:n.upload,tips:"\u70B9\u51FB\u4E0A\u4F20\u89C6\u9891"},null)})]}),t(B,{span:12},{default:()=>[t(u,{style:{padding:0},name:"coverUrl",rules:[{required:!0,message:"\u8BF7\u4E0A\u4F20\u8BFE\u7A0B\u5C01\u9762"}],error:!0},{input:()=>t(w,{class:n.upload,cropper:!0,bucket:"video-course",options:{fixedNumber:[1.77,1],autoCropWidth:750,autoCropHeight:424},modelValue:e.coverUrl,"onUpdate:modelValue":l=>e.coverUrl=l,tips:"\u70B9\u51FB\u4E0A\u4F20\u89C6\u9891\u5C01\u9762"},null)})]})]})]}),t(r,{title:"\u5173\u8054\u66F2\u76EE\u6216\u4E13\u8F91"},{default:()=>[t(u,{modelValue:e.relationList.length>0&&e.relationList[0].musicAlbumId?this.getName(e):"",readonly:!0,isLink:!0,clickable:!1,clearable:!0,rightIcon:e.relationList.length>0&&e.relationList[0].musicAlbumId?"clear":"","onClick-right-icon":l=>{l.stopPropagation(),e.relationList[0].musicAlbumId=0,e.relationList[0].musicAlbumName=""},onClick:()=>{this.selectItem=e,this.musicStatus=!0},placeholder:"\u8BF7\u9009\u62E9\u5173\u8054\u66F2\u76EE\u6216\u4E13\u8F91"},null)]})]})])),t(b,{class:n["add-item"],block:!0,icon:"add-o",onClick:this.addItem},{default:()=>[a("\u6DFB\u52A0\u8BFE\u7A0B")]}),t(C,{offsetBottom:0,position:"bottom",zIndex:999999},{default:()=>[t("div",{class:["btnGroup","btnMore"]},[t(b,{block:!0,round:!0,type:"primary",plain:!0,onClick:()=>{s.active=1}},{default:()=>[a("\u4E0A\u4E00\u6B65")]}),t(b,{block:!0,round:!0,type:"primary","native-type":"submit"},{default:()=>[a("\u63D0\u4EA4")]})])]}),t(T,{modelValue:this.musicStatus,"onUpdate:modelValue":e=>this.musicStatus=e,zIndex:999999},{default:()=>[t(Be,{subjectId:s.lessonGroup.lessonSubject,onSelect:e=>{this.musicStatus=!1,this.selectItem.relationList.length>0?(this.selectItem.relationList[0].musicAlbumId=e.id,this.selectItem.relationList[0].musicAlbumName=e.selectType==="ALBUM"?e.albumName:e.musicSheetName,this.selectItem.relationList[0].relationMusicAlbum=e.selectType):this.selectItem.relationList=[{musicAlbumId:e.id,musicAlbumName:e.selectType==="ALBUM"?e.albumName:e.musicSheetName,relationMusicAlbum:e.selectType,useRelationType:"RECOMMEND"}]}},null)]})]})}}),Fe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEwAAABMCAYAAADHl1ErAAAAAXNSR0IArs4c6QAACOhJREFUeNrtnFtTFEcUx/cpVXnKR0i+QKqSF5MoIHhBjBoBxYdUHkxSlVipinn1IWWlNErMg9GoiUnlIYm5VfmSRMAbchHBeAMWQa67y2UZWMC7sCPLbuecnntPz+zC9OKCQ9W/dpddZnp/9Dl9+vT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Z1p+yFqWg+MZWFLDOXoXmvsvglWO6KvQMnAcVYp8jKHBWlFzhg57m+U21Mlq2dzrvW1ZgUh1lplWfMJl5mS1trUXuaE2zrWRe5SF45JEYKoEpxw6rNJENfQMa0VNEb0EKZgFtGlbNmU1BXP6U4DpwV4x0siHNctQOYWBZ2D8ehK9YNpY7CW/QPK9Fpq2WgeMQaXis4OYrjtdVQIWy/JbhVTgaX6S2lcw5ufFZbWdV2H6cPFvPzRuH25Ck69wkyx7WaBRmuxBR+Ge3gbah/fOgLF0w30Vp4fcdAzj8XQ8j34xrWOH/0GfYS2BYS2/dZqWVZ+mH1EGkvZEyGJ4sIGh7YbDYVgsKdBAaQ82LJZHZ7jScRDamQwn8A20VdqjM4mHs2bx+B/q2FWJx/8SD5jKecA08Qhz4iH5uXlIPrENQ2Kjj7nZ6EPvCBay95zTrWQSmxUltsNKbLgW1xuuJbb0S2wamdiWdIFufDsmcePbscWx8W20H4utlYvUByw6zVsr82f8HR8TD1sr/w8G6m2Ad+vtrQAAAABJRU5ErkJggg==";const Ve="_createSubmit_j95ns_1",Ie="_introduction_j95ns_1";var W={createSubmit:Ve,introduction:Ie};function Ne(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Q(e)}var We=S({name:"CreateSubmit",computed:{userInfo(){const e=s.lessonGroup,o=v.user.data||{};return{username:o.username||`\u6E38\u5BA2${o.id||""}`,headUrl:o.headUrl,lessonName:e.lessonName,buyNum:0,lessonDesc:e.lessonDesc,lessonPrice:e.lessonPrice,lessonCoverUrl:e.lessonCoverTemplateUrl||e.lessonCoverUrl,lessonNum:s.lessonList.length,auditVersion:0}},lessonList(){return(s.lessonList||[]).forEach(o=>{const l=o.relationList,A=[];l.forEach(i=>{i.musicAlbumId&&A.push(i)}),o.relationList=A}),s.lessonList||[]},groupId(){return this.$route.query.groupId||""}},methods:{async onSubmit(){try{const e=s.lessonGroup,o={lessonList:this.lessonList,lessonGroup:{...e,lessonCoverUrl:e.lessonCoverTemplateUrl||e.lessonCoverUrl}};s.groupId?(await c.post("/api-teacher/videoLessonGroup/update",{data:o}),E.success("\u4FEE\u6539\u6210\u529F")):(await c.post("/api-teacher/videoLessonGroup/add",{data:o}),E.success("\u521B\u5EFA\u6210\u529F")),setTimeout(()=>{H({api:"back"})},1e3)}catch{}}},render(){let e;return t("div",{class:[W.createSubmit]},[t(te,{userInfo:this.userInfo},null),t(N,null,{default:()=>[t("p",{class:W.introduction},[this.userInfo.lessonDesc])]}),t(N,{title:"\u8BFE\u7A0B\u5217\u8868",icon:"courseList",class:"mb12"},Ne(e=this.lessonList.map(o=>{const A=(o.relationList||[]).map(i=>({relationMusicAlbum:i.relationMusicAlbum,musicAlbumName:i.musicAlbumName,musicAlbumId:i.musicAlbumId}));return t(se,{musicAlbumInfos:A,detail:{title:o.videoTitle,content:o.videoContent,imgUrl:o.coverUrl}},null)}))?e:{default:()=>[e]}),t(C,{offsetBottom:0,position:"bottom"},{default:()=>[t("div",{class:["btnGroup","btnMore"]},[t(b,{block:!0,round:!0,type:"primary",plain:!0,onClick:()=>{s.active=2}},{default:()=>[a("\u8FD4\u56DE\u7F16\u8F91")]}),t(b,{block:!0,round:!0,type:"primary",onClick:this.onSubmit},{default:()=>[this.groupId?"\u4FEE\u6539\u5B8C\u6210":"\u521B\u5EFA\u5B8C\u6210"]})])]})])}}),Et=S({name:"Create",async created(){const e=this.$route.query;if(s.groupId=Number(e.groupId)||0,!s.groupId)return!1;try{document.title="\u4FEE\u6539\u89C6\u9891\u8BFE",s.loadingStatus=!0;const l=(await c.get("/api-teacher/videoLessonGroup/selectVideoLesson",{params:{groupId:s.groupId}})).data,{auditStatus:A,lessonCoverUrl:i,lessonPrice:k,lessonDesc:j,lessonSubject:G,lessonName:P,relationType:Te,id:z,...we}=l.lessonGroup,F=!!s.templateList.includes(i);s.lessonGroup={id:z,lessonName:P,lessonSubject:G,lessonDesc:j,lessonPrice:k,relationType:"RECOMMEND",lessonCoverTemplateUrl:F?i:"",lessonCoverUrl:F?"":i},s.lessonList=[],l.detailList&&l.detailList.forEach(m=>{const q=(m.musicAlbumInfos||[]).map(L=>({relationMusicAlbum:L.relationType,musicAlbumName:L.name,musicAlbumId:L.musicAlbumId,relationId:L.id,useRelationType:"RECOMMEND"}));s.lessonList.push({videoTitle:m.videoTitle,videoContent:m.videoContent,videoUrl:m.videoUrl,coverUrl:m.coverUrl,relationList:q,posterUrl:m.posterUrl})}),s.loadingStatus=!1}catch{}s.lessonGroup.lessonCoverUrl&&!s.templateList.includes(s.lessonGroup.lessonCoverUrl)?s.tabIndex=2:s.tabIndex=1},async mounted(){try{c.get("/api-teacher/sysConfig/queryByParamNameList",{params:{paramNames:"video_lesson_service_fee,video_account_period"}}).then(e=>{console.log(e,"res"),(e.data||[]).forEach(l=>{l.paramName==="video_lesson_service_fee"?s.rate=l.paramValue:l.paramName==="video_account_period"&&(s.video_account_period=l.paramValue)})})}catch{}},render(){return t("div",{class:d["video-create"]},[s.active<=2?t(C,{position:"top",offsetTop:0,zIndex:999999},{default:()=>[t(Z,{border:!1,style:{paddingTop:"15px"},direction:"horizontal",columnNum:"2",class:d.gridColumn},{default:()=>[t(y,null,{default:()=>t(g,null,[t(U,{name:Fe,size:38},null),t("span",{class:[d.gridName,s.active>=1?d.active:null]},[a("\u8BFE\u7A0B\u4FE1\u606F")])])}),t(y,null,{default:()=>t(g,null,[t(U,{name:s.active===2?ye:Ee,size:38},null),t("span",{class:[d.gridName,s.active===2?d.active:null]},[a("\u8BFE\u7A0B\u5185\u5BB9")])])})]})]}):null,s.active===1?t(g,null,[t(de,null,null)]):null,s.active===2?t(g,null,[t(Ue,null,null)]):null,s.active===3?t(g,null,[t(We,null,null)]):null])}});export{Et as default};