Commit 7d8d89bd by haojie

1

parent a1b48f8d
System.register(["./vue-legacy-e1572d11.js","./userApi-legacy-f48623ab.js","./index-legacy-68247afe.js"],(function(t,e){"use strict";var a,o,s,c,i,n,r,d,l,u,y,g,m,v;return{setters:[t=>{a=t.d,o=t.I,s=t.Q,c=t.a0,i=t.S},t=>{n=t.C,r=t.E,d=t.F,l=t.G,u=t.H,y=t.s,g=t.I},t=>{m=t.t,v=t.d}],execute:function(){const e=[i("div",{class:"loading"},[i("div"),i("div"),i("div"),i("div"),i("div"),i("div"),i("div"),i("div")],-1)];t("L",a({__name:"loading",props:{position:{default:"absolute"}},setup:t=>(a,i)=>(o(),s("div",{class:"custom-loading-two",style:c({position:t.position})},e,4))})),t("b",(async()=>{try{let t=await n();if(0==t.code)return t.data}catch(t){return console.log(t),{}}})),t("g",(async()=>{let t={adminList:[],myList:[]};try{let e=await r();return 0==e.code&&(t.adminList=e.data.filter((t=>0==t.users_id)),t.myList=e.data.filter((t=>0!=t.users_id))),t}catch(e){return console.log(e),t}})),t("c",(async()=>{let t={tones:[],soundColor:[]};try{let e=await d();return 0==e.code&&(e.data.forEach((t=>{t.img=t.icon,t.c_name=t.name,t.c_categorie=t.extend?.voice})),t.tones=e.data.filter((t=>t.type==m)),t.soundColor=e.data.filter((t=>t.type==v))),t}catch(e){return console.log(e),t}})),t("d",(async(t=!1)=>{try{let e=await l();if(0==e.code)return e.data.forEach((e=>{e.c_name=e.name,e.c_status=!0,e.popup=!1,e.edit=!1,e.blurNum=1,e.loading=!1,t&&(e.label=e.name,e.value=e.id)})),e.data}catch(e){return console.log(e),[]}})),t("o",(async(t,e)=>{try{return 0==(await u(t,e)).code&&(y("更新成功","success"),!0)}catch(a){return console.log(a),!1}})),t("a",(async(t,e)=>{try{return 0==(await g(t,e)).code&&(y("更新成功","success"),!0)}catch(a){return console.log(a),!1}}))}}}));
System.register(["./userApi-legacy-f48623ab.js","./vue-legacy-e1572d11.js"],(function(e,l){"use strict";var t,o,a,s,n,u,c,d,r,i,f,m,p,y,v;return{setters:[e=>{t=e.B},e=>{o=e.d,a=e.r,s=e.w,n=e.I,u=e.J,c=e.R,d=e.S,r=e.Y,i=e.Q,f=e.a,m=e.V,p=e.K,y=e.X,v=e.D}],execute:function(){const l={class:"custom-confirm-dialog-body"},b={class:"title"},C={key:0,class:"footer-default"},g=y("取消"),V=y("确定"),_=o({__name:"ConfirmDialog",props:{modelValue:{type:Boolean},header:null,footer:{type:Boolean,default:null},placement:{default:"center"},destroyOnClose:{type:Boolean,default:!1},className:{default:""},title:{default:""}},emits:["update:modelValue","confirm"],setup(e,{emit:o}){const y=e,_=a(y.modelValue);s((()=>y.modelValue),(e=>{_.value=e})),s((()=>_.value),(e=>{o("update:modelValue",e)}));const B=()=>{o("update:modelValue",!1),o("confirm")};return(o,a)=>{const s=v("t-dialog");return n(),u(s,{visible:_.value,"onUpdate:visible":a[1]||(a[1]=e=>_.value=e),attach:"body",class:p([e.className,"c-dialog-confirm-default"]),destroyOnClose:e.destroyOnClose,placement:e.placement},{body:c((()=>[d("div",l,[d("div",b,r(e.title),1)])])),footer:c((()=>[null===e.footer?(n(),i("div",C,[f(t,{onClick:a[0]||(a[0]=e=>_.value=!1),class:"footer-cancel footer-public-btn"},{default:c((()=>[g])),_:1}),f(t,{onClick:B,class:"footer-confrim footer-public-btn"},{default:c((()=>[V])),_:1})])):m("",!0)])),_:1},8,["visible","class","destroyOnClose","placement"])}}});e("C",_)}}}));
This source diff could not be displayed because it is too large. You can view the blob instead.
System.register(["./vue-legacy-e1572d11.js","./changeName-legacy-e0f05d42.js"],(function(e,a){"use strict";var l,n,s,u,c,t,i,o,r,d,m,v,g,h,k;return{setters:[e=>{l=e.d,n=e.r,s=e.w,u=e.I,c=e.Q,t=e.S,i=e.e,o=e.z,r=e.Z,d=e.J,m=e.F,v=e.X,g=e.Y,h=e.K},e=>{k=e._}],execute:function(){const a=["src"];e("_",l({__name:"cardOne",props:{id:null,img:null,name:null,clicked:{type:Boolean,default:!0},className:{default:""},row:{default:{}},edit:{type:Boolean,default:!1}},emits:["change","nameChange"],setup(e,{emit:l}){const y=e,f=n(y.name),p=n(!1),C=e=>{l("nameChange",y.id,e)},N=()=>{y.clicked&&l("change",y.id,y.row)},_=()=>{p.value=!0},w=()=>{p.value=!1};return s((()=>y.name),(e=>{f.value=e})),(l,n)=>(u(),c("div",{class:h(["custom-card-box",[e.clicked?"cursor-pointer":"",e.className?e.className:""]]),onClick:N},[t("div",{class:"img-box",onMouseenter:_,onMouseleave:w},[t("img",{src:e.img,alt:""},null,8,a),i(t("div",null,[r(l.$slots,"hover")],512),[[o,p.value]])],32),t("div",null,[e.edit?(u(),d(k,{key:0,value:f.value,onChange:C},null,8,["value"])):(u(),c(m,{key:1},[v(g(e.name),1)],64))])],2))}}))}}}));
System.register(["./index-legacy-31c6062c.js","./edit-legacy-59c4e814.js","./vue-legacy-e1572d11.js"],(function(e,a){"use strict";var l,t,u,n,s,c,i,v,o,d,m,p,r,g,y;return{setters:[e=>{l=e._},e=>{t=e.E},e=>{u=e.d,n=e.r,s=e.w,c=e.I,i=e.Q,v=e.J,o=e.F,d=e.X,m=e.Y,p=e.V,r=e.S,g=e.a,y=e.L}],execute:function(){const a={class:"custom-change-name-box"},h={key:1,class:"empty-tips"};e("_",u({__name:"changeName",props:{isEdit:{type:Boolean,default:!1},event:{type:Function,default:()=>!0},value:null},emits:["change"],setup(e,{emit:u}){const f=e,k=n(!1),x=n(f.value),V=()=>{k.value=!0},_=async()=>{k.value=!1,await f.event(x.value)||(x.value=f.value),u("change",x.value)};return s((()=>f.value),(e=>{x.value=e})),(u,n)=>(c(),i("div",a,[k.value?(c(),v(l,{key:0,modelValue:x.value,"onUpdate:modelValue":n[0]||(n[0]=e=>x.value=e),align:"left",theme:"light",width:"auto",height:"23px",autoFocus:!0,onInputBlur:_},null,8,["modelValue"])):e.value?k.value?p("",!0):(c(),i(o,{key:2},[d(m(e.value),1)],64)):(c(),i("span",h,"未命名草稿")),r("span",{onClick:V,class:"edit-icon"},[g(y(t))])]))}}))}}}));
System.register(["./vue-legacy-e1572d11.js"],(function(t,e){"use strict";var c,n,r;return{setters:[t=>{c=t.I,n=t.Q,r=t.S}],execute:function(){const e={width:"18",height:"18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s=[r("path",{d:"M16.494 2.87c.048.109.087.235.117.379.03.143.045.293.045.45a1.3 1.3 0 0 1-.09.467c-.06.156-.155.306-.287.45-.143.144-.271.27-.385.378-.113.107-.212.203-.296.287-.095.096-.185.18-.268.252L11.979 2.17c.143-.132.313-.29.51-.477.197-.186.362-.332.493-.44A1.571 1.571 0 0 1 14.031.9c.173.006.34.033.501.08.162.049.302.103.421.163.251.132.529.362.834.692.304.33.54.675.707 1.035Zm-13.96 8.78c.072-.072.24-.243.503-.513.262-.27.59-.603.985-.998L5.33 8.825l1.452-1.457L10.635 3.5l3.35 3.383-3.852 3.867-1.434 1.458c-.478.467-.908.896-1.29 1.286s-.699.71-.95.962a7.768 7.768 0 0 1-.86.774 2.24 2.24 0 0 1-.484.288 7.813 7.813 0 0 1-.734.306c-.323.12-.66.237-1.013.35a19.61 19.61 0 0 1-1.003.297 7.53 7.53 0 0 1-.708.162c-.323.036-.538-.012-.645-.144-.108-.132-.138-.354-.09-.665.024-.168.08-.411.17-.729.09-.318.185-.648.287-.99.101-.341.2-.656.296-.944.095-.288.173-.486.233-.594.071-.168.152-.32.241-.458.09-.138.219-.291.386-.46Z",fill:"#B4B4B4"},null,-1)];t("E",{render:function(t,r){return c(),n("svg",e,s)}})}}}));
System.register(["./vue-legacy-e1572d11.js","./index-legacy-68247afe.js"],(function(e,t){"use strict";var l,u,a,s,i,n,d,o,r,c,p,m,v,f,h,g,y,b,w,x,k,C,B;return{setters:[e=>{l=e.I,u=e.Q,a=e.S,s=e.d,i=e.r,n=e.j,d=e.w,o=e.o,r=e.Z,c=e.e,p=e.a5,m=e.a0,v=e.a,f=e.R,h=e.F,g=e.U,y=e.V,b=e.y,w=e.K,x=e.Y,k=e.J,C=e.L},e=>{B=e.g}],execute:function(){const t={width:"28",height:"28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},V=[a("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M21.09 17.802a22.529 22.529 0 0 0 2.462-2.559c.453-.55.68-.824.68-1.243 0-.419-.227-.694-.68-1.243C21.895 10.745 18.242 7 14 7c-1.073 0-2.108.24-3.083.63l2.877 2.876a3.5 3.5 0 0 1 3.7 3.7l3.595 3.596Zm-9.996-5.753a3.5 3.5 0 0 0 4.857 4.857l2.691 2.692C17.242 20.422 15.666 21 14 21c-4.242 0-7.896-3.745-9.553-5.757-.453-.55-.68-.824-.68-1.243 0-.419.227-.694.68-1.243.82-.996 2.13-2.417 3.758-3.597l2.889 2.889Z",fill:"#B9BDCA"},null,-1),a("path",{d:"M5.833 2.333 24.5 21",stroke:"#B9BDCA","stroke-width":"2"},null,-1)],R={render:function(e,a){return l(),u("svg",t,V)}},S={width:"28",height:"28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},I=[a("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M24.273 14c0-.353-.193-.593-.58-1.072C22.11 10.968 18.366 7 14 7c-4.365 0-8.109 3.967-9.692 5.928-.387.48-.58.719-.58 1.072 0 .353.193.593.58 1.072C5.89 17.032 9.635 21 14 21c4.366 0 8.11-3.967 9.693-5.928.387-.48.58-.719.58-1.072ZM14 17.5a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7Z",fill:"#CCD2E3"},null,-1)],Z={render:function(e,t){return l(),u("svg",S,I)}},_=a("span",{class:"left-input-icon"},null,-1),A=["type","disabled","placeholder"],F={key:0,class:"custom-pwd-hide-button"},L={key:0,class:"remember-select-box"},M=["onClick"],N={class:"account"},j=a("div",{class:"password"},"********",-1),D={key:0,class:"custom-input-rule"};e("_",s({__name:"index",props:{className:{default:""},type:{default:"text"},placeholder:{default:"请输入"},num:null,rules:null,modelValue:null,disabled:{type:Boolean,default:!1},needSelect:{type:Boolean,default:!1},selectList:{default:[]},align:{default:"center"},height:{default:"32px"},autoFocus:{type:Boolean,default:!1},theme:{default:"dark"},borderRadius:{default:"4px"},width:{default:"200px"},id:{default:""},blurNum:{default:1}},emits:["update:modelValue","submitType","submitAccount","inputChange","inputBlur"],setup(e,{emit:t}){const s=e,V=i(s.modelValue),S=i(),I=i(!1),T=n({status:!1,message:""}),U=i("text"),$=i("private"),q=()=>{s.needSelect&&(I.value=!0)},E=()=>{s.needSelect&&(I.value=!1),t("inputBlur",V.value,s.id)},J=e=>{T.status=!0,T.message=e.message,t("submitType",!1)},K=()=>{T.status=!1,T.message="",t("submitType",!0)};"password"==s.type&&(U.value=s.type);const Q=e=>{$.value="text"===e?"public":"private",U.value=e},Y=()=>{const{rules:e}=s;let t=V.value;if(e)for(let l in e){let u=e[l];if(u.required&&!t)return void J(u);if(K(),u.validator){let e=u.validator(t);if(!e.status)return void J(e);K()}if("email"==u.type){if(!B.test(t))return void J(u);K()}if(u.min&&t.length<u.min)return void J(u);K()}};return d((()=>V.value),(e=>{t("update:modelValue",e),Y()})),d((()=>s.modelValue),(e=>{V.value=e})),d((()=>s.num),(e=>{Y()})),o((()=>{s.autoFocus&&S.value.focus()})),d((()=>s.blurNum),(e=>{S.value&&S.value.focus()})),(i,n)=>(l(),u("div",{class:w(["custom-input-global",e.className]),style:m({width:e.width})},[a("div",{class:w(["custom-input-box",{"custom-input-error":T.status,"dark-input-box":"dark"===e.theme,"light-input-box":"light"===e.theme,"opacity-input-box":"opacity"===e.theme}]),style:m({height:e.height,borderRadius:e.borderRadius})},[r(i.$slots,"leftIcon",{},(()=>[_])),c(a("input",{ref_key:"customInput",ref:S,type:U.value,"onUpdate:modelValue":n[0]||(n[0]=e=>V.value=e),class:"cust-input",disabled:e.disabled,placeholder:e.placeholder,onFocus:q,onBlur:E,onInput:n[1]||(n[1]=e=>(e=>{const{type:l}=s;"number"==l&&(V.value=e.replace(/[^\d]/g,"")),t("inputChange",V.value)})(V.value)),style:m({"text-align":e.align,borderRadius:e.borderRadius})},null,44,A),[[p,V.value]]),r(i.$slots,"rightIcon",{},(()=>["password"===e.type?(l(),u("span",F,["private"===$.value?(l(),k(C(R),{key:0,onClick:n[2]||(n[2]=e=>Q("text"))})):(l(),k(C(Z),{key:1,onClick:n[3]||(n[3]=e=>Q("password"))}))])):y("",!0)])),v(b,{name:"remember-fade"},{default:f((()=>[e.needSelect&&I.value&&e.selectList.length?(l(),u("div",L,[(l(!0),u(h,null,g(e.selectList,(e=>(l(),u("div",{key:e.account,class:"line",onClick:l=>(e=>{t("submitAccount",e)})(e)},[a("div",N,x(e.account),1),j],8,M)))),128))])):y("",!0)])),_:1})],6),e.rules&&e.rules.length?(l(),u("div",D,x(T.message),1)):y("",!0)],6))}}))}}}));
System.register(["./index-legacy-671251eb.js","./userApi-legacy-f48623ab.js","./Common-legacy-6e401395.js","./index-legacy-447759e3.js","./index-legacy-31c6062c.js","./vue-legacy-e1572d11.js","./otherRequest-legacy-ad8ec785.js"],(function(e,a){"use strict";var l,t,o,u,n,s,d,i,c,p,r,v,m,g,f,y,b,h,I,V,_;return{setters:[e=>{l=e.U,t=e.v},e=>{o=e.s,u=e.B,n=e.y},e=>{s=e.b},e=>{d=e.D},e=>{i=e._},e=>{c=e.d,p=e.r,r=e.w,v=e.I,m=e.J,g=e.R,f=e.S,y=e.Y,b=e.a,h=e.O,I=e.o,V=e.X},e=>{_=e.i}],execute:function(){e("L",{LIVE_AUDIT_STATUS_EXAMINE:1,LIVE_AUDIT_STATUS_PROCEED:2,LIVE_AUDIT_STATUS_FINISH:3,LIVE_AUDIT_STATUS_ERROR:4});const a={class:"custom-mizable-dialog-body"},A={class:"title"},U={class:"input-box"},S={class:"label"},w=c({__name:"dialog",props:{modelValue:{type:Boolean},value:null,dialogInfo:{default:{}}},emits:["update:modelValue","update:value","confirm"],setup(e,{emit:l}){const t=e,u=p(t.value);r((()=>t.modelValue),(e=>{l("update:modelValue",e)}));const n=()=>{u.value?(l("update:modelValue",!1),l("confirm",u.value)):o("请输入名称")};return r((()=>t.value),(e=>{u.value=e})),r((()=>u.value),(e=>{l("update:value",e)})),(l,t)=>(v(),m(d,{modelValue:e.modelValue,"onUpdate:modelValue":t[1]||(t[1]=e=>h(modelValue)?modelValue.value=e:null),onConfirm:n},{default:g((()=>[f("div",a,[f("div",A,y(e.dialogInfo.title),1),f("div",U,[f("span",S,y(e.dialogInfo.inputLabel)+":",1),b(i,{modelValue:u.value,"onUpdate:modelValue":t[0]||(t[0]=e=>u.value=e),align:"left",placeholder:e.dialogInfo.placeholder},null,8,["modelValue","placeholder"])])])])),_:1},8,["modelValue"]))}});e("C",c({props:{icon:Object,label:String,uploadInfo:Object,accept:{type:String,default:""},dialogInfo:{type:Object,default:{}},video:{type:Boolean,default:!1},submit:{type:[Function,Boolean],default:!1}},setup(e,{slots:a}){const d=p({}),i=p(""),c=p(""),v=p(""),m=p(!1),g=p("");I((async()=>{d.value=await s()}));const f=()=>{i.value=""},y=async()=>{i.value||n()?m.value=!0:o("请先上传文件")},h=async e=>(e=await function(e){const a=e.split(","),l=a[0].match(/:(.*?);/)[1],t=atob(a[1]);let o=t.length;const u=new Uint8Array(o);for(;o--;)u[o]=t.charCodeAt(o);return new Blob([u],{type:l})}(e),new Promise((a=>{const l=t();let o="";const u=d.value;o="https://"+u.host;const n=new FormData;n.append("key",u.dir+l+".png"),n.append("policy",u.policy),n.append("OSSAccessKeyId",u.accessid),n.append("success_action_status","200"),n.append("callback",u.callback),n.append("signature",u.signature),console.log(e),n.append("file",e),_.post(o,n,{headers:{"Content-Type":"multipart/form-data;charset=utf-8"}}).then((e=>{if(""===e||200==e){const e=u.domain+u.dir+l+".png";v.value=e,a({status:"success",response:{url:""}})}})).catch((e=>{console.log(e)}))}))),A=async()=>new Promise(((e,a)=>{let l=null,t=document.createElement("video");t.setAttribute("crossOrigin","Anonymous"),t.setAttribute("src",i.value),t.setAttribute("preload","auto"),t.currentTime=.001,t.addEventListener("loadeddata",(function(){let a,o=document.createElement("canvas"),u=t.videoWidth,n=t.videoHeight,s=0;u<n?(console.log("上下长图片"),a=300,s=n/2-150,console.log("splitHeight:",s)):(console.log("左右宽图片"),a=n),o.width=512,o.height=300,o.getContext("2d").drawImage(t,0,s,u,a,0,0,o.width,o.height),l=o.toDataURL("image/png"),e(l)}))})),U=async a=>{e.video?a&&i.value&&v.value?e.submit&&await e.submit({video_url:i.value,name:a,cover_url:v.value})&&(v.value="",i.value="",g.value=""):o("缺少数据"):a&&i.value&&e.submit&&await e.submit({audio_url:i.value,name:a})&&(i.value="",g.value="")};return r((()=>i.value),(a=>{a&&e.video?(async()=>{let e=await A();h(e)})():c.value=""})),()=>b("div",{class:"custom-izable-page"},[b("div",{class:"header"},[e.icon,b("span",null,[e.label])]),b("div",{class:"izable-page-upload-box"},[b(l,{modelValue:i.value,"onUpdate:modelValue":e=>i.value=e,uploadInfo:e.uploadInfo,accept:e.accept,config:d.value},null),b("div",{class:"upload-box-footer"},[b(u,{theme:"opacity",onClick:f},{default:()=>[V("重置")]}),b(u,{theme:"green",onClick:y},{default:()=>[V("生成")]})])]),b("div",{class:"izable-page-tabs"},[a.default?.()]),b(w,{value:g.value,"onUpdate:value":e=>g.value=e,onConfirm:U,dialogInfo:e.dialogInfo,modelValue:m.value,"onUpdate:modelValue":e=>m.value=e},null)])}}))}}}));
System.register(["./userApi-legacy-f48623ab.js","./vue-legacy-e1572d11.js"],(function(e,t){"use strict";var l,a,s,n,o,i,u,d,r,c,m,f,v,p,h,b,g,y,_,k,V,C,w;return{setters:[e=>{l=e.B},e=>{a=e.d,s=e.r,n=e.w,o=e.I,i=e.J,u=e.R,d=e.Q,r=e.a,c=e.V,m=e.Z,f=e.S,v=e.K,p=e.X,h=e.D,b=e.a1,g=e.j,y=e.o,_=e.s,k=e.p,V=e.e,C=e.z,w=e.i}],execute:function(){const t={class:"header-default"},x={key:0,class:"footer-default"},S=p("取消"),W=p("确定"),B=a({__name:"Dialog",props:{modelValue:{type:Boolean},header:null,footer:{type:Boolean,default:null},placement:{default:"center"},destroyOnClose:{type:Boolean,default:!1},className:{default:""}},emits:["update:modelValue","confirm"],setup(e,{emit:a}){const p=e,b=s(p.modelValue);n((()=>p.modelValue),(e=>{b.value=e})),n((()=>b.value),(e=>{a("update:modelValue",e)}));const g=()=>{a("confirm")};return(a,s)=>{const n=h("t-dialog");return o(),i(n,{visible:b.value,"onUpdate:visible":s[1]||(s[1]=e=>b.value=e),attach:"body",class:v([e.className,"c-dialog-default"]),destroyOnClose:e.destroyOnClose,placement:e.placement},{footer:u((()=>[null===e.footer?(o(),d("div",x,[r(l,{onClick:s[0]||(s[0]=e=>b.value=!1),class:"footer-cancel footer-public-btn"},{default:u((()=>[S])),_:1}),r(l,{onClick:g,class:"footer-confrim footer-public-btn"},{default:u((()=>[W])),_:1})])):c("",!0)])),default:u((()=>[m(a.$slots,"default"),f("div",t,[m(a.$slots,"header")]),m(a.$slots,"body"),e.footer?m(a.$slots,"footer",{key:0}):c("",!0)])),_:3},8,["visible","class","destroyOnClose","placement"])}}});e("D",B),e("a",a({props:{modelValue:String,theme:{type:String,default:"light"},defaultLineWidth:{type:Number,default:0}},emits:["update:modelValue"],setup(e,t){const{slots:l,emit:a}=t,n=b(),o=s(e.modelValue);k("currentTab",o);const i=s((()=>{const e=n.default().map((({props:e})=>{if(e){const{label:t,name:l}=e;return{label:t,name:l}}}));return e})()),u=g({width:0,left:0,right:0}),d=s((()=>{const{modelValue:t}=e;if(i&&t){let e=i.value.findIndex((e=>e.name==t));return-1!==e?e:0}return 0})()),c=s([]),m=e=>{e&&-1===c.value.findIndex((t=>t===e))&&c.value.push(e)},f=()=>{_((()=>{const t=c.value[d.value];t.clientWidth?u.width=t.clientWidth:u.width=e.defaultLineWidth}))},v=(e,t)=>{o.value=e,a("update:modelValue",e),d.value=t,f(),_((()=>{let e=0;for(let t=0;t<d.value;t++)e+=c.value[t].clientWidth;u.right=null,u.left=e}))},p=t=>e.modelValue===t.name?"light"===e.theme?"c-nav-item_active":"dark2"===e.theme?"c-nav-item-_active_dark2":"c-nav-item_active_dark":"";return y((()=>{f()})),()=>r("div",{class:"custom-c-tabs"},[r("div",{class:"c-tabs-header"},[l.rightComponent?.(),i.value.map(((t,l)=>r("div",{key:t.name,class:["c-nav-item-default","light"===e.theme?"c-nav-item-light":"dark2"===e.theme?"c-nav-item-dark2":"c-nav-item-dark",p(t)],ref:m,onClick:v.bind(this,t.name,l)},[r("div",{class:"c-tabs__nav-item-wrapper"},[t.label])]))),"dark"===e.theme?r("div",{class:"c-tabs__bar",style:{width:u.width+"px",left:u.left+"px",right:u.right+"px"}},null):""]),r("div",{class:"c-tabs-content"},[l.default?.()])])}})),e("C",a({props:{name:String,label:String},setup(e,{emit:t,slots:l}){let a=w("currentTab");return()=>V(r("div",null,[l.default?.()]),[[C,a.value===e.name]])}}))}}}));
System.register(["./index-legacy-34161ba9.js","./Common-legacy-6e401395.js","./vue-legacy-e1572d11.js","./ConfirmDialog-legacy-f4d50655.js","./userApi-legacy-f48623ab.js","./cardOne-legacy-1ea6bcaf.js","./index-legacy-68247afe.js","./index-legacy-447759e3.js","./index-legacy-671251eb.js","./otherRequest-legacy-ad8ec785.js","./TdesignNext-legacy-e721ed2d.js","./index-legacy-31c6062c.js","./changeName-legacy-e0f05d42.js","./edit-legacy-59c4e814.js"],(function(e,l){"use strict";var s,a,t,c,i,n,u,d,r,o,m,v,g,_,h,y,f,p,L,U,I,w,T,R,A,S,k,j,E,V,C;return{setters:[e=>{s=e.L,a=e.C},e=>{t=e.g,c=e.L},e=>{i=e.d,n=e.j,u=e.r,d=e.o,r=e.I,o=e.Q,m=e.F,v=e.U,g=e.S,_=e.Y,h=e.L,y=e.V,f=e.X,p=e.e,L=e.z,U=e.a,I=e.W,w=e.J,T=e.R},e=>{R=e.C},e=>{A=e.B,S=e.w,k=e.s},e=>{j=e._},e=>{E=e.r},e=>{V=e.a,C=e.C},null,null,null,null,null,null],execute:function(){const b={class:"image-custom-record"},x={class:"left"},D=["src"],F={class:"center"},M={class:"name"},N=f(" 名称: "),Z={class:"create"},O=f(" 创建时间: "),q={class:"right"},H={key:0,class:"status"},P=["src"],X=g("div",null,"审核中",-1),z={key:1,class:"status"},B=["src"],J=g("div",null,"审核失败",-1),Q={key:2,class:"status"},W=["src"],Y=g("div",null,"进行中",-1),G={key:3,class:"status"},K=["src"],$=g("div",null,"已完成",-1),ee=i({__name:"Record",setup(e){const a={underReview:new URL(""+new URL("underReview-e1e9d152.svg",l.meta.url).href,self.location).href,auditFailure:new URL(""+new URL("auditFailure-aedeaf8e.svg",l.meta.url).href,self.location).href,progress:new URL(""+new URL("progress-6820e84c.svg",l.meta.url).href,self.location).href,success:new URL(""+new URL("success-38963be9.svg",l.meta.url).href,self.location).href},c=n({list:[]}),i=u(!1);return d((()=>{(async()=>{i.value=!0;let e=await t();c.list=e.myList,console.log(e.myList),i.value=!1})()})),(e,l)=>(r(),o("div",b,[(r(!0),o(m,null,v(c.list,(e=>(r(),o("div",{class:"record-items",key:e.id},[g("div",x,[g("img",{src:e.cover_url,alt:""},null,8,D)]),g("div",F,[g("div",M,[N,g("span",null,_(e.name),1)]),g("div",Z,[O,g("span",null,_(e.created_at),1)])]),g("div",q,[e.audit_status==h(s).LIVE_AUDIT_STATUS_EXAMINE?(r(),o("div",H,[g("img",{src:a.underReview},null,8,P),X])):e.audit_status==h(s).LIVE_AUDIT_STATUS_ERROR?(r(),o("div",z,[g("img",{src:a.auditFailure},null,8,B),J])):e.audit_status==h(s).LIVE_AUDIT_STATUS_PROCEED?(r(),o("div",Q,[g("img",{src:a.progress},null,8,W),Y])):e.audit_status==h(s).LIVE_AUDIT_STATUS_FINISH?(r(),o("div",G,[g("img",{src:a.success},null,8,K),$])):y("",!0)])])))),128))]))}}),le={class:"image-custom-my-person-box"},se={class:"my-person-items"},ae={class:"my-digtal-people-hover2"},te=f("去合成"),ce={class:"digtal-people-hover-tool"},ie=f("删除"),ne={key:1,class:"my-person-loading-item"},ue={class:"progress"},de=g("div",{class:"tips"},"请耐心等待,此过程需要一些时间",-1),re={class:"name"},oe={key:2,class:"my-person-loading-item-examine"},me=g("div",{class:"tips"},"审核中",-1),ve={class:"name"},ge=i({__name:"MyDigitalPerson",setup(e){const l=I(),a=n({list:[]}),i=u(!1),f=u(!1),S=u(),k=(e,l)=>{},V=()=>{};return d((()=>{(async()=>{i.value=!0;let e=await t();a.list=e.myList,i.value=!1})()})),(e,t)=>(r(),o("div",le,[p(U(c,null,null,512),[[L,i.value]]),g("div",se,[(r(!0),o(m,null,v(a.list,(e=>(r(),o(m,{key:e.id},[e.audit_status==h(s).LIVE_AUDIT_STATUS_FINISH?(r(),w(j,{key:0,id:e.id,img:e.cover_url,name:e.name,edit:!0,onNameChange:k},{hover:T((()=>[g("div",ae,[(r(),w(A,{key:0,class:"digtal-people-start-end",theme:"danger",height:"40px",onClick:s=>(e=>{l.push({path:E.createLive.path,name:E.createLive.name,query:{id:e.id,title:""}})})(e)},{default:T((()=>[te])),_:2},1032,["onClick"])),g("div",ce,[U(A,{size:"13",theme:"dark",onClick:l=>(e=>{f.value=!0,S.value=e.id})(e)},{default:T((()=>[ie])),_:2},1032,["onClick"])])])])),_:2},1032,["id","img","name"])):e.audit_status==h(s).LIVE_AUDIT_STATUS_PROCEED?(r(),o("div",ne,[U(c),g("div",ue,_(e.schedule)+"%",1),de,g("div",re,_(e.name),1)])):e.audit_status==h(s).LIVE_AUDIT_STATUS_EXAMINE?(r(),o("div",oe,[me,g("div",ve,_(e.name),1)])):y("",!0)],64)))),128))]),U(R,{modelValue:f.value,"onUpdate:modelValue":t[0]||(t[0]=e=>f.value=e),title:"确认删除吗?",onConfirm:V},null,8,["modelValue"])]))}}),_e={width:"40",height:"40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},he=[g("path",{d:"M31.94 33.198c-.117.84-.268 1.332-.496 1.497-.136.085-.43.207-.886.292-.446.086-1.012.208-1.67.286-.674.122-1.391.207-2.2.293-.81.096-1.627.182-2.436.25-.835.068-1.619.114-2.384.157-.6.036-3.86.036-4.452 0-.768-.043-1.56-.085-2.395-.157a77.536 77.536 0 0 1-2.428-.25 33.185 33.185 0 0 1-2.207-.293c-.659-.078-1.214-.2-1.67-.286-.445-.085-.743-.207-.876-.292-.228-.165-.386-.658-.497-1.497-.117-.84-.077-1.904.137-3.21.092-.504.242-.912.496-1.222.243-.322.556-.59.92-.84a6.824 6.824 0 0 1 1.188-.571c.43-.129.876-.268 1.358-.407.445-.14.901-.279 1.324-.433.43-.164.835-.339 1.17-.57.43-.269.743-.519.971-.772a2.69 2.69 0 0 0 .497-.747c.085-.25.162-.503.162-.753 0-.268 0-.536-.026-.883-.051-.442-.21-.832-.482-1.1a15.227 15.227 0 0 0-.92-.85c-.161-.128-.312-.34-.43-.59a6.923 6.923 0 0 1-.338-.77c-.085-.304-.203-.615-.287-.936a1.82 1.82 0 0 1-.43-.207c-.119-.086-.255-.25-.387-.433a2.255 2.255 0 0 1-.364-.796c-.092-.34-.136-.657-.11-.925a2.394 2.394 0 0 1 .562-1.386c0-.76.04-1.507.11-2.286.092-.632.221-1.332.431-2.079.195-.746.515-1.41.92-2 .404-.564.828-1.014 1.28-1.36a6.92 6.92 0 0 1 1.442-.84c.497-.2.994-.339 1.494-.4a9.01 9.01 0 0 1 1.416-.121c.066 0 .136 0 .195.007.066-.007.125-.007.195-.007.445 0 .92.043 1.417.121.496.061.985.2 1.493.4.49.207.986.504 1.435.84.456.346.887.796 1.291 1.36.398.59.718 1.258.92 2 .202.743.338 1.447.423 2.08.066.778.118 1.524.118 2.285.176.218.294.407.386.632.085.225.151.475.177.754.026.268-.026.59-.118.925-.085.364-.22.614-.364.796-.136.183-.261.347-.38.433a2.049 2.049 0 0 1-.43.207c-.092.321-.21.632-.294.935-.092.268-.21.518-.338.772a1.61 1.61 0 0 1-.43.59c-.34.292-.648.57-.92.85-.27.267-.424.657-.471 1.1-.026.346-.026.614-.026.881 0 .25.066.504.15.754.118.25.27.493.497.747.236.25.541.503.979.771.338.232.732.407 1.162.572.43.157.876.292 1.332.432.471.139.92.278 1.35.407.43.157.835.346 1.196.571.364.25.673.518.92.84.243.31.397.718.496 1.221.2 1.304.243 2.368.133 3.211ZM12.653 5.143c0 .314-.132.6-.346.807a1.192 1.192 0 0 1-.831.336h-4.12v4c0 .632-.527 1.143-1.178 1.143-.323 0-.618-.129-.831-.336A1.123 1.123 0 0 1 5 10.286V5.143C5 4.51 5.526 4 6.177 4h5.298c.651 0 1.177.51 1.177 1.143Z",fill:"#2770FF"},null,-1),g("path",{d:"M12.54 22.857c0 .314-.13.6-.34.807-.211.207-.501.336-.82.336H6.16A1.15 1.15 0 0 1 5 22.857v-5.143a1.15 1.15 0 0 1 1.16-1.143c.319 0 .609.129.82.336.21.207.34.493.34.807v4h4.06c.642 0 1.16.511 1.16 1.143ZM34 17.714v5.143A1.15 1.15 0 0 1 32.84 24h-5.22a1.15 1.15 0 0 1-1.16-1.143c0-.314.13-.6.34-.807.211-.207.501-.336.82-.336h4.06v-4a1.15 1.15 0 0 1 1.16-1.143c.319 0 .609.129.82.336.21.207.34.493.34.807Zm0-12.571v5.143a1.15 1.15 0 0 1-1.16 1.143c-.319 0-.609-.129-.82-.336a1.131 1.131 0 0 1-.34-.807v-4h-4.06a1.15 1.15 0 0 1-1.16-1.143c0-.314.13-.6.34-.807.211-.207.501-.336.82-.336h5.22c.642 0 1.16.51 1.16 1.143Z",fill:"#2770FF"},null,-1)],ye={render:function(e,l){return r(),o("svg",_e,he)}},fe={class:""};e("default",i({__name:"index",setup(e){const s=u("1"),t={success:new URL(""+new URL("success2-016cfe10.svg",l.meta.url).href,self.location).href},c={title:"形象定制",inputLabel:"数字人名称",placeholder:"请输入数字人名称"},i={label1:"选择视频",label2:"或拖视频到此处上传",buttonLabel:"选择视频",successIcon:t.success,successButtonLabel:"替换视频"},n=async e=>{try{if(0==(await S(e)).code)return k("提交成功","success"),!0}catch(l){console.log(l)}};return(e,l)=>(r(),o("div",fe,[U(h(a),{video:!0,submit:n,icon:U(ye,null,null),uploadInfo:i,dialogInfo:c,label:"形象定制"},{default:T((()=>[U(h(V),{modelValue:s.value,"onUpdate:modelValue":l[0]||(l[0]=e=>s.value=e),theme:"dark2"},{default:T((()=>[U(h(C),{name:"1",label:"我的数字人"},{default:T((()=>[U(ge)])),_:1}),U(h(C),{name:"2",label:"生成记录"},{default:T((()=>[U(ee)])),_:1})])),_:1},8,["modelValue"])])),_:1},8,["icon"])]))}}))}}}));
System.register(["./vue-legacy-e1572d11.js","./userApi-legacy-f48623ab.js","./otherRequest-legacy-ad8ec785.js","./TdesignNext-legacy-e721ed2d.js"],(function(e,t){"use strict";var a,l,s,u,o,c,n,r,d,i,p,m,f,g,h,v,y,w;return{setters:[e=>{a=e.I,l=e.Q,s=e.S,u=e.d,o=e.r,c=e.j,n=e.w,r=e.a,d=e.X},e=>{i=e.z,p=e.B,m=e.s,f=e.y},e=>{g=e.i},e=>{h=e.B,v=e.U,y=e.i,w=e.M}],execute:function(){e("v",k);const t={width:"50",height:"50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},I=[s("path",{d:"M48.75 27.188c0-.313 0-.625-.313-1.25L42.5 15.624c-.625-.938-1.563-1.25-2.5-.625-.938.625-1.25 1.563-.625 2.5l4.688 8.125H36.25c-.938 0-1.563.625-1.875 1.563-.313 2.187-1.563 4.375-3.125 5.625A10.065 10.065 0 0 1 25 35c-2.188 0-4.375-.938-6.25-2.188-1.563-1.562-2.813-3.437-3.125-5.624 0-.938-.938-1.563-1.875-1.563H5.937l4.688-8.125c.625-.938.313-1.875-.625-2.5s-1.875-.313-2.5.625L1.562 25.938c-.312.312-.312.937-.312 1.25v16.875c0 .937.938 1.874 1.875 1.874h43.75c.938 0 1.875-.937 1.875-1.874V27.186Zm-3.75 15H5V29.062h7.5c.625 2.5 2.188 4.688 4.063 6.25C18.75 37.5 21.875 38.75 25 38.75c3.125 0 6.25-1.25 8.438-3.125 1.874-1.563 3.437-3.75 4.062-6.25H45v12.813ZM14.687 18.125H20v11.25c0 .625.625.938.938.938h7.5c.625 0 1.25-.625 1.25-.938v-11.25H35c.625 0 1.25-.625 1.25-1.25 0-.313 0-.625-.313-.625l-10.312-10c-.313-.625-.938-.625-1.563 0l-10 10c-.312.313-.312 1.25 0 1.563 0 .312.313.312.626.312ZM25 8.437l7.813 7.5H28.75c-.625 0-.938.626-.938 1.25v10.938h-5.625V17.187c0-.625-.625-.937-1.25-.937H17.5L25 8.437Z",fill:"#888FA1"},null,-1)],b={render:function(e,s){return a(),l("svg",t,I)}};let U;const V=new Uint8Array(16);function S(){if(!U&&(U="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!U))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return U(V)}const j=[];for(let e=0;e<256;++e)j.push((e+256).toString(16).slice(1));const H={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function k(e,t,a){if(H.randomUUID&&!t&&!e)return H.randomUUID();const l=(e=e||{}).random||(e.rng||S)();if(l[6]=15&l[6]|64,l[8]=63&l[8]|128,t){a=a||0;for(let e=0;e<16;++e)t[a+e]=l[e];return t}return function(e,t=0){return(j[e[t+0]]+j[e[t+1]]+j[e[t+2]]+j[e[t+3]]+"-"+j[e[t+4]]+j[e[t+5]]+"-"+j[e[t+6]]+j[e[t+7]]+"-"+j[e[t+8]]+j[e[t+9]]+"-"+j[e[t+10]]+j[e[t+11]]+j[e[t+12]]+j[e[t+13]]+j[e[t+14]]+j[e[t+15]]).toLowerCase()}(l)}e("U",u({props:{modelValue:String,config:Object,rules:Array,uploadInfo:{type:Object,default:{}},accept:{type:String,default:""}},emits:["update:modelValue","change","file"],setup(e,{emit:t}){const a=o([]),l=c({url:"",status:0,uploadStatus:!1}),s=o(""),u=o(0);let I=null;const U=async t=>{try{const{config:a}=e;if(!a)return void m("缺少必要的配置");if(!Object.keys(a).length)return m("无法上传,请尝试刷新页面"),!1;if(e.accept&&!f()){let a=t.name.split(".")[1];if(-1==e.accept.indexOf(a))return m(`本次上传仅支持${e.accept}格式`),!1}return!0}catch(a){return console.log(a),!1}},V=({file:e})=>{w.error(`文件 ${e.name} 上传失败`)},S=a=>(u.value=0,I=setInterval((()=>{99!=u.value&&(u.value+=1)}),100),new Promise((s=>{const u=k();l.status=1;let o="";const{config:c}=e;o="https://"+c.host;let n=a.name.split(".")[1];setTimeout((()=>{const e=new FormData;e.append("key",c.dir+u+`.${n}`),e.append("policy",c.policy),e.append("OSSAccessKeyId",c.accessid),e.append("success_action_status","200"),e.append("callback",c.callback),e.append("signature",c.signature),e.append("file",a.raw),t("file",a.raw),g.post(o,e,{headers:{"Content-Type":"multipart/form-data;charset=utf-8"}}).then((e=>{""===e||200==e?(((e,a)=>{window.clearInterval(I),w.success("上传成功"),l.url=a,l.status=2,t("update:modelValue",l.url),t("change",l.url)})(0,c.domain+c.dir+u+`.${n}`),l.uploadStatus=!0,s({status:"success",response:{url:l.url}})):(window.clearInterval(I),l.url="",l.status=0,t("update:modelValue",l.url),t("change",l.url),w.warning("上传失败"),l.uploadStatus=!1)})).catch((e=>{console.log(e)}))}),1e3)})));n((()=>e.modelValue),(e=>{e&&(l.url=e,l.status=2)}));const j=()=>{a.value=[],l.url="",l.status=0,l.uploadStatus=!1,t("update:modelValue",""),t("change","")},H=async e=>S(e),x=()=>0==l.status?r(v,{modelValue:a.value,"onUpdate:modelValue":e=>a.value=e,method:"PUT",requestMethod:H,action:s.value,headers:{authorization:`Bearer ${i()}`},theme:"custom","before-upload":U,multiple:!0,max:1,draggable:!0,onFail:V},{default:()=>[r("div",{class:"custom-upload-click-box"},[r("div",{class:"title"},[e.uploadInfo.label1??"选择图片"]),r("div",{class:"title2"},[e.uploadInfo.label2??"或拖拽图片到此处"]),r("div",null,[r(b,null,null)]),r(h,{class:"custom-chose-file"},{default:()=>[e.uploadInfo.buttonLabel??"选择文件"]})])]}):1==l.status?r("div",{class:"custom-uploading-stauts"},[r(y,{class:"custom-t-progress",theme:"circle",percentage:u.value,size:"small",color:"#00f9f9"},null),r("div",{class:"uploading-title"},[d("正在上传")])]):r("div",{class:"custom-UploadSuccess-stauts"},[r("div",{class:"icon"},[e.uploadInfo.successIcon?r("img",{src:e.uploadInfo.successIcon,alt:""},null):""]),r("div",{class:"file-name"},null),r(p,{class:"reset-submit",theme:"green",onClick:j},{default:()=>[e.uploadInfo.successButtonLabel??"重新上传"]})]);return n((()=>e.modelValue),(e=>{e||(l.status=0)})),()=>r("div",{class:"custom-real-upload"},[r("div",{class:"real-upload-content"},[r("div",{class:"custom-real-upload-component"},[x()])])])}}))}}}));
This source diff could not be displayed because it is too large. You can view the blob instead.
System.register(["./plugin-vue_export-helper-legacy-762b7923.js","./vue-legacy-e1572d11.js"],(function(e,t){"use strict";var r,n,s;return{setters:[e=>{r=e._},e=>{n=e.I,s=e.Q}],execute:function(){const t={class:""};e("default",r({},[["render",function(e,r){return n(),s("div",t,"直播管理页面")}]]))}}}));
System.register(["./index-legacy-31c6062c.js","./userApi-legacy-f48623ab.js","./vue-legacy-e1572d11.js","./TdesignNext-legacy-e721ed2d.js","./index-legacy-68247afe.js"],(function(e,l){"use strict";var a,s,t,o,c,r,n,u,i,d,m,p,g,f,b,v,w,h,_,y;return{setters:[e=>{a=e._},e=>{s=e.B,t=e.U,o=e.s},e=>{c=e.d,r=e.r,n=e.j,u=e.c,i=e.o,d=e.I,m=e.Q,p=e.S,g=e.a,f=e.R,b=e.L,v=e.X,w=e.M,h=e.W,_=e.D},e=>{y=e.c},null],execute:function(){const x="remember_phone",S="remember_email",V=e=>{let l="";l="phone"==e?x:S;const a=localStorage.getItem(l);return a?JSON.parse(a):[]},U={class:"login-page"},j={class:"logo"},I=["src"],L={class:"login-content"},N=p("div",{class:"label"},"登录账户",-1),k={class:"form-item-box"},q=p("div",{class:"label required"},"账号",-1),R={class:"form-item-box"},A=p("div",{class:"label required"},"请输入密码",-1),J=v("记住密码"),O={class:"submit-box"},T=v("登录");e("default",c({__name:"index",setup(e){const c=w(),v=h(),B=r(!1),D={logo:new URL(""+new URL("logo-1c58bd8a.svg",l.meta.url).href,self.location).href},E=r(!1),M=n({list:[]}),Q=n({account:"",password:""}),W=u((()=>({account:[{required:!0,message:"账号不能为空",type:"error"}],password:[{required:!0,message:"密码不能为空",type:"error"}]}))),X=e=>{Q.account=e.account,Q.password=e.password},z=async({validateResult:e,firstError:l})=>{if(!0===e)try{B.value=!0;let e=await t({email:Q.account,password:Q.password});0==e.code&&(o("登录成功","success"),c.commit("user/setToken",{token:e.data.access_token,time:e.data.expires_in}),c.dispatch("user/UserInfo"),v.replace({path:"/"}),E.value&&((e,l)=>{let a=[e],s="";"phone"==l?s=x:"email"==l&&(s=S);const t=V(s);if(t.length){const l=t.findIndex((l=>l.account==e.account));-1!==l&&t.splice(l,1),a=a.concat(t)}localStorage.setItem(s,JSON.stringify(a))})({account:Q.account,password:Q.password},"email")),B.value=!1}catch(a){console.log(a),B.value=!1}else o(l,"warning")};return i((()=>{M.list=V("email")})),(e,l)=>{const t=_("t-form-item"),o=_("t-checkbox");return d(),m("div",U,[p("div",j,[p("img",{src:D.logo,alt:""},null,8,I)]),p("div",L,[N,g(b(y),{ref:"form",class:"custom-login-form",data:Q,rules:b(W),colon:!0,"label-width":0,onSubmit:z},{default:f((()=>[g(t,{name:"account"},{default:f((()=>[p("div",k,[q,g(a,{placeholder:"",needSelect:!0,selectList:M.list,modelValue:Q.account,"onUpdate:modelValue":l[0]||(l[0]=e=>Q.account=e),onSubmitAccount:X,align:"left",className:"reset-login-input"},null,8,["selectList","modelValue"])])])),_:1}),g(t,{name:"password"},{default:f((()=>[p("div",R,[A,g(a,{placeholder:"",className:"reset-login-input",type:"password",modelValue:Q.password,"onUpdate:modelValue":l[1]||(l[1]=e=>Q.password=e),align:"left"},null,8,["modelValue"])])])),_:1}),g(t,null,{default:f((()=>[g(o,{class:"remember-password-box",modelValue:E.value,"onUpdate:modelValue":l[2]||(l[2]=e=>E.value=e)},{default:f((()=>[J])),_:1},8,["modelValue"])])),_:1}),g(t,null,{default:f((()=>[p("div",O,[g(s,{type:"submit",theme:"green",class:"reset-login-submit-btn"},{default:f((()=>[T])),_:1})])])),_:1})])),_:1},8,["data","rules"])])])}}}))}}}));
System.register(["./vue-legacy-e1572d11.js","./plugin-vue_export-helper-legacy-762b7923.js","./Common-legacy-6e401395.js","./index-legacy-34161ba9.js","./changeName-legacy-e0f05d42.js","./ConfirmDialog-legacy-f4d50655.js","./index-legacy-447759e3.js","./userApi-legacy-f48623ab.js","./index-legacy-68247afe.js","./TdesignNext-legacy-e721ed2d.js","./index-legacy-671251eb.js","./otherRequest-legacy-ad8ec785.js","./index-legacy-31c6062c.js","./edit-legacy-59c4e814.js"],(function(l,e){"use strict";var a,s,t,u,n,c,i,r,o,d,v,g,y,m,p,A,f,h,k,I,U,_,w,R,L,S,C,T,O,b,B,E,V,x;return{setters:[l=>{a=l.d,s=l.u,t=l.m,u=l.r,n=l.c,c=l.w,i=l.I,r=l.Q,o=l.S,d=l.F,v=l.e,g=l.z,y=l.V,m=l.Y,p=l.a0,A=l.L,f=l.j,h=l.o,k=l.U,I=l.a,U=l.X,_=l.W,w=l.R},l=>{R=l._},l=>{L=l.c,S=l.L},l=>{C=l.L,T=l.C},l=>{O=l._},l=>{b=l.C},l=>{B=l.a,E=l.C},l=>{V=l.x,x=l.s},null,null,null,null,null,null],execute:function(){const j=["src"],P=["src"],F={class:"play-time"},Z={class:"play-progress"},M={key:1,class:"mode-2-audio"},N=["src"],K=["src"],q={class:"play-time"},Q={key:2,class:"mode-3-audio"},W=["src"],z=["src"],H=["src"],Y=a({__name:"Audio",props:{url:{default:""},need_progress:{type:Boolean,default:!0},bk:{default:"transparent"},autoPlay:{type:Boolean,default:!1},clickPlay:{type:Boolean,default:!1},mode:{default:"1"},canPlay:{type:Boolean,default:!1},status:{type:Boolean,default:!1},id:{default:0}},emits:["startPlay"],setup(l,{emit:a}){const f=l,h={start:new URL(""+new URL("startAudio-84529604.svg",e.meta.url).href,self.location).href,stop:new URL(""+new URL("stopAudio-0d6593f4.svg",e.meta.url).href,self.location).href};s((()=>{clearInterval(R.value)})),t((()=>{clearInterval(R.value)}));const k=u(),I=u(0),U=u(0),_=u(!1),w=u(0),R=u(),L=u(0),S=n((()=>function(){const{url:l}=f;return"string"==typeof l?l:l[L.value]})),C=()=>{I.value=k?.value.duration||0,f.canPlay};c((()=>f.status),(l=>{console.log(l),l||O()}));const T=async()=>{await k.value.play(),a("startPlay",f.id),_.value=!0,I.value=k.value.duration,R.value=setInterval((()=>{U.value=k.value.currentTime,w.value=U.value/I.value*100,100===w.value&&("string"==typeof f.url||(async()=>{const{url:l}=f;l&&l.length&&(L.value===l.length-1?await O():L.value<l.length-1&&(L.value+=1,await O(),T()))})())}),100)},O=async()=>{await k.value.pause(),_.value=!1,clearInterval(R.value)},b=l=>{let e="",a=parseInt(String(l/3600));l%=3600;let s=parseInt(String(l/60)),t=parseInt(String(l%60));return e=B(a>0?a+":"+s+":"+t:s+":"+t),e},B=l=>{let e="",a=l.split(":"),s=0;for(;s<a.length-1;s++)e+=1==a[s].length?"0"+a[s]:a[s],e+=":";return e+=1==a[s].length?"0"+a[s]:a[s],e};return(e,a)=>(i(),r(d,null,[o("div",{class:"audio-player",style:p({background:l.bk})},["1"===l.mode?(i(),r(d,{key:0},[l.clickPlay?(i(),r(d,{key:0},[v(o("img",{src:h.start,alt:"",class:"play-icon",onClick:T},null,8,j),[[g,!_.value]]),v(o("img",{src:h.stop,alt:"",class:"play-icon",onClick:O},null,8,P),[[g,_.value]])],64)):y("",!0),l.need_progress?(i(),r(d,{key:1},[o("span",F,m(b(U.value))+"/"+m(b(I.value)),1),o("div",Z,[o("div",{class:"play-current-progress",style:p({width:`${w.value}%`})},null,4)])],64)):y("",!0)],64)):"2"===l.mode?(i(),r("div",M,[o("div",null,[v(o("img",{src:h.start,alt:"",class:"play-icon",onClick:T},null,8,N),[[g,!_.value]]),v(o("img",{src:h.stop,alt:"",class:"play-icon",onClick:O},null,8,K),[[g,_.value]])]),o("div",null,[o("span",q,m(b(U.value))+"/"+m(b(I.value)),1)])])):"3"===l.mode?(i(),r("div",Q,[o("div",null,[v(o("img",{src:h.start,alt:"",class:"play-icon",onClick:T},null,8,W),[[g,!_.value]]),v(o("img",{src:h.stop,alt:"",class:"play-icon",onClick:O},null,8,z),[[g,_.value]])])])):y("",!0)],4),o("audio",{ref_key:"audioRef",ref:k,src:A(S)(),onCanplay:C},null,40,H)],64))}}),D=R(Y,[["__scopeId","data-v-314b032e"]]),X={class:"image-custom-record"},G={class:"left"},J={class:"center"},$={class:"name"},ll=U(" 名称: "),el={class:"create"},al=U(" 创建时间: "),sl={class:"right"},tl={key:0,class:"status"},ul=["src"],nl=o("div",null,"审核中",-1),cl={key:1,class:"status"},il=["src"],rl=o("div",null,"审核失败",-1),ol={key:2,class:"status"},dl=["src"],vl=o("div",null,"进行中",-1),gl={key:3,class:"status"},yl=["src"],ml=o("div",null,"已完成",-1),pl=a({__name:"Record",setup(l){const a={underReview:new URL(""+new URL("underReview-e1e9d152.svg",e.meta.url).href,self.location).href,auditFailure:new URL(""+new URL("auditFailure-aedeaf8e.svg",e.meta.url).href,self.location).href,progress:new URL(""+new URL("progress-6820e84c.svg",e.meta.url).href,self.location).href,success:new URL(""+new URL("success-38963be9.svg",e.meta.url).href,self.location).href},s=f({list:[]}),t=u(!1),n=l=>{s.list.forEach((e=>{e.id==l?e.play_status=!0:e.play_status=!1}))};return h((()=>{(async()=>{try{t.value=!0;let l=await L();l.soundColor.forEach((l=>{l.play_status=!1})),s.list=l.soundColor,t.value=!1}catch(l){t.value=!1,console.log(l)}})()})),(l,e)=>(i(),r("div",X,[(i(!0),r(d,null,k(s.list,(l=>(i(),r("div",{class:"record-items",key:l.id},[o("div",G,[I(D,{url:l.audio_url,mode:"3",id:l.id,onStartPlay:n,clickPlay:!0,status:l.play_status},null,8,["url","id","status"])]),o("div",J,[o("div",$,[ll,o("span",null,m(l.name),1)]),o("div",el,[al,o("span",null,m(l.created_at),1)])]),o("div",sl,[l.audit_status==A(C).LIVE_AUDIT_STATUS_EXAMINE?(i(),r("div",tl,[o("img",{src:a.underReview},null,8,ul),nl])):l.audit_status==A(C).LIVE_AUDIT_STATUS_ERROR?(i(),r("div",cl,[o("img",{src:a.auditFailure},null,8,il),rl])):l.audit_status==A(C).LIVE_AUDIT_STATUS_PROCEED?(i(),r("div",ol,[o("img",{src:a.progress},null,8,dl),vl])):l.audit_status==A(C).LIVE_AUDIT_STATUS_FINISH?(i(),r("div",gl,[o("img",{src:a.success},null,8,yl),ml])):y("",!0)])])))),128))]))}}),Al={class:"image-custom-my-person-box"},fl={class:"my-person-items"},hl={key:0,class:"my-person-loading-item"},kl={key:0},Il=a({__name:"MyDigitalPerson",setup(l){_();const e=f({list:[]}),a=u(!1);u();const s=u(!1),t=l=>{e.list.forEach((e=>{e.id==l?e.play_status=!0:e.play_status=!1}))},n=()=>{};return h((()=>{(async()=>{try{s.value=!0;let l=await L();l.soundColor.forEach((l=>{l.play_status=!1})),e.list=l.soundColor,s.value=!1}catch(l){s.value=!1,console.log(l)}})()})),(l,u)=>(i(),r("div",Al,[v(I(S,null,null,512),[[g,s.value]]),o("div",fl,[(i(!0),r(d,null,k(e.list,(l=>(i(),r(d,{key:l.id},[(l.audit_status,A(C).LIVE_AUDIT_STATUS_FINISH,i(),r("div",hl,[I(D,{url:l.audio_url,mode:"2",id:l.id,onStartPlay:t,clickPlay:!0,status:l.play_status},null,8,["url","id","status"]),I(O,{value:l.name},null,8,["value"])]))],64)))),128)),(i(!0),r(d,null,k(e.list,((l,a)=>(i(),r(d,{key:l.id},[a!=e.list.length-1?(i(),r("i",kl)):y("",!0)],64)))),128))]),I(b,{modelValue:a.value,"onUpdate:modelValue":u[0]||(u[0]=l=>a.value=l),title:"确认删除吗?",onConfirm:n},null,8,["modelValue"])]))}}),Ul={class:""};l("default",a({__name:"index",setup(l){const a={speak:new URL("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAOaSURBVHgB7ZhJaFRZFIb/c6vKpjWm03TTtrS22TR0Qze00PSgnRrigKII4kZQcQBxIQriygFinMGFuBDciEF0oRsVFRWHVKyIUUTNIitRI6I4oAkaTEzqveNf0dSUqkrey3u1ED94Vffec+q+v8595w4P+MJnjsAHVFWQCP8Iq++rdKOl3TL9xnM4xDOB2hitQsBaCRvz2O1vbPmugNtbXm0wSED0gNQ0Pxiq3xEL1Lo6g9iVOhbX8qqCMxqgffUSa2kv5jAigdpSOw49vefZzZ9wjT6CkVUSTlwoZHUtUBNTf4ZlLrH4C0ZOF4d9IUWezTcYuMUy2+GNuBQVfHaPaOO/1fkGVwK1sWYZv5bAW6ogoUP5je4iKNgIf4hqPBLLbnAskNPJ7/BuaAtgbciuuYhgchp8RWJ6cfo3AzXnAg3+gL8EEeiOZG7nGKmA3xhJr0JukmQ8/MbI9+kiHKBXauZAEYb/JAcKwxbI7K2m936UA8t+OlAclkC9MHMMjH2OxUkoB4LiArV15hi9XPtTTuOonh3c5P2K8tAu0WuJgcrgCHZ070Gg90xOm+gKlI/G7EqOwI9rrC6GJuczIXZqPDz5k6kB5cHi/nArigmESB1s2Q0TWMjnYAm0tyO1U5ZogptRM4UOJ+AnolvyN69pgRr/j9HSagQowjbrmBSbOakv5Z9q7f9ttOk6O/AzSW5KpHl7fmNWBIN/UWAbbHsco/cD7CfHKGs5YO9Ku1h6DL4gd2G65hayZAnUbzkJv2aUvmbGvkFg4lgKnYRQ6Famn+Bx+nTCW9p5n3kSvvMSpQVKB5eY8XwGKVIqOcQ9bOxEMplZOYy1mp05PRiVRuwtErn6uJg5I1CkjdGZgIB50S/MwmzW63ltSvvY1tF+m5dUhk6VMmcEhmMt/OymikUc4n1Qsw/oO0mBtWmf99oFeBhBxW2ZHO8clkCReps/2AiV9VyqD3MoLzNxqqW2uTXtPTq4F14idmhIl/wGvVpzkUIrJZL4Z5CtKXyN0Z0Cr1B9h/i0sVLP4BRh8FI3qmIBZa8p3KF9FF4iMhozLv1d0gUO0fhUnrpkFozegwYeIBi8z5dEB3mudXdWMVjOA3tDMXMQDuFOI7WY5yzo2vT/aVrcHqY6Shndv1nIxkIcbhA8xLNX50q7eASTaxmHeRuLE3INeMe7vGYhNZ2komUhNZeKuYFKc2CoacZzmOkT9US0StWfl6Nf+Oz4AOxOIjab5ZTQAAAAAElFTkSuQmCC",self.location).href,success:new URL(""+new URL("success1-983d8c8d.svg",e.meta.url).href,self.location).href},s=u("1"),t={title:"声音定制",inputLabel:"声音名称",placeholder:"请输入声音名称"},n={label1:"选择音频",label2:"或拖音频到此处上传",buttonLabel:"选择音频",successIcon:a.success,successButtonLabel:"替换音频"},c=async l=>{try{if(0==(await V(l)).code)return x("提交成功","success"),!0}catch(e){console.log(e)}};return(l,e)=>(i(),r("div",Ul,[I(A(T),{accept:"wav",submit:c,dialogInfo:t,icon:I("img",{src:a.speak,style:""},null),uploadInfo:n,label:"声音定制"},{default:w((()=>[I(A(B),{modelValue:s.value,"onUpdate:modelValue":e[0]||(e[0]=l=>s.value=l),theme:"dark2"},{default:w((()=>[I(A(E),{name:"1",label:"我的音色"},{default:w((()=>[I(Il)])),_:1}),I(A(E),{name:"2",label:"生成记录"},{default:w((()=>[I(pl)])),_:1})])),_:1},8,["modelValue"])])),_:1},8,["icon"])]))}}))}}}));
System.register(["./vue-legacy-e1572d11.js","./Common-legacy-6e401395.js","./cardOne-legacy-1ea6bcaf.js","./userApi-legacy-f48623ab.js","./index-legacy-447759e3.js","./index-legacy-68247afe.js","./ConfirmDialog-legacy-f4d50655.js","./changeName-legacy-e0f05d42.js","./index-legacy-31c6062c.js","./TdesignNext-legacy-e721ed2d.js","./edit-legacy-59c4e814.js"],(function(e,a){"use strict";var l,i,t,s,n,o,d,c,u,m,r,v,p,g,h,y,_,f,k,L,C,b,V,w,x,U,j,N,z,R,q,D,I,B,P,M,S,T,A,E;return{setters:[e=>{l=e.d,i=e.r,t=e.w,s=e.I,n=e.J,o=e.R,d=e.S,c=e.Q,u=e.U,m=e.F,r=e.V,v=e.W,p=e.a,g=e.X,h=e.Y,y=e.K,_=e.e,f=e.z,k=e.Z,L=e.j,C=e.o,b=e.L},e=>{V=e.L,w=e.o,x=e.a,U=e.g},e=>{j=e._},e=>{N=e.B,z=e.g,R=e.d,q=e.s,D=e.a,I=e.b},e=>{B=e.D,P=e.C,M=e.a},e=>{S=e.r},e=>{T=e.C},e=>{A=e._},e=>{E=e._},null,null],execute:function(){const F={class:"chose-person-dialog-body"},J=d("div",{class:"header"},"选择数字人",-1),K={class:"group-btns"},O={class:"person-list"},Q=l({__name:"digitalPeopleDiaog",props:{modelValue:{type:Boolean},adminList:null,myList:null},emits:["update:modelValue"],setup(e,{emit:a}){const l=e,_=i(l.modelValue),f=v(),k=i(""),L=e=>{k.value=e},C=i("1"),b=[{label:"数字人库",value:"1"},{label:"我的数字人",value:"2"}],V=()=>{_.value=!1,f.push({path:S.createLive.path,name:S.createLive.name,query:{id:k.value,title:""}})};return t((()=>l.modelValue),(e=>{_.value=e})),t((()=>_.value),(e=>{a("update:modelValue",e)})),(a,l)=>(s(),n(B,{modelValue:_.value,"onUpdate:modelValue":l[0]||(l[0]=e=>_.value=e),className:"chose-person-dialog",onConfirm:V},{default:o((()=>[d("div",F,[J,d("div",K,[(s(),c(m,null,u(b,(e=>p(N,{key:e.value,theme:"opacity",class:y(["default-chose-person-btn",{"btn-active":e.value===C.value}]),onClick:a=>(e=>{C.value=e.value})(e)},{default:o((()=>[g(h(e.label),1)])),_:2},1032,["onClick","class"]))),64))]),d("div",O,["1"==C.value?(s(!0),c(m,{key:0},u(e.adminList,(e=>(s(),c("div",{class:"",key:e.id},[p(j,{className:e.id==k.value?"card-active":"",img:e.cover_url,id:e.id,name:e.name,onChange:L},null,8,["className","img","id","name"])])))),128)):r("",!0),"2"==C.value?(s(!0),c(m,{key:1},u(e.myList,(e=>(s(),c("div",{class:"",key:e.id},[p(j,{className:e.id==k.value?"card-active":"",img:e.cover_url,id:e.id,name:e.name,onChange:L},null,8,["className","img","id","name"])])))),128)):r("",!0)])])])),_:1},8,["modelValue"]))}}),W={class:"custom-card-two-image"},X=["src"],Y={class:"custom-card-footer"},Z={class:"create-time"},$=l({__name:"cardTwo",props:{id:null,img:{default:""},value:null,created_at:null,clicked:{type:Boolean,default:!0}},emits:["change","nameChange"],setup(e,{emit:a}){const l=e,t=i(!1),n=()=>{l.clicked&&a("change",l.id)},o=()=>{t.value=!0},u=()=>{t.value=!1},m=e=>{a("nameChange",l.id,e)};return(a,l)=>(s(),c("div",{class:y(["custom-card-two-box",{"cursor-pointer":e.clicked}]),onMouseenter:o,onMouseleave:u,onClick:n},[d("div",W,[d("img",{src:e.img,alt:""},null,8,X),_(d("div",null,[k(a.$slots,"hover")],512),[[f,t.value]])]),d("div",Y,[p(A,{value:e.value,onChange:m},null,8,["value"]),d("div",Z,h(e.created_at),1)])],34))}}),G={class:"my-digtal-people"},H={class:"card-item-list"},ee={class:"my-digtal-people-hover"},ae=g("开启直播"),le=g("开播中"),ie={class:"digtal-people-hover-tool"},te=g("编辑"),se=g("下载"),ne=g("删除"),oe=l({__name:"myDigtalPeople",setup(e){const a=v(),l=L({list:[],loading:!1}),t=i(!1),r=i(""),g=e=>{a.push({path:S.startLive.path,name:S.startLive.name,query:{id:e.id,status:e.status,digital_image:e.cover_url,digital_name:e.name}})},h=async()=>{try{l.loading=!0;let e=await z();0==e.code&&(l.list=e.data),l.loading=!1}catch(e){console.log(e),l.loading=!1}},y=async()=>{try{0==(await R(r.value)).code&&(q("删除成功","success"),h())}catch(e){console.log(e)}},k=async(e,a)=>{let i=l.list.find((a=>a.id==e));i&&(i.name=a,await w(e,i))};return C((()=>{h()})),(e,i)=>(s(),c("div",G,[d("div",H,[(s(!0),c(m,null,u(l.list,(e=>(s(),n($,{key:e.id,id:e.id,img:e.cover_url,created_at:e.updated_at,value:e.name,onNameChange:k},{hover:o((()=>[d("div",ee,[0==e.is_live?(s(),n(N,{key:0,class:"digtal-people-start-end",theme:"danger",height:"40px",onClick:a=>g(e)},{default:o((()=>[ae])),_:2},1032,["onClick"])):(s(),n(N,{key:1,class:"digtal-people-start-end",theme:"danger",height:"40px",onClick:a=>g(e)},{default:o((()=>[le])),_:2},1032,["onClick"])),d("div",ie,[p(N,{size:"13",theme:"dark",onClick:l=>(e=>{a.push({path:S.createLive.path,name:S.createLive.name,query:{id:e.id,status:e.status,type:"edit"}})})(e)},{default:o((()=>[te])),_:2},1032,["onClick"]),p(N,{size:"13",theme:"dark"},{default:o((()=>[se])),_:1}),p(N,{size:"13",theme:"dark",onClick:a=>(e=>{r.value=e.id,t.value=!0})(e)},{default:o((()=>[ne])),_:2},1032,["onClick"])])])])),_:2},1032,["id","img","created_at","value"])))),128))]),_(p(V,null,null,512),[[f,l.loading]]),p(T,{modelValue:t.value,"onUpdate:modelValue":i[0]||(i[0]=e=>t.value=e),title:"确定删除吗?",onConfirm:y},null,8,["modelValue"])]))}}),de={class:"digital-people-draft"},ce={class:"card-item-list"},ue={class:"my-digtal-people-hover"},me=g("编辑"),re={class:"digtal-people-hover-tool"},ve=g("删除"),pe=l({__name:"digitalPeopleDraft",setup(e){const a=v(),l=L({list:[],loading:!1}),t=i(!1),r=i(""),g=async()=>{try{let e=await D();0==e.code&&(e.data.forEach((e=>{e.c_name=e.name?e.name:""})),l.list=e.data)}catch(e){console.log(e)}},h=async()=>{try{0==(await I(r.value)).code&&(q("删除成功","success"),g())}catch(e){console.log(e)}},y=async(e,a)=>{let i=l.list.findIndex((a=>a.id==e));if(-1!==i){let t=l.list[i];t.name=a,await x(e,t)?(l.list[i].name=a,l.list[i].c_name=a):l.list[i].c_name=t.name}};return C((()=>{g()})),(e,i)=>(s(),c("div",de,[d("div",ce,[(s(!0),c(m,null,u(l.list,(e=>(s(),n($,{key:e.id,id:e.id,img:e.cover_url,created_at:e.created_at,value:e.c_name,onNameChange:y},{hover:o((()=>[d("div",ue,[p(N,{class:"digtal-people-start-end",theme:"danger",height:"40px",onClick:l=>(e=>{a.push({path:S.createLive.path,name:S.createLive.name,query:{id:e.id,title:e.name,type:"edit_drafts"}})})(e)},{default:o((()=>[me])),_:2},1032,["onClick"]),d("div",re,[p(N,{size:"13",theme:"dark",onClick:a=>(e=>{t.value=!0,r.value=e.id})(e)},{default:o((()=>[ve])),_:2},1032,["onClick"])])])])),_:2},1032,["id","img","created_at","value"])))),128))]),_(p(V,null,null,512),[[f,l.loading]]),p(T,{modelValue:t.value,"onUpdate:modelValue":i[0]||(i[0]=e=>t.value=e),title:"确定删除吗?",onConfirm:h},null,8,["modelValue"])]))}}),ge={class:"custom-home-page"},he={class:"home-tool-bar"},ye=d("div",{class:"label-box"},[d("span",{class:"label"},"工具栏 "),d("span",{class:"tips"},"选择数字人主播并输入文字即可生成视频")],-1),_e={class:"tool-list"},fe=["onClick"],ke=["src"],Le={class:"home-tool-bar"},Ce=d("div",{class:"label-box"},[d("span",{class:"label"},"直播数字人创建 "),d("span",{class:"tips"},"选择数字人主播并输入文字即可生成视频")],-1),be={class:"digital-people-list-box"},Ve=d("div",{class:"tool-line"},[d("div",{class:"label"},"选择数字人")],-1),we={class:"digital-people-list"},xe={class:"home-tool-bar"},Ue=g(" 直播创建 "),je={class:"create-live-dialog-body"},Ne=d("span",{class:"label"}," 直播名称: ",-1);e("default",l({__name:"index",setup(e){const l=v(),t=i("1"),n=i(!1),g=i(!1),y=i(),k=i(""),w={profile:new URL(""+new URL("profile-55a4ac64.svg",a.meta.url).href,self.location).href,speaking:new URL(""+new URL("speaking-0c962acf.svg",a.meta.url).href,self.location).href,interaction:new URL(""+new URL("interaction-fa518879.svg",a.meta.url).href,self.location).href},x=[{label:"形象定制",icon:w.profile,path:S.ImageCustomization.path},{label:"音色定制",icon:w.speaking,path:S.VocalCustomization.path},{label:"互动回答",icon:w.interaction,path:S.createInteract.path}],N=L({list:[],adminList:[],myList:[],loading:!1}),z=e=>{y.value=e,n.value=!0},R=()=>{n.value=!1,l.push({path:S.createLive.path,name:S.createLive.name,query:{id:y.value,title:k.value}})};return C((()=>{(async()=>{try{N.loading=!0;let e=await U();N.adminList=e.adminList,N.myList=e.myList,N.myList.length>5?N.list=N.myList.slice(0,5):N.list=N.myList.concat(N.adminList),N.loading=!1}catch(e){console.log(e),N.loading=!1}})()})),(e,a)=>(s(),c("div",ge,[d("div",he,[ye,d("div",_e,[(s(),c(m,null,u(x,(e=>d("div",{key:e.icon,class:"tool-item",onClick:a=>(e=>{e.path&&l.push({path:e.path})})(e)},[d("img",{src:e.icon,alt:""},null,8,ke),d("span",null,h(e.label),1)],8,fe))),64))])]),d("div",Le,[Ce,d("div",be,[Ve,d("div",we,[(s(!0),c(m,null,u(N.list,((e,l)=>(s(),c(m,{key:e.id},[p(j,{id:e.id,img:e.cover_url,name:e.name,onChange:z},null,8,["id","img","name"]),l===N.list.length-1?(s(),c("div",{key:0,class:"more-choices",onClick:a[0]||(a[0]=e=>g.value=!0)},"更多选择 >")):r("",!0)],64)))),128)),_(p(V,null,null,512),[[f,N.loading]])])])]),d("div",xe,[p(b(M),{modelValue:t.value,"onUpdate:modelValue":a[1]||(a[1]=e=>t.value=e),theme:"dark2"},{default:o((()=>[p(b(P),{label:"数字人作品",name:"1"},{default:o((()=>[p(oe)])),_:1}),p(b(P),{label:"数字人草稿",name:"2"},{default:o((()=>[p(pe)])),_:1})])),_:1},8,["modelValue"])]),p(B,{modelValue:n.value,"onUpdate:modelValue":a[3]||(a[3]=e=>n.value=e),onConfirm:R},{header:o((()=>[Ue])),body:o((()=>[d("div",je,[Ne,p(E,{modelValue:k.value,"onUpdate:modelValue":a[2]||(a[2]=e=>k.value=e),placeholder:"请输入直播标题",align:"left"},null,8,["modelValue"])])])),_:1},8,["modelValue"]),p(Q,{modelValue:g.value,"onUpdate:modelValue":a[4]||(a[4]=e=>g.value=e),adminList:N.adminList,myList:N.myList},null,8,["modelValue","adminList","myList"])]))}}))}}}));
System.register(["./vue-legacy-e1572d11.js","./otherRequest-legacy-ad8ec785.js","./TdesignNext-legacy-e721ed2d.js","./textarea-legacy-f77d13d8.js","./userApi-legacy-f48623ab.js","./Common-legacy-6e401395.js","./index-legacy-68247afe.js"],(function(e,l){"use strict";var a,d,o,u,t,n,s,v,i,c,r,m,p,y,f,g,h,w,_,V,C,I,k,b,Z,j,x,U,E,H,q;return{setters:[e=>{a=e.d,d=e.r,o=e.w,u=e.m,t=e.I,n=e.Q,s=e.e,v=e.z,i=e.S,c=e.J,r=e.L,m=e._,p=e.a,y=e.R,f=e.V,g=e.X,h=e.j,w=e.o,_=e.F,V=e.Y},null,e=>{C=e.i},e=>{I=e.T,k=e.S},e=>{b=e.B,Z=e.r,j=e.s,x=e.t,U=e.u,E=e.v},e=>{H=e.c,q=e.L},null],execute:function(){const L=["src"],R=["src"],S=a({__name:"AddVideoPlay",props:{video1:null,video2:null,playId:null},emits:["playEnd"],setup(e,{emit:l}){const a=e,c=d(!0),r=d(!1),m=d(),p=d();let y=null;const f=()=>{_()},g=()=>{p.value?.ended&&(console.log("重新播放第一个视频"),c.value=!0,m.value?.play())},h=()=>{r.value?w():r.value=!0,p.value?.addEventListener("video",(e=>{console.log(e)}))},w=()=>{console.log("开始播放第二个视频"),m.value?.pause(),p.value?.play(),y=window.setInterval((()=>{p.value.ended&&l("playEnd",a.playId)}),1e3)},_=()=>{m.value.play(),p.value.play(),p.value.pause()};return o((()=>a.video2),(e=>{e&&(c.value=!1,w())})),u((()=>{window.clearInterval(y),clearInterval(y),y=null})),(l,a)=>(t(),n("div",null,[s(i("div",null,[i("video",{ref_key:"videoFirst",ref:m,class:"video-default",src:e.video1,onCanplay:f},null,40,L)],512),[[v,c.value]]),s(i("div",null,[i("video",{ref_key:"videoSecond",ref:p,class:"video-default2",src:e.video2,onEnded:g,onCanplay:h},null,40,R)],512),[[v,!c.value]])]))}}),M={class:"start-live-video"},A={key:1,class:"default-video"},P=a({__name:"video",props:{video:null,video2:null,playId:{default:0},modelValue:null},emits:["update:modelValue","playEnd"],setup(e,{emit:l}){d(),d(!0),d(0);let a=null;d(0);const o=e=>{l("playEnd",e)};return u((()=>{window.clearInterval(a),clearInterval(a),a=null})),(l,a)=>(t(),n("div",M,[e.video?(t(),c(S,{key:0,playId:e.playId,onPlayEnd:o,video1:e.video,video2:e.video2},null,8,["playId","video1","video2"])):(t(),n("div",A))]))}}),T=a({__name:"Progress",props:{value:null},setup:e=>(l,a)=>(t(),c(r(C),{theme:"plump",percentage:e.value,label:!1,trackColor:"#fff",color:"#0DD",strokeWidth:12},null,8,["percentage"]))}),D={width:"28",height:"28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},F=[i("path",{d:"M25.165 5.56c.58 0 1.049.47 1.049 1.048v14.679a1.048 1.048 0 1 1-2.097 0V6.608c0-.579.47-1.048 1.048-1.048Zm-5.591 6.99c.579 0 1.048.47 1.048 1.048v7.689a1.048 1.048 0 1 1-2.097 0v-7.689c0-.579.47-1.048 1.049-1.048Zm-5.592-6.291c.579 0 1.048.47 1.048 1.048v13.98a1.048 1.048 0 1 1-2.097 0V7.307c0-.579.47-1.048 1.049-1.048ZM8.39 3.463c.579 0 1.048.47 1.048 1.048v16.776a1.048 1.048 0 1 1-2.096 0V4.51c0-.579.469-1.048 1.048-1.048ZM2.798 11.85c.58 0 1.048.47 1.048 1.048v8.388a1.048 1.048 0 1 1-2.096 0v-8.388c0-.579.469-1.048 1.048-1.048Z",fill:"#fff"},null,-1)],J={render:function(e,l){return t(),n("svg",D,F)}},N={width:"48",height:"48",fill:"none",xmlns:"http://www.w3.org/2000/svg"},z=[i("path",{d:"M5.25 15.75H9v18H5.25v-18ZM0 21.14h3.75v8.72H0v-8.72Zm10.5-8.39h3.75v24H10.5v-24Zm6 8.25h3.75v7.5H16.5V21Zm6-2.25h3.75v12H22.5v-12Zm6-3h3.75v18H28.5v-18Zm5.25 6h3.75v6h-3.75v-6Zm5.25-3h3.75v12H39v-12ZM44.25 21H48v7.5h-3.75V21Z",fill:"#fff"},null,-1)],B={render:function(e,l){return t(),n("svg",N,z)}},O={class:"start-live-audio-box"},Q={class:"start-live-audio-content"},W=i("div",{class:"label"},"音频脚本",-1),X={class:"play-audio-box"},Y={class:"line"},G=g("查看文字脚本"),K={class:"custom-video-progress"},$={key:0},ee={class:"start-live-audio-footer"},le={class:"live-status"},ae={class:"live-icon"},de=i("span",null,"直播中",-1),oe={class:"stop"},ue=g("关闭直播"),te=a({__name:"audio",props:{url:null,value:{default:""},modelValue:null},setup(e){const l=e,a=m(),u=d(!1);o((()=>l.url),(e=>{e&&(u.value=!0)}));const s=d(!1),v=d(l.value),g=()=>{s.value=!0},h=async()=>{try{0==(await Z(a.query.id)).code&&j("关播成功","success")}catch(e){console.log(e)}};return o((()=>l.value),(e=>{e&&(v.value=e)})),(l,a)=>(t(),n("div",O,[i("div",Q,[W,i("div",X,[i("div",Y,[p(r(B)),(t(),c(b,{key:0,theme:"opacity",style:{color:"#fff"},onClick:g},{default:y((()=>[G])),_:1}))]),i("div",K,[p(T,{value:e.modelValue},null,8,["value"])])]),s.value?(t(),n("div",$,[p(I,{disabled:!0,class:"reset-live-audio-textarea",modelValue:v.value,"onUpdate:modelValue":a[0]||(a[0]=e=>v.value=e)},null,8,["modelValue"])])):f("",!0)]),i("div",ee,[i("div",le,[i("div",ae,[p(r(J))]),de]),i("div",oe,[p(b,{theme:"opacity",onClick:h},{default:y((()=>[ue])),_:1})])])]))}}),ne={class:"start-live-human-box"},se={class:"content"},ve=g("连接直播平台"),ie=i("div",{class:"header"},"人工回复",-1),ce={class:"chose-sound-color"},re=i("div",{class:"label"},"选择音色",-1),me={class:"value"},pe={class:"right-chose-tones"},ye={class:"default-label"},fe=g(" 音调"),ge={key:1,class:"chose-tones-item"},he=["src"],we={class:"name"},_e={class:"categorie"},Ve=i("div",{class:"default-add"},"+",-1),Ce=g(" 音色"),Ie={key:1,class:"chose-tones-item"},ke=["src"],be={class:"name"},Ze={class:"input-box"},je={class:"footer"},xe=g("发送"),Ue=a({__name:"human",emits:["createAudio"],setup(e,{emit:l}){const a=m(),u=h({tones:[],soundColor:[]}),c=d(!1),r=d(!1),f=d(""),g=d({}),C=d(!1),Z=d(""),U=d({}),E=d(!0),L=d(""),R=e=>{g.value=e},S=e=>{U.value=e},M=async()=>{if(f.value)try{c.value=!0;let e=await x(a.query.id,{phonetic_timbres_id:Z.value,reply_content:L.value,tone_id:f.value});0==e.code&&l("createAudio",e.data.status),c.value=!1}catch(e){c.value=!1,console.log(e)}else j("音调必选")};o((()=>f.value),(e=>{E.value=!e}));const A=()=>{let e={id:a.query.id,digital_image:a.query.digital_image,digital_name:a.query.digital_name};window.pyjs?window.pyjs.openCtrlPage(JSON.stringify(e)):j("empty py")};return w((async()=>{let e=await H();u.tones=e.tones,u.soundColor=e.soundColor})),(e,l)=>(t(),n("div",ne,[s(p(q,null,null,512),[[v,c.value]]),i("div",se,[p(b,{theme:"green",class:"jump-btn",onClick:A},{default:y((()=>[ve])),_:1}),ie,i("div",ce,[re,i("div",me,[i("div",pe,[i("div",ye,[p(k,{modelValue:r.value,"onUpdate:modelValue":l[0]||(l[0]=e=>r.value=e),title:"选择一种音调",list:u.tones,value:f.value,"onUpdate:value":l[1]||(l[1]=e=>f.value=e),onItemChange:R},{default:y((()=>[i("div",null,[f.value?(t(),n("div",ge,[i("img",{src:g.value.img,alt:""},null,8,he),i("div",null,[i("div",we,V(g.value.c_name),1),i("div",_e,V(g.value.c_categorie),1)])])):(t(),n(_,{key:0},[fe],64))])])),_:1},8,["modelValue","list","value"])]),Ve,i("div",{onClick:l[4]||(l[4]=(...l)=>e.openSoundColor&&e.openSoundColor(...l)),class:"default-label"},[p(k,{title:"选择一种音色",modelValue:C.value,"onUpdate:modelValue":l[2]||(l[2]=e=>C.value=e),disabled:E.value,value:Z.value,"onUpdate:value":l[3]||(l[3]=e=>Z.value=e),list:u.soundColor,onItemChange:S},{default:y((()=>[i("div",null,[Z.value?(t(),n("div",Ie,[i("img",{src:U.value.img,alt:""},null,8,ke),i("div",null,[i("div",be,V(U.value.c_name),1)])])):(t(),n(_,{key:0},[Ce],64))])])),_:1},8,["modelValue","disabled","value","list"])])])])]),i("div",Ze,[p(I,{modelValue:L.value,"onUpdate:modelValue":l[5]||(l[5]=e=>L.value=e),placeholder:"输入内容点击下方发送,数字人将口播内容"},null,8,["modelValue"])])]),i("div",je,[p(b,{theme:"green",class:"reset-send-btn",onClick:M},{default:y((()=>[xe])),_:1})])]))}}),Ee={class:"custom-start-live-page"},He=["src"];e("default",a({__name:"index",setup(e){const a=m(),o=a.query,c=d(0),r=d(),y=d(""),f={mp4:new URL(""+new URL("1-414be3ad.mp4",l.meta.url).href,self.location).href,mp3:new URL(""+new URL("2-036152dc.wav",l.meta.url).href,self.location).href};d();const g=e=>{y.value=e},_=()=>{r.value.play()},V=h({video:[],audio:"",content:"",status:1,startTime:"00:50:00"});let C=null;d();const I=d(""),k=d(f.mp4),b=d([]),Z=d(""),x=d(""),H=e=>{if(e){let l=b.value.findIndex((l=>l.id==e));-1!==l&&(b.value[l].play_status=!0)}},q=()=>{L(),C=window.setInterval((()=>{(async()=>{try{let e=await E(a.query.id);0==e.code&&e.data&&e.data.length&&(e.data.forEach((e=>{e.play_status=!1})),b.value=b.value.concat(e.data))}catch(e){console.log(e)}})()}),3e3)},L=()=>{window.clearInterval(C),clearInterval(C),C=null},R=()=>{try{window.pyjs?window.pyjs.run(V.video,o.id):j("empty-1 py")}catch(e){j(e.message)}},S=e=>{e.video&&(I.value=e.video),e.add_video&&(k.value=e.add_video)};return w((async()=>{((e="")=>{e?window[e]={}:window.pyEvent={}})(),((e,l,a="")=>{a?window[a][e]=l:window.pyEvent[e]=l})("mergeCallback",S),await(async()=>{if(o.id)try{let e=await U(o.id);0==e.code&&(V.video=e.data.url,V.content=e.data.content,R())}catch(e){console.log(e)}else j("禁止访问")})(),q()})),u((()=>{L()})),(e,l)=>(t(),n("div",Ee,[p(P,{video:I.value,modelValue:c.value,"onUpdate:modelValue":l[0]||(l[0]=e=>c.value=e),video2:k.value,playId:Z.value,onPlayEnd:H},null,8,["video","modelValue","video2","playId"]),p(te,{url:x.value,modelValue:c.value,"onUpdate:modelValue":l[1]||(l[1]=e=>c.value=e)},null,8,["url","modelValue"]),p(Ue,{onCreateAudio:g}),s(i("div",null,[i("audio",{src:y.value,ref_key:"audioRef",ref:r,onCanplay:_},null,40,He)],512),[[v,!1]])]))}}))}}}));
System.register(["./TdesignNext-legacy-e721ed2d.js"],(function(e,t){"use strict";return{setters:[null],execute:function(){}}}));
System.register(["./userApi-legacy-f48623ab.js","./TdesignNext-legacy-e721ed2d.js"],(function(e,s){"use strict";var r,t;return{setters:[e=>{r=e.A},e=>{t=e.M}],execute:function(){const s=e("i",r.create({timeout:6e4,withCredentials:!1}));s.all=r.all,s.interceptors.request.use((e=>e)),s.interceptors.response.use((e=>{const{data:s,status:r}=e;return 201==r||200==r||0===s.code?s:(t.error(s.msg||"请求错误"),Promise.reject(s.msg))}),(e=>{if(console.log(e),"response"in e){const{message:s}=e.response.data;return-1!==e.response.data.indexOf("<Code>UserDisable</Code>")?t.error("阿里云可能欠费"):t.error(s||"请求错误"),e.response}}))}}}));
System.register([],(function(t,e){"use strict";return{execute:function(){t("_",((t,e)=>{const c=t.__vccOpts||t;for(const[n,r]of e)c[n]=r;return c}))}}}));
System.register(["./userApi-legacy-f48623ab.js","./vue-legacy-e1572d11.js","./TdesignNext-legacy-e721ed2d.js"],(function(e,l){"use strict";var t,a,s,i,n,o,u,c,d,m,r,p,v,g,h,f,y,b,x,w,k,C;return{setters:[e=>{t=e.B},e=>{a=e.I,s=e.Q,i=e.S,n=e.d,o=e.r,u=e.j,c=e.w,d=e.J,m=e.R,r=e.X,p=e.Y,v=e.a,g=e.L,h=e.V,f=e.U,y=e.F,b=e.Z,x=e.D,w=e.K,k=e.c},e=>{C=e.m}],execute:function(){const l={width:"16",height:"16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},V=[i("path",{d:"m11.149 3.988-.916 1.128L15 5.558 13.575 1l-1.133 1.396A7.17 7.17 0 0 0 8.18 1C4.215 1 1 4.206 1 8.16c0 3.955 3.215 7.16 7.18 7.16a7.182 7.182 0 0 0 6.71-4.605 1.022 1.022 0 0 0-1.376-1.299c-.248.11-.442.315-.54.569a5.13 5.13 0 0 1-4.793 3.29c-2.833 0-5.13-2.29-5.13-5.115 0-2.824 2.297-5.114 5.13-5.114 1.084 0 2.113.336 2.968.942Z",fill:"#B4B4B4"},null,-1)],_={render:function(e,t){return a(),s("svg",l,V)}},B={class:"custom-chose-tones-content"},R={class:"title"},j={class:"reset-popup-button-child"},L=i("span",null,"重置",-1),S={class:"list narrow-scrollbar"},A=["onClick"],F=["src"],U={class:"name"},z={key:0,class:"categorie"},N=["onClick"],T=["src"],Z={class:"name"},D={key:0,class:"categorie"},E=n({__name:"SelectionPopup",props:{modelValue:{type:Boolean},value:null,disabled:{type:Boolean,default:!1},title:{default:""},list:{default:null},event:{type:Function,default:()=>""},placement:{default:"bottom"},needCategorie:{type:Boolean,default:!0},reset:{type:Boolean,default:!1}},emits:["update:modelValue","update:value","itemChange"],setup(e,{emit:l}){const n=e,k=o(n.modelValue),C=u({list:[]}),V=o(!0);c((()=>n.modelValue),(e=>{k.value=e})),c((()=>k.value),(e=>{e&&V.value&&!n.list&&(async()=>{let e=await n.event();C.list=e})(),l("update:modelValue",e)}));const E=()=>{l("update:value","")},I=e=>{k.value=!1,l("update:value",e.id),l("itemChange",e)};return(l,n)=>{const o=x("t-popup");return a(),d(o,{overlayClassName:["custom-chose-tones"],disabled:e.disabled,placement:e.placement,trigger:"click",visible:k.value,"onUpdate:visible":n[0]||(n[0]=e=>k.value=e)},{content:m((()=>[i("div",B,[i("div",R,[r(p(e.title)+": ",1),e.reset?(a(),d(t,{key:0,theme:"opacity",class:"reset-popup-button",onClick:E},{default:m((()=>[i("div",j,[v(g(_)),L])])),_:1})):h("",!0)]),i("div",S,[e.list?(a(!0),s(y,{key:0},f(e.list,(l=>(a(),s("div",{class:w(["chose-tones-item",{"chose-tones-item_active":l.id===e.value}]),onClick:e=>I(l),key:l.id},[i("img",{src:l.img,alt:""},null,8,F),i("div",null,[i("div",U,p(l.c_name),1),e.needCategorie?(a(),s("div",z,p(l.c_categorie),1)):h("",!0)])],10,A)))),128)):(a(!0),s(y,{key:1},f(C.list,(l=>(a(),s("div",{class:w(["chose-tones-item",{"chose-tones-item_active":l.id===e.value}]),onClick:e=>I(l),key:l.id},[i("img",{src:l.img,alt:""},null,8,T),i("div",null,[i("div",Z,p(l.c_name),1),e.needCategorie?(a(),s("div",D,p(l.c_categorie),1)):h("",!0)])],10,N)))),128))])])])),default:m((()=>[b(l.$slots,"default")])),_:3},8,["disabled","placement","visible"])}}}),I=(e("S",E),{class:"custom-textarea-box"}),J={key:0,class:"position-text"},K=r(" | "),P=n({__name:"textarea",props:{modelValue:null,placeholder:{default:"请输入"},maxRows:{default:5},minRows:{default:5},maxlength:{default:0},showLimit:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(e,{emit:l}){const t=e,n=o(""),u=()=>{n.value=""},d=k((()=>{const e=n.value.length;if(e){let l=/[\u4E00-\u9FA5]/g,t=n.value.match(l);if(t&&t.length){const l=e-t.length;return 2*t.length+l}}return e}));return c((()=>n.value),(e=>{l("update:modelValue",e),l("change")})),c((()=>t.modelValue),(e=>{n.value=e})),(l,t)=>(a(),s("div",I,[v(g(C),{class:"custom-t-textarea",disabled:e.disabled,modelValue:n.value,"onUpdate:modelValue":t[0]||(t[0]=e=>n.value=e),placeholder:e.placeholder,maxcharacter:e.maxlength?e.maxlength:null,autosize:{maxRows:e.maxRows,minRows:e.minRows}},null,8,["disabled","modelValue","placeholder","maxcharacter","autosize"]),e.showLimit?(a(),s("div",J,[i("span",null,p(g(d))+"/"+p(e.maxlength),1),K,i("span",{class:"reset-btn",onClick:u},"清空")])):h("",!0)]))}});e("T",P)}}}));
<svg width="23" height="26" viewBox="0 0 23 26" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M11.5919 0.5C11.9687 0.5 12.2741 0.800513 12.2741 1.17121V5.57183L14.6679 3.2164C14.9342 2.95427 15.3662 2.95427 15.6325 3.2164C15.8989 3.47853 15.8989 3.90352 15.6325 4.16564L12.2741 7.47031V11.8362L16.1225 9.64986L17.3502 5.14146C17.4477 4.78339 17.8218 4.5709 18.1857 4.66684C18.5496 4.76279 18.7655 5.13084 18.668 5.48891L17.7934 8.70062L21.6627 6.50246C21.989 6.31711 22.4062 6.4271 22.5946 6.74814C22.7829 7.06918 22.6711 7.47969 22.3449 7.66504L18.4718 9.86535L21.7417 10.7275C22.1056 10.8234 22.3216 11.1915 22.2241 11.5496C22.1266 11.9076 21.7525 12.1201 21.3886 12.0242L16.8009 10.8146L12.9584 12.9975L16.8069 15.1838L21.3886 13.9758C21.7525 13.8799 22.1266 14.0924 22.2241 14.4504C22.3216 14.8085 22.1056 15.1766 21.7417 15.2725L18.4778 16.1331L22.3471 18.3312C22.6733 18.5166 22.7851 18.9271 22.5967 19.2481C22.4084 19.5692 21.9912 19.6792 21.6649 19.4938L17.7918 17.2935L18.668 20.5111C18.7655 20.8692 18.5496 21.2372 18.1857 21.3332C17.8218 21.4291 17.4477 21.2166 17.3502 20.8585L16.1209 16.3443L12.2741 14.1589V18.5407L15.6325 21.8454C15.8989 22.1075 15.8989 22.5325 15.6325 22.7946C15.3662 23.0567 14.9342 23.0567 14.6679 22.7946L12.2741 20.4392V24.8288C12.2741 25.1995 11.9687 25.5 11.5919 25.5C11.2152 25.5 10.9098 25.1995 10.9098 24.8288V20.4435L8.52039 22.7946C8.254 23.0567 7.82209 23.0567 7.5557 22.7946C7.28931 22.5325 7.28931 22.1075 7.5557 21.8454L10.9098 18.545V14.1613L7.05762 16.3498L5.82833 20.864C5.73083 21.2221 5.35678 21.4346 4.99288 21.3387C4.62899 21.2427 4.41303 20.8747 4.51054 20.5166L5.38672 17.299L1.52332 19.4938C1.19706 19.6792 0.779871 19.5692 0.591504 19.2481C0.403136 18.9271 0.514921 18.5166 0.841184 18.3312L4.7008 16.1386L1.43681 15.278C1.07291 15.1821 0.856957 14.814 0.954464 14.4559C1.05197 14.0979 1.42601 13.8854 1.78991 13.9813L6.3717 15.1893L10.2298 12.9975L6.37765 10.8091L1.78991 12.0187C1.42601 12.1146 1.05197 11.9021 0.95446 11.5441C0.856953 11.186 1.07291 10.8179 1.43681 10.722L4.70676 9.85984L0.843363 7.66504C0.517099 7.47969 0.405314 7.06918 0.593682 6.74814C0.78205 6.4271 1.19924 6.31711 1.5255 6.50246L5.38512 8.69512L4.51054 5.4834C4.41303 5.12533 4.62898 4.75728 4.99288 4.66134C5.35678 4.56539 5.73083 4.77789 5.82833 5.13596L7.05602 9.64436L10.9098 11.8337V7.46602L7.5557 4.16564C7.28931 3.90352 7.28931 3.47853 7.5557 3.2164C7.82209 2.95427 8.254 2.95427 8.52039 3.2164L10.9098 5.56754V1.17121C10.9098 0.800513 11.2152 0.5 11.5919 0.5Z" fill="#2962FF"/>
</svg>
\ No newline at end of file
<svg width="10" height="10" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_1249_2402)">
<path d="M1.51613 9.21726C1.3285 9.21726 1.14085 9.14566 0.997683 9.00254C0.711384 8.7162 0.711384 8.252 0.997683 7.96567L7.9654 0.997957C8.2517 0.711619 8.71592 0.711619 9.00226 0.997957C9.28856 1.28426 9.28856 1.74849 9.00226 2.03482L2.03455 9.00254C1.89138 9.1457 1.70375 9.21726 1.5161 9.21726H1.51613Z" fill="#CCCCCC"/>
<path d="M8.48385 9.21724C8.29622 9.21724 8.10857 9.14564 7.9654 9.00251L0.997683 2.03481C0.711384 1.74851 0.711384 1.28425 0.997683 0.997942C1.28397 0.711643 1.74822 0.711604 2.03454 0.997942L9.00225 7.96564C9.28855 8.25197 9.28855 8.71617 9.00225 9.0025C8.85912 9.14568 8.67148 9.21728 8.48383 9.21728L8.48385 9.21724Z" fill="#CCCCCC"/>
</g>
<defs>
<clipPath id="clip0_1249_2402">
<rect width="10" height="10" fill="white"/>
</clipPath>
</defs>
</svg>
\ No newline at end of file
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M17.8458 10.0029C18.3058 10.5145 18.3125 11.1804 17.9333 11.5562C17.5225 11.9637 16.8791 11.9195 16.5375 11.592C16.1958 11.2654 11.3558 6.13205 10.91 5.68288C10.2058 4.97455 9.52831 5.01621 8.86581 5.68288C8.19915 6.35455 3.56248 11.2079 3.22581 11.5012C2.88915 11.7962 2.25331 11.8595 1.85581 11.4629C1.40915 11.0162 1.46998 10.287 1.81581 9.92121C2.23498 9.47788 8.17415 3.31705 8.52081 2.94121C9.36081 2.03038 10.4483 2.04955 11.1291 2.78121C11.6366 3.32621 17.3208 9.41788 17.8458 10.0029ZM8.85581 7.33955C9.41165 6.75955 10.2841 6.68205 10.9083 7.33705C11.1775 7.62038 16.0825 12.6829 16.0825 12.6829V16.2012C16.0808 16.7354 15.6808 17.2362 15.0658 17.2437H11.9241V14.392C11.9241 13.9995 11.785 13.7737 11.4158 13.777C11.1425 13.7795 8.69081 13.7662 8.24165 13.7695C7.86248 13.772 7.74665 14.0645 7.74498 14.3912C7.74498 14.6529 7.73581 17.2437 7.73581 17.2437H4.68165C4.04748 17.247 3.64665 16.9204 3.64248 16.3162C3.64081 16.012 3.63998 12.6504 3.63998 12.6504C3.63998 12.6504 8.48998 7.72121 8.85581 7.33955Z" fill="#B4B4B4"/>
</svg>
\ No newline at end of file
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M14.7122 2.05284C14.9577 2.29788 14.9602 2.69366 14.7196 2.94175L14.7122 2.94923L13.2839 4.37485L15.9375 4.37487C17.3182 4.37487 18.4375 5.49417 18.4375 6.87487V15.6249C18.4375 17.0056 17.3182 18.1249 15.9375 18.1249H4.0625C2.6818 18.1249 1.5625 17.0056 1.5625 15.6249V6.87487C1.5625 5.49417 2.6818 4.37487 4.0625 4.37487L6.72027 4.37485L5.29195 2.94923C5.04395 2.70169 5.04395 2.30036 5.29195 2.05284C5.53994 1.8053 5.94203 1.8053 6.19004 2.05284L8.51646 4.37485H11.4877L13.8141 2.05284C14.0621 1.8053 14.4642 1.8053 14.7122 2.05284ZM8.92578 8.59362C8.37736 8.59362 7.92969 9.04163 7.92969 9.58972V12.91C7.92969 13.0879 7.97961 13.267 8.06641 13.4178C8.35986 13.8961 8.97463 14.0475 9.45312 13.7694L12.1484 12.1288C12.2899 12.0407 12.4042 11.9274 12.4805 11.7967C12.7776 11.322 12.6318 10.7054 12.168 10.41L9.45312 8.74987C9.29699 8.64528 9.11514 8.59362 8.92578 8.59362Z" fill="#FF4757"/>
</svg>
\ No newline at end of file
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M15.9704 16.599C15.9116 17.0187 15.8362 17.2651 15.7221 17.3473C15.654 17.3901 15.5069 17.4509 15.2788 17.4937C15.0562 17.5366 14.7729 17.5973 14.4437 17.6366C14.1071 17.6973 13.7484 17.7402 13.3437 17.783C12.939 17.8312 12.5306 17.8741 12.1259 17.908C11.7084 17.942 11.3166 17.9652 10.934 17.9866C10.6341 18.0045 9.00437 18.0045 8.70821 17.9866C8.32376 17.9652 7.92828 17.9437 7.51072 17.908C7.10603 17.8741 6.69767 17.8295 6.29667 17.783C5.89198 17.7402 5.52961 17.6955 5.19298 17.6366C4.86372 17.5973 4.58596 17.5366 4.35786 17.4937C4.13529 17.4509 3.98629 17.3901 3.92007 17.3473C3.80602 17.2651 3.72693 17.0187 3.67174 16.599C3.61288 16.1794 3.63311 15.6472 3.7398 14.9936C3.78579 14.7418 3.86121 14.5382 3.98813 14.3828C4.10954 14.2221 4.26589 14.0882 4.448 13.9632C4.63011 13.8507 4.83245 13.756 5.04215 13.6774C5.25737 13.6131 5.47994 13.5435 5.72091 13.4739C5.94349 13.4042 6.17158 13.3346 6.38312 13.2578C6.59834 13.1756 6.80068 13.0881 6.96807 12.972C7.18329 12.8381 7.33964 12.7131 7.45369 12.5863C7.56774 12.4613 7.64684 12.3399 7.70202 12.2131C7.74433 12.0881 7.78296 11.9613 7.78296 11.8363C7.78296 11.7023 7.78296 11.5684 7.77008 11.3952C7.74433 11.1737 7.66523 10.9791 7.52911 10.8451C7.39483 10.7058 7.23847 10.5683 7.06924 10.4201C6.98831 10.3558 6.91289 10.2505 6.85403 10.1255C6.79148 10.0004 6.73262 9.87365 6.68479 9.73972C6.64249 9.58792 6.58362 9.43256 6.54132 9.27183C6.47325 9.2504 6.40152 9.21647 6.3261 9.16826C6.26723 9.1254 6.19917 9.04325 6.13295 8.95217C6.06489 8.8611 5.99867 8.73609 5.95085 8.55394C5.90486 8.38428 5.88278 8.22535 5.89566 8.09141C5.90486 7.95212 5.93797 7.82711 5.98396 7.7146C6.02994 7.6021 6.08513 7.50745 6.1771 7.39851C6.1771 7.01814 6.19733 6.6449 6.23228 6.25559C6.27827 5.93951 6.34265 5.58949 6.4475 5.21625C6.54499 4.84302 6.70503 4.51085 6.90737 4.2162C7.10971 3.93404 7.32125 3.70902 7.5475 3.5358C7.7756 3.36615 8.02025 3.21971 8.26858 3.11613C8.51691 3.01613 8.76523 2.94648 9.0154 2.91612C9.26373 2.87683 9.4955 2.8554 9.7236 2.8554C9.75671 2.8554 9.79166 2.8554 9.82109 2.85898C9.8542 2.8554 9.88363 2.8554 9.91858 2.8554C10.1412 2.8554 10.3784 2.87683 10.6268 2.91612C10.8751 2.94648 11.1198 3.01613 11.3736 3.11613C11.6183 3.21971 11.8666 3.36793 12.091 3.5358C12.3191 3.70902 12.5343 3.93404 12.7366 4.2162C12.9353 4.51085 13.0953 4.8448 13.1965 5.21625C13.2977 5.5877 13.3657 5.93951 13.4081 6.25559C13.4412 6.6449 13.4669 7.01814 13.4669 7.39851C13.5552 7.50745 13.6141 7.6021 13.6601 7.7146C13.7024 7.82711 13.7355 7.95212 13.7484 8.09141C13.7612 8.22535 13.7355 8.38607 13.6895 8.55394C13.6472 8.73609 13.5791 8.8611 13.5074 8.95217C13.4393 9.04325 13.3768 9.1254 13.3179 9.16826C13.237 9.21647 13.1708 9.2504 13.1027 9.27183C13.0567 9.43256 12.9979 9.58792 12.9555 9.73972C12.9096 9.87365 12.8507 9.99866 12.7863 10.1255C12.7311 10.2505 12.652 10.354 12.5711 10.4201C12.4019 10.5665 12.2474 10.7058 12.1112 10.8451C11.9769 10.9791 11.8997 11.1737 11.8758 11.3952C11.8629 11.5684 11.8629 11.7023 11.8629 11.8363C11.8629 11.9613 11.896 12.0881 11.9383 12.2131C11.9972 12.3381 12.0726 12.4595 12.1866 12.5863C12.3044 12.7113 12.457 12.8381 12.6759 12.972C12.8452 13.0881 13.042 13.1756 13.2572 13.2578C13.4724 13.3363 13.695 13.4042 13.9231 13.4739C14.1586 13.5435 14.383 13.6131 14.5982 13.6774C14.8134 13.756 15.0158 13.8507 15.196 13.9632C15.3781 14.0882 15.5326 14.2221 15.6559 14.3828C15.7773 14.5382 15.8546 14.7418 15.9042 14.9936C16.0035 15.6454 16.0256 16.1776 15.9704 16.599ZM6.3261 2.57146C6.3261 2.72861 6.25988 2.87148 6.15319 2.97505C6.0465 3.07863 5.89934 3.14292 5.73747 3.14292H3.67726V5.14303C3.67726 5.45912 3.41422 5.71449 3.08863 5.71449C2.92676 5.71449 2.7796 5.6502 2.67291 5.54663C2.56622 5.44305 2.5 5.30018 2.5 5.14303V2.57146C2.5 2.25537 2.76304 2 3.08863 2H5.73747C6.06305 2 6.3261 2.25537 6.3261 2.57146Z" fill="#2770FF"/>
<path d="M6.27 11.4286C6.27 11.5857 6.20475 11.7286 6.09963 11.8321C5.9945 11.9357 5.8495 12 5.69 12H3.08C2.75919 12 2.5 11.7446 2.5 11.4286V8.85714C2.5 8.54107 2.75919 8.28571 3.08 8.28571C3.2395 8.28571 3.3845 8.35 3.48963 8.45357C3.59475 8.55714 3.66 8.7 3.66 8.85714V10.8571H5.69C6.01081 10.8571 6.27 11.1125 6.27 11.4286ZM17 8.85714V11.4286C17 11.7446 16.7408 12 16.42 12H13.81C13.4892 12 13.23 11.7446 13.23 11.4286C13.23 11.2714 13.2953 11.1286 13.4004 11.025C13.5055 10.9214 13.6505 10.8571 13.81 10.8571H15.84V8.85714C15.84 8.54107 16.0992 8.28571 16.42 8.28571C16.5795 8.28571 16.7245 8.35 16.8296 8.45357C16.9347 8.55714 17 8.7 17 8.85714ZM17 2.57143V5.14286C17 5.45893 16.7408 5.71429 16.42 5.71429C16.2605 5.71429 16.1155 5.65 16.0104 5.54643C15.9053 5.44286 15.84 5.3 15.84 5.14286V3.14286H13.81C13.4892 3.14286 13.23 2.8875 13.23 2.57143C13.23 2.41429 13.2953 2.27143 13.4004 2.16786C13.5055 2.06429 13.6505 2 13.81 2H16.42C16.7408 2 17 2.25536 17 2.57143Z" fill="#2770FF"/>
</svg>
\ No newline at end of file
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M18.6042 9.67315L14.9939 6.06286C14.817 5.8859 14.53 5.8859 14.353 6.06286L13.6232 6.7926C13.4462 6.96956 13.4462 7.25661 13.6232 7.43357L15.2157 9.02611H7.95678C7.70653 9.02611 7.50367 9.22897 7.50367 9.47922V10.5114C7.50367 10.7617 7.70653 10.9646 7.95678 10.9646H15.2122L13.6197 12.5571C13.4427 12.7341 13.4427 13.0211 13.6197 13.1981L14.3496 13.9278C14.5265 14.1048 14.8135 14.1048 14.9905 13.9278L17.8743 11.044C17.8743 11.0439 17.8744 11.0439 17.8744 11.0439L18.6043 10.314C18.7812 10.137 18.7812 9.85011 18.6042 9.67315ZM12.3845 1.26465H2.62272C1.87191 1.26465 1.26318 1.87338 1.26318 2.62419V17.3665C1.26318 18.1174 1.87191 18.726 2.62272 18.726H12.3845C13.1353 18.726 13.744 18.1174 13.744 17.3665V15.4536C13.744 15.2034 13.5412 15.0004 13.2908 15.0004H12.3086C12.0583 15.0004 11.8553 15.2034 11.8553 15.4536V16.1813C11.8553 16.8518 11.8553 16.8518 11.1758 16.8518H3.81256C3.13284 16.8518 3.13284 16.8519 3.13284 16.172V3.80289C3.13284 3.12123 3.13138 3.12315 3.81256 3.12315H11.1758C11.8554 3.12315 11.8553 3.12872 11.8553 3.79365V4.54275C11.8553 4.79306 12.0583 4.99596 12.3085 4.99596H13.2908C13.5412 4.99596 13.744 4.79306 13.744 4.54275V2.62419C13.744 1.87338 13.1353 1.26465 12.3845 1.26465Z" fill="#B4B4B4"/>
</svg>
\ No newline at end of file
...@@ -30,26 +30,13 @@ const videoSecond = ref<HTMLVideoElement>(); ...@@ -30,26 +30,13 @@ const videoSecond = ref<HTMLVideoElement>();
let interval = null; let interval = null;
const openInterval = () => {
interval = window.setInterval(() => {
if (videoSecond.value.ended) {
emit('playEnd', props.playId);
}
}, 1000);
};
const stopInterval = () => {
window.clearInterval(interval);
clearInterval(interval);
interval = null;
};
const canplay = () => { const canplay = () => {
onPlay(); onPlay();
}; };
const onVideoEnded = () => { const onVideoEnded = () => {
if (videoSecond.value?.ended) { if (videoSecond.value?.ended) {
emit('playEnd', props.playId);
console.log('重新播放第一个视频'); console.log('重新播放第一个视频');
showFirstVideo.value = true; showFirstVideo.value = true;
videoFirst.value?.play(); videoFirst.value?.play();
...@@ -62,17 +49,12 @@ const canplay2 = () => { ...@@ -62,17 +49,12 @@ const canplay2 = () => {
} else { } else {
secondPlay(); secondPlay();
} }
videoSecond.value?.addEventListener('video', (e: any) => {
console.log(e);
});
}; };
const secondPlay = () => { const secondPlay = () => {
console.log('开始播放第二个视频'); console.log('开始播放第二个视频');
videoFirst.value?.pause(); videoFirst.value?.pause();
videoSecond.value?.play(); videoSecond.value?.play();
// 打开一个定时器--监听第二个视频结束
openInterval();
}; };
const onPlay = () => { const onPlay = () => {
...@@ -91,10 +73,6 @@ watch( ...@@ -91,10 +73,6 @@ watch(
} }
}, },
); );
onBeforeUnmount(() => {
stopInterval();
});
</script> </script>
<style lang="less"> <style lang="less">
......
<template>
<div ref="DragBox" :class="[DefaultClassName, 'drag']">
<div class="show-img" @dragstart.prevent>
<slot></slot>
</div>
</div>
</template>
<script lang="ts" setup>
import { onMounted, ref } from 'vue';
const props = withDefaults(
defineProps<{
id?: number | string;
align?: string;
child?: any;
}>(),
{
align: 'center',
id: 0,
child: '',
},
);
const emit = defineEmits(['delete']);
// 拖拽元素
const DragBox = ref();
// 默认类名
const DefaultClassName = ref('custom-drag-img' + props.id);
class Drag {
constructor(target, options = { limit: true, drag: true, zoom: true, minWidth: 0, minHeight: 0 }) {
this.target = target;
this.options = options;
this.init();
}
// 初始化
init() {
this.target.style.position = 'relative';
this.getBoundary();
if (this.options.drag) {
this.drag();
}
if (this.options.zoom) {
this.addHorn();
this.addBorder();
this.leftZoom();
this.rightZoom();
this.topZoom();
this.bottomZoom();
this.leftTopZoom();
this.leftBottomZoom();
this.rightTopZoom();
this.rightBottomZoom();
}
// 初始化位置
// if (props.align == 'center') {
// this.distanceX = 0;
// this.distanceY = this.maxHeight / 4;
// this.target.style.transform = `translate(${this.distanceX}px, ${this.distanceY}px)`;
// }
}
// 获取父元素的宽高
getBoundary() {
this.maxWidth = this.target.parentNode.clientWidth;
this.maxHeight = this.target.parentNode.clientHeight;
}
// 获取自身起始信息
getInfo(e) {
if (props.child) {
// 获取这个子元素的宽高
this.width = props.child.clientWidth;
this.height = props.child.clientHeight;
} else {
this.width = this.target.clientWidth;
this.height = this.target.clientHeight;
}
let translateStr = this.target.style.transform;
if (translateStr) {
const reg = /\d+/g;
let translateArr = translateStr.match(reg);
this.tx = Number(translateArr[0]);
this.ty = Number(translateArr[1]);
} else {
this.tx = 0;
this.ty = 0;
}
this.startX = e.clientX;
this.startY = e.clientY;
}
// 拖动实现
drag() {
this.target.addEventListener('mousedown', (e) => {
this.getInfo(e);
document.onmousemove = (e) => {
if (this.options.limit) {
this.distanceX = Math.max(0, Math.min(this.tx + e.clientX - this.startX, this.maxWidth - this.width));
this.distanceY = Math.max(0, Math.min(this.ty + e.clientY - this.startY, this.maxHeight - this.height));
} else {
this.distanceX = this.tx + e.clientX - this.startX;
this.distanceY = this.ty + e.clientY - this.startY;
}
this.target.style.transform = `translate(${this.distanceX}px, ${this.distanceY}px)`;
};
document.onmouseup = () => {
document.onmousemove = null;
};
});
}
// 添加四个角
addHorn() {
this.leftTop = document.createElement('div');
this.rightTop = document.createElement('div');
this.leftBottom = document.createElement('div');
this.rightBottom = document.createElement('div');
this.leftTop.className = 'horn leftTop';
this.rightTop.className = 'horn rightTop';
this.leftBottom.className = 'horn leftBottom';
this.rightBottom.className = 'horn rightBottom';
this.target.append(this.leftTop);
this.target.append(this.rightTop);
this.target.append(this.leftBottom);
this.target.append(this.rightBottom);
}
// 添加四条边
addBorder() {
this.left = document.createElement('div');
this.right = document.createElement('div');
this._top = document.createElement('div');
this.bottom = document.createElement('div');
this.left.className = 'vertical left';
this.right.className = 'vertical right';
this._top.className = 'horizontal top';
this.bottom.className = 'horizontal bottom';
this.target.append(this.left);
this.target.append(this.right);
this.target.append(this._top);
this.target.append(this.bottom);
}
// 缩放实现
zoom(el: any, direction: any) {
el.addEventListener('mousedown', (e) => {
e.stopPropagation();
this.getInfo(e);
document.onmousemove = (e) => {
switch (direction) {
case 'left':
this.leftInfo(e);
break;
case 'right':
this.rightInfo(e);
break;
case 'top':
this.topInfo(e);
break;
case 'bottom':
this.bottomInfo(e);
break;
case 'leftTop':
this.leftTopInfo(e);
break;
case 'leftBottom':
this.leftBottomInfo(e);
break;
case 'rightTop':
this.rightTopInfo(e);
break;
case 'rightBottom':
this.rightBottomInfo(e);
break;
}
// 这里不能直接使用对this.newWidth隐式类型转换来判断,因为this.newWidth===0时,会使用this.width
let width = this.newWidth !== undefined ? this.newWidth : this.width;
let height = this.newHeight !== undefined ? this.newHeight : this.height;
let translateX = this.distanceX !== undefined ? this.distanceX : this.tx;
let translateY = this.distanceY !== undefined ? this.distanceY : this.ty;
this.target.style.width = `${width}px`;
this.target.style.height = `${height}px`;
this.target.style.transform = `translate(${translateX}px, ${translateY}px)`;
};
document.onmouseup = () => {
document.onmousemove = null;
};
});
}
// 获取缩放时宽高、translate等参数的值
leftInfo(e: any) {
this.newWidth = this.width - (e.clientX - this.startX);
this.distanceX = this.tx + (e.clientX - this.startX);
if (this.options.limit) {
this.newWidth = Math.max(this.options.minWidth, Math.min(this.newWidth, this.width + this.tx));
this.distanceX = Math.max(0, Math.min(this.distanceX, this.width + this.tx - this.options.minWidth));
}
}
rightInfo(e: any) {
this.newWidth = this.width + (e.clientX - this.startX);
if (this.options.limit) {
this.newWidth = Math.max(this.options.minWidth, Math.min(this.newWidth, this.maxWidth - this.tx));
}
}
topInfo(e: any) {
this.newHeight = this.height - (e.clientY - this.startY);
this.distanceY = this.ty + (e.clientY - this.startY);
if (this.options.limit) {
this.newHeight = Math.max(this.options.minHeight, Math.min(this.newHeight, this.height + this.ty));
this.distanceY = Math.max(0, Math.min(this.distanceY, this.height + this.ty - this.options.minHeight));
}
}
bottomInfo(e: any) {
this.newHeight = this.height + (e.clientY - this.startY);
if (this.options.limit) {
this.newHeight = Math.max(this.options.minHeight, Math.min(this.newHeight, this.maxHeight - this.ty));
}
}
leftTopInfo(e) {
this.leftInfo(e);
this.topInfo(e);
}
leftBottomInfo(e) {
this.leftInfo(e);
this.bottomInfo(e);
}
rightTopInfo(e) {
this.rightInfo(e);
this.topInfo(e);
}
rightBottomInfo(e) {
this.rightInfo(e);
this.bottomInfo(e);
}
leftZoom() {
this.zoom(this.left, 'left');
}
rightZoom() {
this.zoom(this.right, 'right');
}
topZoom() {
this.zoom(this._top, 'top');
}
bottomZoom() {
this.zoom(this.bottom, 'bottom');
}
leftTopZoom() {
this.zoom(this.leftTop, 'leftTop');
}
leftBottomZoom() {
this.zoom(this.leftBottom, 'leftBottom');
}
rightTopZoom() {
this.zoom(this.rightTop, 'rightTop');
}
rightBottomZoom() {
this.zoom(this.rightBottom, 'rightBottom');
}
}
onMounted(() => {
new Drag(DragBox.value);
});
</script>
<style lang="less">
.drag {
background-repeat: no-repeat;
background-size: 100% 100%;
-moz-background-size: 100% 100%;
border: 1px dashed transparent;
cursor: all-scroll;
overflow: hidden;
.show-img {
width: 100%;
height: 100%;
user-select: none;
}
.horn {
width: 14px;
height: 14px;
position: absolute;
}
.vertical {
width: 10px;
height: calc(100% - 14px);
margin: 7px 0px;
position: absolute;
cursor: col-resize;
}
.horizontal {
width: calc(100% - 14px);
height: 10px;
margin: 0px 7px;
position: absolute;
cursor: row-resize;
}
.top {
top: -5px;
left: 0;
}
.left {
top: 0;
left: -5px;
}
.bottom {
left: 0;
bottom: -5px;
}
.right {
top: 0;
right: -5px;
}
.leftTop {
cursor: nw-resize;
left: -7px;
top: -7px;
}
.rightTop {
cursor: ne-resize;
right: -7px;
top: -7px;
}
.leftBottom {
cursor: sw-resize;
bottom: -7px;
left: -7px;
}
.rightBottom {
cursor: se-resize;
right: -7px;
bottom: -7px;
}
}
</style>
<template>
<div class="grid-container" ref="gridContainer" :style="computedStyles">
<slot />
</div>
</template>
<script lang="ts" setup>
import { computed, onMounted, ref, watch } from 'vue';
const props = withDefaults(
defineProps<{
marginLeft?: number;
length?: number;
rowGap?: number;
cardWidth?: number;
}>(),
{
marginLeft: 20,
length: 0,
rowGap: 18,
cardWidth: 0,
},
);
const gridContainer = ref<HTMLDivElement>();
// 动态样式
const computedStyles = computed(() => {
return {
'grid-row-gap': props.marginLeft + 'px',
'grid-column-gap': props.rowGap + 'px',
};
});
// 修改样式
const changeMargin = () => {
if (gridContainer.value) {
setTimeout(() => {
if (gridContainer.value.children.length) {
let width = props.cardWidth ? props.cardWidth : gridContainer.value.children[0].clientWidth;
gridContainer.value.style.setProperty('--grid-template-columns', `${width}px`);
}
}, 0);
}
};
watch(
() => props.length,
(v) => {
if (v) {
changeMargin();
}
},
);
onMounted(() => {
changeMargin();
});
</script>
<style lang="less">
.grid-container {
display: grid;
justify-content: space-between;
grid-template-columns: repeat(auto-fill, var(--grid-template-columns));
// grid-gap: 10px;
}
</style>
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
</div> </div>
<div class="list narrow-scrollbar"> <div class="list narrow-scrollbar">
<template v-if="list"> <template v-if="list">
<Grid :marginLeft="12" :length="list.length" :rowGap="12" :cardWidth="110">
<div <div
class="chose-tones-item" class="chose-tones-item"
:class="{ :class="{
...@@ -38,6 +39,7 @@ ...@@ -38,6 +39,7 @@
</template> </template>
</div> </div>
</div> </div>
</Grid>
</template> </template>
<template v-else> <template v-else>
...@@ -70,6 +72,7 @@ ...@@ -70,6 +72,7 @@
import { reactive, ref, watch } from 'vue'; import { reactive, ref, watch } from 'vue';
import Button from '@/components/Button.vue'; import Button from '@/components/Button.vue';
import ResetSvg from '@/assets/svg/home/reset.svg'; import ResetSvg from '@/assets/svg/home/reset.svg';
import Grid from '@/components/Grid.vue';
const props = withDefaults( const props = withDefaults(
defineProps<{ defineProps<{
modelValue: boolean; modelValue: boolean;
...@@ -166,16 +169,8 @@ const onSelect = (item: any) => { ...@@ -166,16 +169,8 @@ const onSelect = (item: any) => {
} }
} }
.list { .list {
display: flex; height: 174px;
flex-wrap: wrap;
row-gap: 6px;
height: 180px;
overflow-y: auto; overflow-y: auto;
margin-top: 6px;
margin-left: -20px;
& > * {
margin-left: 20px;
}
.chose-tones-item { .chose-tones-item {
width: 110px; width: 110px;
height: 45px; height: 45px;
......
...@@ -112,3 +112,6 @@ export const SiteConfig = { ...@@ -112,3 +112,6 @@ export const SiteConfig = {
// 邮箱正则 // 邮箱正则
export const emailReg = /^\w{3,}(\.\w+)*@[A-z0-9]+(\.[A-z]{2,8}){1,2}$/; export const emailReg = /^\w{3,}(\.\w+)*@[A-z0-9]+(\.[A-z]{2,8}){1,2}$/;
// 创建直播页面路由记录key
export const createLiveRouteKey = 'create_live_route_key';
<template>
<div class="tdesign-wrapper">
<router-view />
</div>
</template>
<style lang="less">
.tdesign-wrapper {
height: 100vh;
display: flex;
flex-direction: column;
}
</style>
@import '@/style/flex.less';
.certification-box {
margin-left: auto;
.certification {
.da();
height: 27px;
border-radius: 15px 0px 0px 15px;
font-weight: 400;
font-size: 11px;
white-space: nowrap;
& > * {
padding: 0 6px;
}
}
.green {
color: #5eba89;
background: #e3f4ed;
}
.blue {
background: #c7d5fc;
color: #2962ff;
}
.yellow {
background: #fff2c5;
color: #ffb800;
}
}
import { defineComponent, computed } from 'vue';
import { useI18n } from 'vue-i18n';
import { useStore } from 'vuex';
import './index.less';
export default defineComponent({
setup(props, { slots }) {
const store = useStore();
const { t } = useI18n();
const userInfo = computed(() => store.getters['user/userInfo']);
const imgs = {
// 已认证
certified: new URL('../../../assets/svg/user/certified.svg', import.meta.url).href,
// 审核中
UnderReview: new URL('../../../assets/svg/user/UnderReview.svg', import.meta.url).href,
// 未认证
NotCertified: new URL('../../../assets/svg/user/NotCertified.svg', import.meta.url).href,
};
// 当前显示的认证状态
const getAuthStatus = () => {
if (userInfo.value.is_real_name) {
// 已认证
return (
<div class="certification green">
<img src={imgs.certified} alt="" class="img" />
<span>{t('auth.Acreditado')}</span>
</div>
);
} else if (userInfo.value.is_real_name_audit) {
// 审核中
return (
<div class="certification blue">
<img src={imgs.UnderReview} alt="" class="img" />
<span>{t('auth.UnderReview')}</span>
</div>
);
} else {
// 未认证
return (
<div class="certification yellow">
<img src={imgs.NotCertified} alt="" class="img" />
<span>{t('auth.NoCertificado')}</span>
</div>
);
}
};
return () => <div class="certification-box">{getAuthStatus()}</div>;
},
});
...@@ -8,14 +8,14 @@ ...@@ -8,14 +8,14 @@
</div> </div>
<div class="right"> <div class="right">
<div class="user-info"> <div class="user-info">
<UserSvg></UserSvg> <LoginDropdown></LoginDropdown>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import UserSvg from '@/assets/svg/header/user.svg'; import LoginDropdown from './LoginDropdown.vue';
import { useRoute, useRouter } from 'vue-router'; import { useRoute, useRouter } from 'vue-router';
import ChangeName from '@/components/changeName.vue'; import ChangeName from '@/components/changeName.vue';
import { useStore } from 'vuex'; import { useStore } from 'vuex';
......
...@@ -5,71 +5,29 @@ ...@@ -5,71 +5,29 @@
--> -->
<template> <template>
<t-popup <t-popup
class="placement top center" overlayClassName="placement-user-info"
placement="bottom-left" placement="bottom-left"
trigger="click" trigger="click"
show-arrow :showArrow="false"
v-model:visible="user_popup_visible" v-model:visible="user_popup_visible"
> >
<template #content> <template #content>
<div class="s-header-user-info-dropdown"> <div class="s-header-user-info-dropdown">
<div class="user-info-dropdown-header">
<div class="info-dropdown-header-email">
{{ ShowUserInfo() }}
</div>
<div class="info-dropdown-header-vip">
<div class="info-header-vip-left">
<template v-if="userInfo.vip_level">
<img :src="Imgs.userVip" alt="" />
<div class="vip-title">VIP{{ userInfo.vip_level }}</div>
</template>
<template v-else>
<img :src="Imgs.notVip" alt="" />
<div class="vip-title not-vip">{{ $t('header.Generalusers') }}</div>
</template>
</div>
<AuthStatus></AuthStatus>
</div>
</div>
<!-- content --> <!-- content -->
<div class="user-info-dropdown-content"> <!-- <div class="user-info-dropdown-content">
<div @click="backRouter('AssetsOverview')"> <div @click="backRouter('AssetsOverview')">
<img :src="Imgs.myMoney" alt="" /> <img :src="Imgs.myMoney" alt="" />
<div class="dropdown-content-text">{{ $t('header.MisActivos') }}</div> <div class="dropdown-content-text">{{ $t('header.MisActivos') }}</div>
</div> </div>
<div @click="backRouter('Invitation')"> </div> -->
<img :src="Imgs.Invitation" alt="" />
<div class="dropdown-content-text">{{ $t('header.InvitacionCashback') }}</div>
</div>
<div @click="backRouter('daily-sign-in')">
<img :src="Imgs.signIn" alt="" />
<div class="dropdown-content-text">{{ $t('header.DailysignIn') }}</div>
</div>
<div @click="backRouter('Authentication')">
<img :src="Imgs.auth" alt="" />
<div class="dropdown-content-text">{{ $t('header.Verificaciondeidentidad') }}</div>
</div>
<div @click="backRouter('AccountSecurity')">
<img :src="Imgs.safe" alt="" />
<div class="dropdown-content-text">{{ $t('header.RegularSeguridad') }}</div>
</div>
<div>
<img :src="Imgs.theme" alt="" />
<div class="dropdown-content-text">{{ $t('header.Temasdecolor') }}</div>
<div class="theme-swicth">
<t-switch v-model="swicth_checked" @change="swicth_onChange" />
</div>
</div>
</div>
<div class="user-info-dropdown-footer" @click="logout"> <div class="user-info-dropdown-footer" @click="logout">
<img :src="Imgs.logout" alt="" /> <img :src="Imgs.logout" alt="" />
<div class="dropdown-footer-text">{{ $t('header.CerrarSesion') }}</div> <div class="dropdown-footer-text">退出</div>
</div> </div>
</div> </div>
</template> </template>
<div class="custom-header-user-info"> <div class="custom-header-user-info">
<UserOneSvg></UserOneSvg> <UserSvg></UserSvg>
<UserAvatar></UserAvatar>
<div class="user-message-dot" v-if="mes_num">{{ mes_num }}</div> <div class="user-message-dot" v-if="mes_num">{{ mes_num }}</div>
<div v-else></div> <div v-else></div>
</div> </div>
...@@ -77,24 +35,13 @@ ...@@ -77,24 +35,13 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import AuthStatus from './AuthStatus'; import UserSvg from '@/assets/svg/header/user.svg';
import { computed, onMounted, ref } from 'vue'; import { computed, onMounted, ref } from 'vue';
import { useStore } from 'vuex'; import { useStore } from 'vuex';
import { useRoute, useRouter } from 'vue-router'; import { useRoute, useRouter } from 'vue-router';
import UserOneSvg from '@/assets/svg/user/user-1.svg';
import UserAvatar from '@/assets/svg/user/user-avatar.svg';
import STYLE_CONFIG from '@/config/style'; import STYLE_CONFIG from '@/config/style';
const Imgs = { const Imgs = {
userVip: new URL('../../assets/svg/user/user-vip.svg', import.meta.url).href,
notVip: new URL('../../assets/svg/user/notvip.svg', import.meta.url).href,
Already: new URL('../../assets/svg/user/Already.svg', import.meta.url).href,
myMoney: new URL('../../assets/svg/user/userdropdown/myMoney.svg', import.meta.url).href,
Invitation: new URL('../../assets/svg/user/userdropdown/Invitation.svg', import.meta.url).href,
auth: new URL('../../assets/svg/user/userdropdown/auth.svg', import.meta.url).href,
safe: new URL('../../assets/svg/user/userdropdown/safe.svg', import.meta.url).href,
theme: new URL('../../assets/svg/user/userdropdown/theme.svg', import.meta.url).href,
logout: new URL('../../assets/svg/user/userdropdown/logout.svg', import.meta.url).href, logout: new URL('../../assets/svg/user/userdropdown/logout.svg', import.meta.url).href,
signIn: new URL('../../assets/svg/user/userdropdown/signIn.svg', import.meta.url).href,
}; };
// 消息数量 // 消息数量
const mes_num = ref<number>(0); const mes_num = ref<number>(0);
...@@ -156,44 +103,30 @@ const gotoMember = (label: string) => { ...@@ -156,44 +103,30 @@ const gotoMember = (label: string) => {
// 退出 // 退出
const logout = () => { const logout = () => {
store.dispatch('user/logout'); store.dispatch('user/logout');
user_popup_visible.value = false;
}; };
</script> </script>
<style lang="less"> <style lang="less">
@import '../../style/variables.less'; @import '../../style/variables.less';
@import '@/style/flex.less'; @import '@/style/flex.less';
.t-popup__content { .placement-user-info {
.t-popup__content {
margin-top: 9px !important;
background: #303030;
padding: 0; padding: 0;
}
.s-header-user-info-dropdown {
background: var(--theme-color-28);
border-radius: 4px;
width: 250px;
.user-info-dropdown-header {
padding-left: 12px;
border-bottom: 0.5px solid #848e9c;
.info-dropdown-header-email {
font-weight: 800;
font-size: 15px;
color: var(--theme-color-17);
padding: 6px 0;
}
.info-dropdown-header-vip {
.dj(space-between);
padding-bottom: 4px;
.info-header-vip-left {
.da();
.vip-title {
font-size: 12px;
transform: scale(0.8);
color: #cc9f00;
}
.not-vip {
color: #bcbcbc;
}
} }
.t-popup__arrow {
&::before {
background: #303030;
} }
} }
}
.s-header-user-info-dropdown {
border-radius: 6px;
background: #303030;
border-radius: 4px;
width: 120px;
.user-info-dropdown-content { .user-info-dropdown-content {
border-bottom: 1px solid #595a5a; border-bottom: 1px solid #595a5a;
& > * { & > * {
...@@ -225,30 +158,21 @@ const logout = () => { ...@@ -225,30 +158,21 @@ const logout = () => {
height: 45px; height: 45px;
cursor: pointer; cursor: pointer;
transition: background 0.3s; transition: background 0.3s;
&:hover {
background: rgba(244, 244, 244, 0.5);
transition: background 0.3s;
}
img { img {
margin: 0 12px; margin: 0 12px;
width: 29px; width: 29px;
height: 29px; height: 29px;
} }
.dropdown-footer-text { .dropdown-footer-text {
font-weight: 300; font-weight: 400;
font-size: 15px; font-size: @size-14;
color: var(--theme-color-14); color: #b4b4b4;
padding-left: 12px; padding-left: 12px;
} }
} }
} }
.custom-header-user-info { .custom-header-user-info {
border: 1px solid #595a5a;
border-radius: 25px;
height: 44px;
cursor: pointer;
.dja(space-between); .dja(space-between);
position: relative;
& > :not(:last-child) { & > :not(:last-child) {
margin: 0 8px; margin: 0 8px;
} }
......
<template>
<div class="custom-header-navigator">
<div class="home-icon" @click="goHome">
<img :src="imgs.home" alt="" />
</div>
<div class="navigator-item" v-for="item in navigatorList" :key="item.path" @click="jump(item)">
<img class="navigator-icon" :src="item.icon" alt="" />
<span class="label">
{{ item.label }}
</span>
<!-- <div class="close-icon">
<img :src="imgs.close" alt="" />
</div> -->
</div>
</div>
</template>
<script lang="ts" setup>
import routerConfig from '@/router/tool';
import { useRouter } from 'vue-router';
import { createLiveRouteKey } from '@/constants/token';
const router = useRouter();
const imgs = {
home: new URL('../../assets/svg/home/home.svg', import.meta.url).href,
live: new URL('../../assets/svg/home/navLive.svg', import.meta.url).href,
person: new URL('../../assets/svg/home/person.svg', import.meta.url).href,
speak: new URL('../../assets/svg/home/speaking.svg', import.meta.url).href,
interaction: new URL('../../assets/svg/home/interaction.svg', import.meta.url).href,
close: new URL('../../assets/svg/home/close.svg', import.meta.url).href,
};
const navigatorList = [
{
icon: imgs.live,
label: '直播创建',
path: routerConfig.createLive.path,
},
{
icon: imgs.person,
label: '形象定制',
path: routerConfig.ImageCustomization.path,
},
{
icon: imgs.speak,
label: '声音定制',
path: routerConfig.VocalCustomization.path,
},
{
icon: imgs.interaction,
label: '互动回答',
path: routerConfig.createInteract.path,
},
];
const goHome = () => {
router.push({
path: routerConfig.home.path,
});
};
const jump = (item: any) => {
let params = {};
if (item.path == routerConfig.createLive.path) {
// 访问记录
let query = window.localStorage.getItem(createLiveRouteKey);
if (query) {
params = JSON.parse(query);
}
}
router.push({
path: item.path,
query: params,
});
};
</script>
<style lang="less">
@import '@/style/variables';
.custom-header-navigator {
background: #303030;
height: 36px;
margin-top: 4px;
.da();
& > * {
height: 100%;
cursor: pointer;
}
.home-icon {
width: 108px;
.dja();
}
.navigator-item {
.da();
font-size: @size-12;
color: rgba(180, 180, 180, 0.9);
width: 165px;
position: relative;
padding-left: 20px;
.label {
margin-left: 12px;
}
&::after {
content: '';
height: 100%;
width: 2px;
background: rgb(30, 30, 30);
position: absolute;
right: 0;
top: 0;
}
.navigator-icon {
width: 20px;
height: 20px;
}
.close-icon {
position: absolute;
top: 50%;
right: 12px;
transform: translate(0, -50%);
}
}
}
</style>
...@@ -2,6 +2,7 @@ import { defineComponent, ref } from 'vue'; ...@@ -2,6 +2,7 @@ import { defineComponent, ref } from 'vue';
import Header from './components/Header.vue'; import Header from './components/Header.vue';
// import Footer from './components/Footer.vue'; // import Footer from './components/Footer.vue';
import Content from './components/Content.vue'; import Content from './components/Content.vue';
import ToolBar from './components/ToolBar.vue';
import '@/style/layout.less'; import '@/style/layout.less';
import { onBeforeRouteUpdate, useRoute } from 'vue-router'; import { onBeforeRouteUpdate, useRoute } from 'vue-router';
...@@ -35,6 +36,7 @@ export default defineComponent({ ...@@ -35,6 +36,7 @@ export default defineComponent({
<div> <div>
<t-layout key="no-side"> <t-layout key="no-side">
<Header /> <Header />
<ToolBar />
<t-content class="s-layout-content narrow-scrollbar" id="layout-scroll"> <t-content class="s-layout-content narrow-scrollbar" id="layout-scroll">
<Content /> <Content />
{/* {this.footer ? ( {/* {this.footer ? (
......
...@@ -63,6 +63,7 @@ ...@@ -63,6 +63,7 @@
</div> </div>
</SelectionPopup> </SelectionPopup>
</div> </div>
<template v-if="lists.soundColor.length">
<div class="default-add">+</div> <div class="default-add">+</div>
<div @click="openSoundColor" class="default-label"> <div @click="openSoundColor" class="default-label">
<SelectionPopup <SelectionPopup
...@@ -86,6 +87,7 @@ ...@@ -86,6 +87,7 @@
</div></SelectionPopup </div></SelectionPopup
> >
</div> </div>
</template>
</div> </div>
</div> </div>
</template> </template>
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
maxHeight: maxHeight + 'px', maxHeight: maxHeight + 'px',
}" }"
> >
<Grid :length="digitalList.list.length" :rowGap="12" :marginLeft="8">
<template v-for="item in digitalList.list" :key="item.id"> <template v-for="item in digitalList.list" :key="item.id">
<CardOne <CardOne
:row="item" :row="item"
...@@ -21,12 +22,14 @@ ...@@ -21,12 +22,14 @@
@change="onCardChange" @change="onCardChange"
></CardOne> ></CardOne>
</template> </template>
</Grid>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import Grid from '@/components/Grid.vue';
import Select from '@/components/Select.vue'; import Select from '@/components/Select.vue';
import CardOne from '@/components/cardOne.vue'; import CardOne from '@/components/cardOne.vue';
import { ref, onMounted, reactive, watch, computed } from 'vue'; import { ref, onMounted, reactive, watch, computed } from 'vue';
...@@ -118,7 +121,8 @@ const onCardChange = (id: string | number, row: any) => { ...@@ -118,7 +121,8 @@ const onCardChange = (id: string | number, row: any) => {
[createLiveKeys.id]: id, [createLiveKeys.id]: id,
}); });
// 将对应的图片传给右侧工具 // 将对应的图片传给右侧工具
store.commit('live/setLiveImage', row.cover_url); // store.commit('live/setLiveImage', row.cover_url);
store.commit('live/setLiveImage', row.video_url);
}; };
// 数字人列表 // 数字人列表
...@@ -159,6 +163,7 @@ const getList = async () => { ...@@ -159,6 +163,7 @@ const getList = async () => {
try { try {
let res: any = await getDigitalPeopleList(); let res: any = await getDigitalPeopleList();
digitalList.admin = res.adminList; digitalList.admin = res.adminList;
// digitalList.admin = digitalList.admin.concat(res.adminList);
digitalList.my = res.myList; digitalList.my = res.myList;
changeCurrentList(); changeCurrentList();
checkPerson(); checkPerson();
...@@ -209,10 +214,6 @@ watch( ...@@ -209,10 +214,6 @@ watch(
.create-digital-person-list-box { .create-digital-person-list-box {
padding: 12px; padding: 12px;
overflow-y: auto; overflow-y: auto;
display: flex;
justify-content: space-between;
flex-wrap: wrap;
row-gap: 12px;
.custom-card-box { .custom-card-box {
background: white; background: white;
width: 150px; width: 150px;
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
</div> </div>
</SelectionPopup> </SelectionPopup>
</div> </div>
<template v-if="lists.soundColor.length">
<div class="default-add">+</div> <div class="default-add">+</div>
<div @click="openSoundColor" class="default-label"> <div @click="openSoundColor" class="default-label">
<SelectionPopup <SelectionPopup
...@@ -50,6 +51,7 @@ ...@@ -50,6 +51,7 @@
</div></SelectionPopup </div></SelectionPopup
> >
</div> </div>
</template>
</div> </div>
<!-- --> <!-- -->
<div class="phonetics-chose" v-show="currentOption === scriptTypePhonetics"> <div class="phonetics-chose" v-show="currentOption === scriptTypePhonetics">
......
...@@ -40,7 +40,12 @@ ...@@ -40,7 +40,12 @@
<div class="label">画面预览:点中主播,即可缩放、移动位置</div> <div class="label">画面预览:点中主播,即可缩放、移动位置</div>
<div class="drag-box"> <div class="drag-box">
<template v-if="liveImage"> <template v-if="liveImage">
<Drag :img="liveImage" id="1"></Drag> <!-- <Drag :img="liveImage" id="1"></Drag> -->
<Drag2 :child="videoPlay">
<div class="video-play-box">
<video ref="videoPlay" :src="liveImage" @canplay="videoCanplay"></video>
</div>
</Drag2>
</template> </template>
</div> </div>
</div> </div>
...@@ -51,6 +56,7 @@ ...@@ -51,6 +56,7 @@
</template> </template>
<script lang="tsx" setup> <script lang="tsx" setup>
import Drag2 from '@/components/Drag2.vue';
import Loading from '@/components/loading.vue'; import Loading from '@/components/loading.vue';
import ConfirmDialog from '@/components/ConfirmDialog.vue'; import ConfirmDialog from '@/components/ConfirmDialog.vue';
import StepList from './components/SetpsList'; import StepList from './components/SetpsList';
...@@ -70,6 +76,7 @@ import { createLiveTask, getLiveTaskInfo, createDrafts, getDraftsDetail } from ' ...@@ -70,6 +76,7 @@ import { createLiveTask, getLiveTaskInfo, createDrafts, getDraftsDetail } from '
import { useRoute, useRouter } from 'vue-router'; import { useRoute, useRouter } from 'vue-router';
import routerConfig from '@/router/tool'; import routerConfig from '@/router/tool';
import { onUpdateLiveTask } from '@/service/Common'; import { onUpdateLiveTask } from '@/service/Common';
import { createLiveRouteKey } from '@/constants/token';
import { useLiveInfoSubmit } from '@/hooks/useStoreCommit'; import { useLiveInfoSubmit } from '@/hooks/useStoreCommit';
const [commitInfo] = useLiveInfoSubmit(); const [commitInfo] = useLiveInfoSubmit();
...@@ -91,6 +98,12 @@ const toolHeight = ref(0); ...@@ -91,6 +98,12 @@ const toolHeight = ref(0);
const currentSetp = ref(1); const currentSetp = ref(1);
const videoPlay = ref<HTMLVideoElement>();
const videoCanplay = () => {
videoPlay.value.play();
};
const getLoadStatus = (value: number) => { const getLoadStatus = (value: number) => {
if (route.query.type === 'edit' || route.query.type === 'edit_drafts') { if (route.query.type === 'edit' || route.query.type === 'edit_drafts') {
return true; return true;
...@@ -216,6 +229,8 @@ onMounted(() => { ...@@ -216,6 +229,8 @@ onMounted(() => {
getEditInfo(routeQuery.id, routeQuery.type); getEditInfo(routeQuery.id, routeQuery.type);
} }
store.commit('live/setName', route.query.title ? route.query.title : ''); store.commit('live/setName', route.query.title ? route.query.title : '');
// 记录本次路由
window.localStorage.setItem(createLiveRouteKey, JSON.stringify(route.query));
}); });
const backHome = () => { const backHome = () => {
...@@ -400,6 +415,7 @@ const confirm = async () => { ...@@ -400,6 +415,7 @@ const confirm = async () => {
padding-top: 4px; padding-top: 4px;
display: flex; display: flex;
position: relative; position: relative;
overflow: hidden;
& > :not(:last-child) { & > :not(:last-child) {
background: rgb(48, 48, 48); background: rgb(48, 48, 48);
height: 100%; height: 100%;
...@@ -465,10 +481,19 @@ const confirm = async () => { ...@@ -465,10 +481,19 @@ const confirm = async () => {
flex: 1; flex: 1;
.drag { .drag {
width: 100%; width: 100%;
height: auto;
.show-img {
.video-play-box {
width: 100%;
video {
width: 100%;
height: 100%; height: 100%;
} }
} }
} }
} }
}
}
}
} }
</style> </style>
...@@ -144,7 +144,10 @@ watch( ...@@ -144,7 +144,10 @@ watch(
} }
} }
.person-list { .person-list {
margin-top: 12px; margin: 12px 0;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
.card-active { .card-active {
border: 1px solid #04ae8a; border: 1px solid #04ae8a;
} }
......
<template> <template>
<div class="digital-people-draft"> <div class="digital-people-draft">
<div class="card-item-list"> <Grid :marginLeft="35" :length="myDigtalList.list.length" :rowGap="18" :cardWidth="200">
<template v-for="item in myDigtalList.list" :key="item.id"> <template v-for="item in myDigtalList.list" :key="item.id">
<CardTwo <CardTwo
:id="item.id" :id="item.id"
...@@ -19,13 +19,14 @@ ...@@ -19,13 +19,14 @@
</template> </template>
</CardTwo> </CardTwo>
</template> </template>
</div> </Grid>
<CustomLoading v-show="myDigtalList.loading"></CustomLoading> <CustomLoading v-show="myDigtalList.loading"></CustomLoading>
<ConfirmDialog v-model="confirmVisible" title="确定删除吗?" @confirm="confirm"></ConfirmDialog> <ConfirmDialog v-model="confirmVisible" title="确定删除吗?" @confirm="confirm"></ConfirmDialog>
</div> </div>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import Grid from '@/components/Grid.vue';
import ConfirmDialog from '@/components/ConfirmDialog.vue'; import ConfirmDialog from '@/components/ConfirmDialog.vue';
import { reactive, onMounted, ref } from 'vue'; import { reactive, onMounted, ref } from 'vue';
import CardTwo from '@/components/cardTwo.vue'; import CardTwo from '@/components/cardTwo.vue';
...@@ -116,15 +117,6 @@ onMounted(() => { ...@@ -116,15 +117,6 @@ onMounted(() => {
background: #303030; background: #303030;
position: relative; position: relative;
min-height: 300px; min-height: 300px;
.card-item-list {
display: flex;
justify-content: space-between;
flex-wrap: wrap;
row-gap: 30px;
margin-left: -20px;
& > * {
margin-left: 20px;
}
.my-digtal-people-hover { .my-digtal-people-hover {
position: absolute; position: absolute;
top: 0; top: 0;
...@@ -144,6 +136,5 @@ onMounted(() => { ...@@ -144,6 +136,5 @@ onMounted(() => {
margin-bottom: 20px; margin-bottom: 20px;
} }
} }
}
} }
</style> </style>
<template> <template>
<div class="my-digtal-people"> <div class="my-digtal-people">
<div class="card-item-list"> <Grid :length="myDigtalList.list.length" :marginLeft="35">
<template v-for="item in myDigtalList.list" :key="item.id"> <template v-for="item in myDigtalList.list" :key="item.id">
<CardTwo <CardTwo
:id="item.id" :id="item.id"
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
> >
<template #hover> <template #hover>
<div class="my-digtal-people-hover"> <div class="my-digtal-people-hover">
<template v-if="item.is_live == 0"> <template v-if="item.is_live == 1">
<Button class="digtal-people-start-end" theme="danger" height="40px" @click="startLive(item)" <Button class="digtal-people-start-end" theme="danger" height="40px" @click="startLive(item)"
>开启直播</Button >开启直播</Button
> >
...@@ -30,13 +30,14 @@ ...@@ -30,13 +30,14 @@
</template> </template>
</CardTwo> </CardTwo>
</template> </template>
</div> </Grid>
<CustomLoading v-show="myDigtalList.loading"></CustomLoading> <CustomLoading v-show="myDigtalList.loading"></CustomLoading>
<ConfirmDialog v-model="confirmVisible" title="确定删除吗?" @confirm="confirm"></ConfirmDialog> <ConfirmDialog v-model="confirmVisible" title="确定删除吗?" @confirm="confirm"></ConfirmDialog>
</div> </div>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import Grid from '@/components/Grid.vue';
import { onMounted, reactive, ref } from 'vue'; import { onMounted, reactive, ref } from 'vue';
import ConfirmDialog from '@/components/ConfirmDialog.vue'; import ConfirmDialog from '@/components/ConfirmDialog.vue';
import CardTwo from '@/components/cardTwo.vue'; import CardTwo from '@/components/cardTwo.vue';
...@@ -136,15 +137,6 @@ onMounted(() => { ...@@ -136,15 +137,6 @@ onMounted(() => {
background: #303030; background: #303030;
position: relative; position: relative;
min-height: 300px; min-height: 300px;
.card-item-list {
display: flex;
justify-content: space-between;
flex-wrap: wrap;
row-gap: 30px;
margin-left: -20px;
& > * {
margin-left: 20px;
}
.my-digtal-people-hover { .my-digtal-people-hover {
position: absolute; position: absolute;
top: 0; top: 0;
...@@ -164,6 +156,5 @@ onMounted(() => { ...@@ -164,6 +156,5 @@ onMounted(() => {
margin-bottom: 20px; margin-bottom: 20px;
} }
} }
}
} }
</style> </style>
...@@ -189,7 +189,7 @@ onMounted(() => { ...@@ -189,7 +189,7 @@ onMounted(() => {
@import '@/style/variables.less'; @import '@/style/variables.less';
.custom-home-page { .custom-home-page {
.home-tool-bar { .home-tool-bar {
margin-top: 30px; padding-top: 30px;
.label-box { .label-box {
.label { .label {
font-size: @size-24; font-size: @size-24;
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
</div> </div>
</SelectionPopup> </SelectionPopup>
</div> </div>
<template v-if="lists.soundColor.length">
<div class="default-add">+</div> <div class="default-add">+</div>
<div @click="openSoundColor" class="default-label"> <div @click="openSoundColor" class="default-label">
<SelectionPopup <SelectionPopup
...@@ -53,6 +54,7 @@ ...@@ -53,6 +54,7 @@
</div></SelectionPopup </div></SelectionPopup
> >
</div> </div>
</template>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -39,33 +39,6 @@ const playEnd = (id: any) => { ...@@ -39,33 +39,6 @@ const playEnd = (id: any) => {
emit('playEnd', id); emit('playEnd', id);
}; };
// const canplay = () => {
// const a = document.createElement('a');
// a.onclick = function () {
// // video .play();//这样就可以自动播放了
// playVideo();
// };
// const event = new MouseEvent('click');
// a.dispatchEvent(event);
// videoRef1.value.removeEventListener('canplay', canplay);
// };
// watch(
// () => props.video,
// (v) => {
// if (v) {
// setTimeout(() => {
// videoRef1.value.addEventListener('canplay', canplay);
// }, 0);
// }
// },
// );
const getVideoDuration = () => {
total.value = videoRef1.value.duration;
playVideo();
};
const closeInterval = () => { const closeInterval = () => {
window.clearInterval(interval1); window.clearInterval(interval1);
clearInterval(interval1); clearInterval(interval1);
...@@ -73,6 +46,7 @@ const closeInterval = () => { ...@@ -73,6 +46,7 @@ const closeInterval = () => {
}; };
const playVideo = () => { const playVideo = () => {
console.log(videoRef1.value);
videoRef1.value.play(); videoRef1.value.play();
closeInterval(); closeInterval();
interval1 = window.setInterval(() => { interval1 = window.setInterval(() => {
......
...@@ -62,12 +62,6 @@ const audioCanplay = () => { ...@@ -62,12 +62,6 @@ const audioCanplay = () => {
audioRef.value.play(); audioRef.value.play();
}; };
const trans = async () => {
let c_file = file.value.files[0];
let base = await getBase64(c_file);
// base = dataURLtoBlob(base);
realVideo.value = base;
};
const liveInfo = reactive({ const liveInfo = reactive({
// 原始链接 // 原始链接
video: [], video: [],
...@@ -102,7 +96,14 @@ const playEnd = (id: any) => { ...@@ -102,7 +96,14 @@ const playEnd = (id: any) => {
// //
let index = addVideoList.value.findIndex((item: any) => item.id == id); let index = addVideoList.value.findIndex((item: any) => item.id == id);
if (index !== -1) { if (index !== -1) {
console.log('播放结束并更新状态');
addVideoList.value[index].play_status = true; addVideoList.value[index].play_status = true;
// 下一个视频id
let obj = addVideoList.value.find((item: any) => item.play_status == false);
if (obj) {
console.log(addVideoId.value, '更新当前id');
addVideoId.value = obj.id;
}
} }
} }
}; };
...@@ -115,14 +116,36 @@ const stopInterval = () => { ...@@ -115,14 +116,36 @@ const stopInterval = () => {
// 获取最新的内容 // 获取最新的内容
const openInterval = () => { const openInterval = () => {
// interval = window.setInterval(() => {}, 2000); interval = window.setInterval(() => {
// 获取
let index = addVideoList.value.findIndex((item: any) => item.id == addVideoId.value && item.play_status == false);
if (index !== -1) {
// 当前页面
addVideo.value = addVideoList.value[index].reply_content;
console.log('找到下标', index);
}
}, 2000);
}; };
let num = 1;
// 获取直播互动内容 // 获取直播互动内容
const getLive = async () => { const getLive = async () => {
try { try {
let res: any = await getliveTaskReply(route.query.id); let res: any = await getliveTaskReply(route.query.id);
if (res.code == 0 && res.data && res.data.length) { if (res.code == 0 && res.data) {
if (isDev()) {
num += 1;
res.data = [
{
id: num,
reply_content:
num % 2 == 1
? 'https://yunyi-live.oss-cn-hangzhou.aliyuncs.com/live/output/1.mp4'
: 'http://yunyi-tiktok.oss-cn-shenzhen.aliyuncs.com/files/user/admin/5c8eeb9e-6a7b-45e6-85f9-1c75c945b8b1.mp4',
},
];
}
res.data.forEach((item: any) => { res.data.forEach((item: any) => {
item.play_status = false; item.play_status = false;
}); });
...@@ -130,6 +153,10 @@ const getLive = async () => { ...@@ -130,6 +153,10 @@ const getLive = async () => {
// problem // problem
// reply_content // reply_content
addVideoList.value = addVideoList.value.concat(res.data); addVideoList.value = addVideoList.value.concat(res.data);
if (addVideoList.value.length == 1) {
addVideoId.value = addVideoList.value[0].id;
addVideo.value = addVideoList.value[0].reply_content;
}
} }
} catch (e) { } catch (e) {
console.log(e); console.log(e);
...@@ -151,33 +178,6 @@ const closeLiveInterval = () => { ...@@ -151,33 +178,6 @@ const closeLiveInterval = () => {
intervalLive = null; intervalLive = null;
}; };
const getVideo = (url: string) => {
return request.get(url, {
responseType: 'blob',
headers: {},
});
};
const installVideo = async () => {
try {
let list = [];
liveInfo.video.forEach((item: string) => {
list.push(getVideo(item));
});
let res: any = await request.all(list);
if (res && res.length) {
liveInfo.video = res;
// 通知python合并
submitVideo();
} else {
show_message(res);
}
} catch (e) {
show_message(e.message);
console.log(e);
}
};
const getDetail = async () => { const getDetail = async () => {
if (!routeQuery.id) { if (!routeQuery.id) {
show_message('禁止访问'); show_message('禁止访问');
...@@ -208,18 +208,6 @@ const submitVideo = () => { ...@@ -208,18 +208,6 @@ const submitVideo = () => {
show_message(e.message); show_message(e.message);
} }
}; };
const dataURLtoBlob = (base64: any) => {
const arr = base64.split(',');
let mime = arr[0].match(/:(.*?);/);
mime = mime ? mime[1] : 'test.mp4';
const bstr = atob(arr[1]);
let n = bstr.length;
const u8arr = new Uint8Array(n);
while (n--) {
u8arr[n] = bstr.charCodeAt(n);
}
return new Blob([u8arr], { type: mime });
};
// python 回调 // python 回调
const mergeCallback = (params: any) => { const mergeCallback = (params: any) => {
...@@ -236,7 +224,6 @@ onMounted(async () => { ...@@ -236,7 +224,6 @@ onMounted(async () => {
// 将通知方法注入window // 将通知方法注入window
injectWindow('mergeCallback', mergeCallback); injectWindow('mergeCallback', mergeCallback);
await getDetail(); await getDetail();
// installVideo();
if (isDev()) { if (isDev()) {
mergeCallback({ mergeCallback({
...@@ -246,9 +233,11 @@ onMounted(async () => { ...@@ -246,9 +233,11 @@ onMounted(async () => {
// 打开定时任务 // 打开定时任务
startLiveInterval(); startLiveInterval();
openInterval();
}); });
onBeforeUnmount(() => { onBeforeUnmount(() => {
closeLiveInterval(); closeLiveInterval();
stopInterval();
}); });
</script> </script>
......
import { TOKEN_NAME } from '@/config/global'; import { TOKEN_NAME } from '@/config/global';
import { UserInfo } from '@/interface'; import { UserInfo } from '@/interface';
import Cookies from 'js-cookie'; import Cookies from 'js-cookie';
import router from '@/router';
import routerConfig from '@/router/tool';
import { show_message } from '@/utils/tool';
interface MyState { interface MyState {
token: String | undefined | null; token: String | undefined | null;
userInfo: any; userInfo: any;
...@@ -39,6 +42,7 @@ const mutations = { ...@@ -39,6 +42,7 @@ const mutations = {
Cookies.remove(TOKEN_NAME); Cookies.remove(TOKEN_NAME);
state.token = ''; state.token = '';
state.userInfo = {}; state.userInfo = {};
window.localStorage.setItem('login_token', '');
}, },
removeUserInfo(state: StateType) { removeUserInfo(state: StateType) {
state.userInfo = {}; state.userInfo = {};
...@@ -75,6 +79,21 @@ const actions = { ...@@ -75,6 +79,21 @@ const actions = {
// const data: any = await getUserInfo(); // const data: any = await getUserInfo();
// commit('setUserInfo', data.data); // commit('setUserInfo', data.data);
// return data; // return data;
// commit('setUserInfo', data.data);
} catch (e) {
console.log(e);
}
},
async logout({ commit, state }) {
try {
commit('removeToken');
commit('removeUserInfo');
show_message('已退出', 'success');
router.push({
path: routerConfig.login.path,
name: routerConfig.login.name,
});
} catch (e) { } catch (e) {
console.log(e); console.log(e);
} }
......
...@@ -35,21 +35,12 @@ ...@@ -35,21 +35,12 @@
color: @brand-color; color: @brand-color;
} }
} }
.t-layout {
.logo-container { background: #1e1e1e;
cursor: pointer;
display: inline-flex;
height: 64px;
margin-left: 24px;
}
.version-container {
color: @text-color-primary;
opacity: 0.4;
} }
.s-layout-content { .s-layout-content {
height: calc(100vh - 50px); height: calc(100vh - 90px);
overflow-y: auto; overflow-y: auto;
overflow-x: hidden; overflow-x: hidden;
background: rgb(30, 30, 30); background: rgb(30, 30, 30);
...@@ -57,6 +48,7 @@ ...@@ -57,6 +48,7 @@
width: @pageWidth; width: @pageWidth;
height: 100%; height: 100%;
margin: 0 auto 0 auto; margin: 0 auto 0 auto;
padding-top: 4px;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment