1 |
- import{C as B}from"./index.2f10c34f.js";import{r as D,d as p,aM as w,c as e,bD as v,a as r,az as S,H as A,bi as b,b as d,bb as x,bc as n,ak as f,aN as F,E as c,bd as N,be as h,aZ as i,aY as E,b1 as k,bf as L,F as P}from"./index.25c29239.js";import{C as G}from"./index.ef8b91d4.js";import{C as z}from"./index.2fb40c63.js";import{i as R,a as _}from"./icon_course_list.6094bde4.js";import{C as j}from"./index.aa9e6cea.js";import{C as q}from"./index.b7ffd6d8.js";import{v as Q}from"./toolsValidate.add49407.js";import{E as O,a as K}from"./index2.fcf14428.js";import"./index2.32ff5740.js";const U=()=>({groupId:0,active:0,tabIndex:1,loadingStatus:!1,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:[]}),t=D(U()),W=()=>{Object.assign(t,U())},J="_createSubmit_10oze_7",X="_introduction_10oze_7",Y="_userDetail_10oze_12",M="_banner_10oze_12",Z="_userInfo_10oze_18",H="_avatar_10oze_24",$="_name_10oze_30",ee="_buyNum_10oze_39",se="_buyNumInfo_10oze_53",te="_iconBuy_10oze_59",oe="_info_10oze_62",le="_userTitle_10oze_68",re="_videoImg_10oze_74",ae="_videoStop_10oze_79",ne="_videoTitle_10oze_91",Ae="_videoTitleText_10oze_99",ue="_videoTitleContent_10oze_104",a={"course-preview":"_course-preview_10oze_1",createSubmit:J,introduction:X,userDetail:Y,banner:M,userInfo:Z,avatar:H,name:$,buyNum:ee,buyNumInfo:se,iconBuy:te,info:oe,userTitle:le,videoImg:re,videoStop:ae,videoTitle:ne,videoTitleText:Ae,videoTitleContent:ue},ie="data:image/png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tusqHAbRQJeS+1+fppgXAJFVClvy+u0KnScCwqBLS5t1FOlgGmqgR0m790XHqmtBFjZCqT1eo6cIINUJq/j49RcUIstQI6fDlLO2yWKJGSKfntFvCUWqEdPpKu2UUqBHS6Q3tCshRI6TDnxu0y2GBGiF1369TsYAj1Aip2nxykqpJDFIjpOLjZeoG0UaNkDbrD4/RoQ111Ah54O0FuqhDYJkqIff9urNCF8sBYJiql7Lo1Tm6GgbQQNVjuevHLXpoABBYpOLShpRya+00PSwGsC1F1c0PG++v0lMKO0ImD8EMYVczD6EZRRP0bQL7Ijn6lIugJEGfErDpoC8dUPTSh15o0qwoDYdknmXlk3ARnWMZc1G4Cqbz9JBPB+ElMlCgi8JABOXUpuepmU/XoqJY+5jJInOsPQa/jGi8sTEeNfD//AORQWsF93/GiwAAAABJRU5ErkJggg==",ce=p({name:"course-preview",computed:{userInfo(){const s=t.lessonGroup,o=w.user.data||{};return{id:o.id,username:o.username||`\u6E38\u5BA2${o.id||""}`,headUrl:o.headUrl,lessonName:s.lessonName,buyNum:0,lessonDesc:s.lessonDesc,lessonPrice:s.lessonPrice,lessonCoverUrl:s.lessonCoverTemplateUrl||s.lessonCoverUrl,lessonNum:t.lessonList.length}},lessonList(){return t.lessonList||[]}},render(){return e("div",{class:[a["course-preview"],"pb-3"]},[e("div",{class:a.userDetail},[e(v,{class:[a.banner],src:this.userInfo.lessonCoverUrl,fit:"cover"},null),e("div",{class:"bg-white"},[e("div",{class:"p-[14px] text-lg text-[#1a1a1a] font-semibold leading-none"},[r("\u6807\u9898")]),e("div",{class:[a.userInfo,"mx-[14px] py-[14px]"]},[e("div",{class:"flex"},[e(v,{class:a.avatar,src:this.userInfo.headUrl||S,fit:""},null),e("div",{class:a.name},[this.userInfo.username||`\u6E38\u5BA2${this.userInfo.id||""}`,e("div",{class:a.buyNum},[this.userInfo.buyNum,r("\u4EBA\u5DF2\u8D2D\u4E70")])])]),e("div",{class:a.info},[r("\uFFE5"),this.userInfo.lessonPrice,r("/"),this.userInfo.lessonNum,r("\u8BFE\u65F6")])])])]),e("div",{class:[a["section-detail"],"mt-[10px] mx-[14px] rounded-lg bg-white"]},[e("div",{class:"flex items-center py-3 px-[10px] text-[#333333] text-base"},[e(A,{size:18,class:"mr-2"},{default:()=>[e("img",{src:R},null)]}),r("\u8BFE\u7A0B\u4ECB\u7ECD")]),e("div",{class:"mx-[10px] pt-[10px] pb-4 text-sm text-[#7A7A7A] border-t border-t-[#EBEBEB]"},[this.userInfo.lessonDesc])]),e("div",{class:[a["section-detail"],"mt-[10px] mx-[14px] rounded-lg bg-white"]},[e("div",{class:"flex items-center py-3 px-[10px] text-[#333333] text-base"},[e(A,{size:18,class:"mr-2"},{default:()=>[e("img",{src:_},null)]}),r("\u8BFE\u7A0B\u5217\u8868")]),e("div",{class:"mx-[10px] pt-[10px] pb-4 text-sm text-[#7A7A7A] border-t border-t-[#EBEBEB] flex flex-col"},[t.lessonList.map(s=>e("div",{class:"flex mb-3"},[e("div",{class:a.videoImg},[e(v,{class:"align-middle h-[70px] w-[100px] rounded overflow-hidden",src:s.coverUrl,fit:"cover"},null),e(A,{class:a.videoStop,size:26},{default:()=>[e("img",{src:ie},null)]})]),e("div",{class:[a.videoTitle,"!h-[70px]"]},[e("p",{class:[a.videoTitleText,"whitespace-nowrap overflow-hidden text-ellipsis"]},[s.videoTitle]),e("p",{class:[a.videoTitleContent]},[s.videoContent])])]))])])])}}),de="_courseContent_15viv_1",pe={courseContent:de},me="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADoAAAA6CAMAAADWZboaAAAAAXNSR0IArs4c6QAAAKtQTFRFAAAA////////9vb28/Pz9PT09PT08/Pz8/Pz8/Pz9PT0DQ0NDg4ODw8PERERExMTFRUVFxcXGBgYGxsbHh4eICAgISEhJCQkQUFBRERER0dHS0tLTExMTk5OVVVVXFxcYWFhjY2Nk5OTlZWVlpaWmJiYmZmZnZ2dpaWlrKyss7Ozubm5v7+/xcXFysrKzc3N19fX2NjY5eXl6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4UN3q0V0NgOEEYDIEoLbToYc6AINrDBBfBwDUDxq0A0D/crsTsbr0Aeho0ArA+1l9U3V+A6ho0C7QPqkfqk5toKtBP3qN0VE9U3UcNXqfSf6c+OXtT2lKU5rS/6FzgLkR3UcQ7Y2omjab0xczxGL8WEwui6FnMS8tRq3FlLYZ8DbPBovHiukT6QvDn5DJjUbpuAAAAABJRU5ErkJggg==",be="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADoAAAA6CAMAAADWZboaAAAAAXNSR0IArs4c6QAAAEhQTFRFAAAA////////9vb28/Pz9PT09PT08/Pz8/Pz8/Pz9PT0AAAACwsLGhoaLS0tNDQ0RUVFi4uLra2t19fX2NjY2dnZ7Ozs8/PzedusZQAAAAt0Uk5TAAIFUVWKpNjc8v4WawkrAAABBElEQVRIx+2XUQ6DIAxAq6KoExHd4P43HbppnNKAVLMf3w9Jw4uVlLQAjKSs4JUJouIFS2EhK80hyuwrJnltDlLnyaTmJoJ8yraOUWubc1qaKMoUmImEQRGrFsCd8V48vogeUTm4K2ExrYvVBphY1SBqQMKYGsI5ar/6QTe/yYPzaFD3fJWQ8H9O+JO0uwRccdgVoEAKU3jU8TDWX5nXOR6gzl+Z1wMqtt7qrd7qRZeOcNW3XKs2dsuwNwcbbjyqtHu6nTt0Niw9qsK7hvKousXMVvsaxxNx25e/52glm63XSKUdPaeK7VYVMnIFwCmDHmG8JAy1hFGaMsBTng2Ex0rsE+kNjFEHody3dJ8AAAAASUVORK5CYII=",fe=p({name:"course-content",data(){return{show:!1,form:{lessonList:[{key:1,videoTitle:"",videoContent:"",videoUrl:"",coverUrl:""}]}}},methods:{handleUpload(s){console.log(s),(s||[]).forEach(l=>{t.lessonList.push({videoTitle:"",videoContent:"",videoUrl:l,coverUrl:""})})},handleSubmit(){this.$refs.form.validate(async s=>{if(s){if(t.lessonList.length<=0){b.error("\u8BF7\u4E0A\u4F20\u8BFE\u7A0B\u89C6\u9891");return}console.log("\u63D0\u4EA4\u6570\u636E"),this.show=!0}else return this.$nextTick(()=>{document.getElementsByClassName("is-error")[0].scrollIntoView({block:"center",behavior:"smooth"})}),!1})},async createSubmit(){try{const s=t.lessonGroup;let o={lessonList:t.lessonList,lessonGroup:{...s,lessonCoverUrl:s.lessonCoverTemplateUrl||s.lessonCoverUrl}};t.groupId?(await d.post("/api-website/videoLessonGroup/update",{data:o}),b.success("\u4FEE\u6539\u6210\u529F")):(await d.post("/api-website/videoLessonGroup/add",{data:o}),b.success("\u521B\u5EFA\u6210\u529F")),sessionStorage.setItem("videoActiveName","DOING"),this.$router.back()}catch{}},swapItems(s,o,l){return s[o]=s.splice(l,1,s[o])[0],s}},render(){return e("div",{class:pe.courseContent},[e(x,{class:"px-6 pb-10 pt-7 min-h-[280px]",size:"large",labelWidth:"120px",labelPosition:"left",ref:"form",model:t},{default:()=>[e(n,{label:"\u8BFE\u7A0B\u89C6\u9891",required:!0},{default:()=>[e("div",null,[e(z,{multiple:!0,limit:3,bucket:"video-course",multipleModel:s=>{this.handleUpload(s)}},null)])]}),t.lessonList.map((s,o)=>e("div",{class:"p-4 mb-10 border-b border-solid border-[#E7E6E6] relative",key:s.key},[e("div",{class:"absolute right-4 top-4 z-10 flex"},[o!==0&&e(f,{class:"box-item",effect:"dark",content:"\u4E0A\u79FB",placement:"top"},{default:()=>[e("div",{onClick:()=>{this.swapItems(t.lessonList,o,o-1)}},[e(A,{size:29},{default:()=>[e("img",{src:ve},null)]})])]}),t.lessonList.length-1!==o&&e(f,{class:"box-item",effect:"dark",content:"\u4E0B\u79FB",placement:"top"},{default:()=>[e("div",{onClick:()=>{this.swapItems(t.lessonList,o,o+1)}},[e(A,{size:29,class:"ml-3"},{default:()=>[e("img",{src:me,title:"\u5411\u4E0B\u79FB\u52A8"},null)]})])]}),t.lessonList.length>1&&e(f,{class:"box-item",effect:"dark",content:"\u5220\u9664",placement:"top"},{default:()=>[e("div",{onClick:()=>{F.confirm("\u786E\u5B9A\u5220\u9664\u8BE5\u6761\u6570\u636E\u5417\uFF1F","\u63D0\u793A",{type:"warning"}).then(()=>{t.lessonList.splice(o,1)})}},[e(A,{size:29,class:"ml-3"},{default:()=>[e("img",{src:be},null)]})])]})]),e("h2",{class:"text-xl font-semibold pb-5"},[`\u7B2C ${o+1} \u8BFE`]),e(n,{label:"\u8BFE\u7A0B\u6807\u9898",prop:`lessonList.${o}.videoTitle`,rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8BFE\u7A0B\u6807\u9898"}]},{default:()=>[e(c,{placeholder:"\u8BF7\u8F93\u5165\u8BFE\u7A0B\u6807\u9898",maxlength:50,modelValue:s.videoTitle,"onUpdate:modelValue":l=>s.videoTitle=l},null)]}),e(n,{label:"\u8BFE\u7A0B\u4ECB\u7ECD",prop:`lessonList.${o}.videoContent`,rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8BFE\u7A0B\u4ECB\u7ECD"}]},{default:()=>[e(c,{placeholder:"\u8BF7\u8F93\u5165\u8BFE\u7A0B\u4ECB\u7ECD",modelValue:s.videoContent,"onUpdate:modelValue":l=>s.videoContent=l,type:"textarea",maxlength:200,rows:4,showWordLimit:!0},null)]}),e(N,null,{default:()=>[e(h,{span:12},{default:()=>[e(n,{label:"\u8BFE\u7A0B\u89C6\u9891",required:!0},{default:()=>[e(j,{styleValue:{with:"150px",height:"85px"},controls:!1,src:s.videoUrl,volume:!1},null),e("p",null,null)]})]}),e(h,{span:10},{default:()=>[e(n,{label:"\u89C6\u9891\u5C01\u9762",prop:`lessonList.${o}.coverUrl`,rules:[{required:!0,message:"\u8BF7\u4E0A\u4F20\u89C6\u9891\u5C01\u9762"}]},{default:()=>[e(G,{modelValue:s.coverUrl,"onUpdate:modelValue":l=>s.coverUrl=l,bucket:"video-course"},null)]})]})]})]))]}),e("div",{class:"text-center pt-6 pb-7"},[e(i,{round:!0,class:"!w-44 !h-[48px] !text-base",onClick:()=>{t.active=0;const s=document.documentElement.scrollTop||document.body.scrollTop;E(s,0)}},{default:()=>[r("\u4E0A\u4E00\u6B65")]}),e(i,{round:!0,type:"primary",class:"!w-44 !h-[48px] !text-base",onClick:this.handleSubmit},{default:()=>[r("\u4E0B\u4E00\u6B65")]})]),e(k,{modelValue:this.show,"onUpdate:modelValue":s=>this.show=s,title:"\u9884\u89C8"},{default:()=>[e(ce,null,null)],footer:()=>e("span",{class:"dialog-footer !text-center block "},[e(i,{size:"large",round:!0,onClick:()=>{this.show=!1}},{default:()=>[r("\u8FD4\u56DE\u7F16\u8F91")]}),e(i,{size:"large",round:!0,type:"primary",onClick:this.createSubmit},{default:()=>[t.groupId?"\u786E\u8BA4\u4FEE\u6539":"\u521B\u5EFA\u5B8C\u6210"]})])})])}}),ge="_tabs_1g4lj_1",he="_imgCover_1g4lj_4",xe="_courseInfo_1g4lj_7",Ee={tabs:ge,imgCover:he,courseInfo:xe};function Ue(s){return typeof s=="function"||Object.prototype.toString.call(s)==="[object Object]"&&!L(s)}const Ce=p({name:"course-info",data(){return{url:""}},computed:{choiceSubjectIds(){let s=t.lessonGroup.lessonSubject?Number(t.lessonGroup.lessonSubject):null;return s?[s]:[]},subjectList(){return t.subjectList||[]},lessonSubjectName(){let s="";return this.subjectList.forEach(o=>{this.choiceSubjectIds.includes(o.id)&&(s=o.name)}),s},calcRatePrice(){let s=t.rate||0,o=t.lessonGroup.lessonPrice||0;return(o-s/100*o).toFixed(2)}},async mounted(){try{if(t.subjectList.length<=0){const l=await d.post("/api-website/teacher/querySubject");t.subjectList=l.data||[]}const s=t.rate||0,o=t.lessonGroup.lessonPrice||0}catch{}},methods:{onFormatter(s){s.target.value=Q(s.target.value),t.rate,s.target.value},tabChange(s){this.$refs.form.clearValidate("lessonCoverTemplateUrl"),this.$refs.form.clearValidate("lessonCoverUrl"),t.tabIndex=s},selectImg(s){t.lessonGroup.lessonCoverUrl="",t.lessonGroup.lessonCoverTemplateUrl=s}},render(){let s;return e("div",{class:Ee.courseInfo},[e(x,{class:"px-6 pb-10 pt-7",size:"large",ref:"form",labelWidth:"120px",labelPosition:"left",model:t.lessonGroup},{default:()=>[e(n,{label:"\u8BFE\u7A0B\u540D\u79F0",prop:"lessonName",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8BFE\u7A0B\u540D\u79F0"}]},{default:()=>[e(c,{modelValue:t.lessonGroup.lessonName,"onUpdate:modelValue":o=>t.lessonGroup.lessonName=o,maxlength:20,placeholder:"\u8BF7\u8F93\u5165\u8BFE\u7A0B\u540D\u79F0"},null)]}),e(n,{label:"\u8BFE\u7A0B\u58F0\u90E8",prop:"lessonSubject",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u8BFE\u7A0B\u58F0\u90E8"}]},{default:()=>[e(O,{class:"w-full",modelValue:t.lessonGroup.lessonSubject,"onUpdate:modelValue":o=>t.lessonGroup.lessonSubject=o,placeholder:"\u8BF7\u9009\u62E9\u8BFE\u7A0B\u58F0\u90E8",disabled:!!t.lessonGroup.id},Ue(s=t.subjectList.map(o=>e(K,{key:o.id,value:o.id,label:o.name},null)))?s:{default:()=>[s]})]}),e(n,{label:"\u8BFE\u7A0B\u4ECB\u7ECD",prop:"lessonDesc",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8BFE\u7A0B\u4ECB\u7ECD"}]},{default:()=>[e(c,{placeholder:"\u8BF7\u8F93\u5165\u8BFE\u7A0B\u4ECB\u7ECD",modelValue:t.lessonGroup.lessonDesc,"onUpdate:modelValue":o=>t.lessonGroup.lessonDesc=o,type:"textarea",maxlength:200,rows:4,showWordLimit:!0},null)]}),e(n,{label:"\u8BFE\u7A0B\u7EC4\u552E\u4EF7",prop:"lessonPrice",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8BFE\u7A0B\u7EC4\u552E\u4EF7"}]},{default:()=>[e(c,{placeholder:"\u8BF7\u8F93\u5165\u8BFE\u7A0B\u7EC4\u552E\u4EF7",modelValue:t.lessonGroup.lessonPrice,"onUpdate:modelValue":o=>t.lessonGroup.lessonPrice=o,onKeyup:this.onFormatter,maxlength:9,disabled:!!t.lessonGroup.id},{suffix:()=>e("span",{class:"text-base text-[#999]"},[r("\u5143")])})]}),e("div",{class:"text-sm text-[#999] pl-[120px] leading-relaxed pb-2"},[e("p",null,[r("\u6263\u9664\u624B\u7EED\u8D39\u540E\u60A8\u7684\u8BFE\u7A0B\u9884\u8BA1\u6536\u5165\u4E3A\uFF1A ")]),e("p",null,[r("\u8BFE\u7A0B\u7EC4\u603B\u6536\u5165"),e("span",{class:"px-1 text-[#FF4E19]"},[this.calcRatePrice]),r("\u5143/\u4EBA")]),e("p",null,[r("\u60A8\u7684\u8BFE\u7A0B\u6536\u5165\u5C06\u5728\u8BFE\u7A0B\u7ED3\u675F\u540E\u7ED3\u7B97\u5230\u60A8\u7684\u8D26\u6237\u4E2D ")])]),e(n,{label:"\u8BFE\u7A0B\u5C01\u9762",class:"!mb-0",prop:"lessonCoverUrl",rules:[{required:!0,message:"\u8BF7\u4E0A\u4F20\u8BFE\u7A0B\u5C01\u9762",trigger:"change"}]},{default:()=>[e(q,{modelValue:t.lessonGroup.lessonCoverUrl,bucket:"video-course",cropUploadSuccess:o=>{t.lessonGroup.lessonCoverUrl=o,t.lessonGroup.lessonCoverTemplateUrl=""},options:{title:"\u8BFE\u7A0B\u5C01\u9762",fixedNumber:[3.34,2],autoCropWidth:375,autoCropHeight:212}},null)]})]}),e("div",{class:" text-center pt-6 pb-7"},[e(i,{type:"primary",round:!0,class:"!w-44 !h-[48px] !text-base",onClick:()=>{this.$refs.form.validate(async o=>{if(o){t.active=1;const l=document.documentElement.scrollTop||document.body.scrollTop;E(l,0)}else return this.$nextTick(()=>{document.getElementsByClassName("is-error")[0].scrollIntoView({block:"center",behavior:"smooth"})}),!1})}},{default:()=>[r("\u4E0B\u4E00\u6B65")]})])])}}),Pe=p({name:"video-operation",data(){return{type:this.$route.query.type||"create"}},async created(){W();const s=this.$route.query;if(t.groupId=Number(s.groupId)||0,!t.groupId)return!1;try{t.loadingStatus=!0;const l=(await d.get("/api-website/videoLessonGroup/selectVideoLesson",{params:{groupId:t.groupId}})).data,{auditStatus:Ie,lessonCoverUrl:m,lessonPrice:C,lessonDesc:I,lessonSubject:T,lessonName:y,id:V,...Te}=l.lessonGroup,g=!!t.templateList.includes(m);t.lessonGroup={id:V,lessonName:y,lessonSubject:Number(T),lessonDesc:I,lessonPrice:C,lessonCoverTemplateUrl:g?m:"",lessonCoverUrl:g?"":m},t.lessonList=[],l.detailList&&l.detailList.forEach(u=>{t.lessonList.push({videoTitle:u.videoTitle,videoContent:u.videoContent,videoUrl:u.videoUrl,coverUrl:u.coverUrl,posterUrl:u.posterUrl})}),t.loadingStatus=!1}catch{}t.lessonGroup.lessonCoverUrl&&!t.templateList.includes(t.lessonGroup.lessonCoverUrl)?t.tabIndex=2:t.tabIndex=1},async mounted(){document.title=this.type==="create"?"\u65B0\u5EFA\u89C6\u9891\u8BFE":"\u7F16\u8F91\u89C6\u9891\u8BFE";try{const s=await d.get("/api-website/sysConfig/queryByParamName",{params:{paramName:"video_lesson_service_fee"}});t.rate=s.data.paramValue}catch{}},render(){return e(P,null,[e("div",{class:"text-2xl font-semibold text-black leading-none px-6 py-5 "},[this.type==="create"?"\u65B0\u5EFA\u89C6\u9891\u8BFE":"\u7F16\u8F91\u89C6\u9891\u8BFE"]),e("div",{class:"pt-12"},[e(B,{class:"pl-[60px] pr-7",type:"large",active:t.active},null),t.active===0&&e(Ce,null,null),t.active===1&&e(fe,null,null)])])}});export{Pe as default};
|