detail-081de001.js 7.9 KB

1
  1. /* empty css *//* empty css */import{_ as e}from"./index-b5951d01.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{_ as a}from"./index.vue_vue_type_script_setup_true_lang-f0ef610e.js";/* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css *//* empty css */import{d as l,p as s,C as t,V as r,m as i,x as o,ao as d,o as n,c as u,a as m,w as p,e as c,t as v,b as _,z as f,Z as h,f as g,l as y,G as b,F as x,y as j,a7 as w,D as V,Q as k,aa as C,W as q,ab as S,v as U,a5 as F,a6 as O,A as z,B as N,a0 as J,a2 as P,R as G,S as I,_ as L}from"./index-544ddb55.js";import{u as Q}from"./useGetList-9b59350b.js";import{u as R}from"./useOpen-2c3844bf.js";import{c as W}from"./index-c58a3da0.js";import{f as Z}from"./index-e6dac72e.js";/* empty css */import"./index-537151e5.js";import"./http-8d4e16e8.js";const $=e=>(G("data-v-dd6b00cf"),e=e(),I(),e),A=$((()=>c("div",{class:"card-header"},[c("span",null,"简介")],-1))),B={class:"flex"},D={class:"flex items-center"},H={class:"text-lg font-bold text-blue-400"},M={class:"ml-3"},T={class:"font-bold"},Y={class:"flex items-center mt-2"},E=$((()=>c("span",null," 集数: ",-1))),K={class:"flex items-center font-bold"},X={key:0},ee={class:""},ae=$((()=>c("span",null,"/",-1))),le={class:""},se={class:"mt-2"},te={class:"font-bold note"},re={class:"flex flex-col justify-between w-full sm:flex-row",style:{width:"100%"}},ie={class:"table-default",style:{width:"100%"}},oe={id:"my-player",class:"video-js",controls:"",autoplay:"",preload:"auto",ref:"myVideo"},de=["src"],ne=$((()=>c("div",{class:"flex items-center"},[c("span",{class:"mr-1 text-red-600"},"*"),_("充值模板配置 ")],-1))),ue={class:"flex flex-col"},me={class:"flex items-center"},pe=$((()=>c("div",{style:{width:"80px","text-align":"end"},class:"mb-3 mr-2"},"首充模板:",-1))),ce={class:"flex items-center"},ve=$((()=>c("div",{style:{width:"80px","text-align":"end"},class:"mr-2"},"非首充模板:",-1))),_e={class:"flex justify-end"},fe=L(l({__name:"detail",props:{primary:String|Number},setup(l){var G,I;const L=l,$=s((()=>{var e,a,l;return(null==(a=null==(e=JSON.parse(t.get("nav_data")))?void 0:e.advertiser)?void 0:a.miniProgramIds)&&(null==(l=JSON.parse(t.get("nav_data")))?void 0:l.app)})),fe=r(),he=i(),ge=i({}),ye=i({}),be=i(!1),xe=i(!1),{data:je,query:we,search:Ve,reset:ke,loading:Ce}=Q("videoStock/episode/list");R();const qe=i([]),Se=i([]);L.primary&&(we.value.video_id=L.primary.id,ge.value.video_id=L.primary.id,ge.value.miniprogram_id=null==(I=null==(G=JSON.parse(t.get("nav_data")))?void 0:G.app)?void 0:I.id);const Ue=s((()=>{var e;return null==(e=je.value)?void 0:e.data})),Fe=(e,a)=>{switch(a){case"firstCharge":ze("firstCharge",{name:e});break;case"notFirstCharge":ze("notFirstCharge",{name:e})}},Oe=()=>{fe.push({path:"/chargeManage/charge"})},ze=(e,a)=>{switch(e){case"firstCharge":Z({limit:999,type:1,...a}).then((e=>{qe.value=e.data}));break;case"notFirstCharge":Z({limit:999,type:2,...a}).then((e=>{Se.value=e.data}))}};return o((()=>{Ve(),ze("firstCharge"),ze("notFirstCharge")})),(l,s)=>{const t=V,r=k,i=C,o=q,G=S,I=a,Q=U,R=F,Z=O,je=z,we=N,Ve=J,ke=e,ze=d("action"),Ne=P;return n(),u(x,null,[m(r,{class:"box-card"},{header:p((()=>[A])),default:p((()=>[c("div",B,[c("div",null,[m(t,{class:"mr-2 rounded-sm",src:L.primary.cover_image,style:{width:"128px",height:"160px"},fit:"cover",lazy:!0},null,8,["src"])]),c("div",null,[c("div",D,[c("span",H,v(L.primary.name),1),c("div",M,[_(" 剧号: "),c("span",T,v(L.primary.id),1)])]),c("div",Y,[E,c("div",K,[1==L.primary.update_type?(n(),u("div",X,[c("span",ee,v(L.primary.updated_episode_num),1),ae])):f("",!0),c("div",null,[c("span",le,v(L.primary.total_episode_num),1)]),c("span",null," 【 "+v(L.primary.update_type_str)+" 】 ",1)])]),c("div",se,[_(" 简介: "),c("span",te,v(L.primary.note),1)])])])])),_:1}),c("div",re,[c("div",ie,[h((n(),y(G,{data:g(Ue),class:"w-full mt-3",style:{width:"100%"}},{default:p((()=>[m(i,{prop:"series_name",label:"章节名称"}),m(i,{prop:"is_charge",label:"是否付费"},{default:p((e=>[c("span",{class:b(e.row.is_charge?"text-red-600":"text-green-300")},v(e.row.is_charge?"【付费】":"【免费】"),3)])),_:1}),m(i,{prop:"duration_str",label:"章节时长"}),m(i,{label:"操作",width:"200"},{default:p((e=>[m(o,{link:"",type:"primary",size:"small",onClick:a=>{return l=e.row,ye.value=l,void(be.value=!0);var l}},{default:p((()=>[_("播放")])),_:2},1032,["onClick"]),g($)?h((n(),y(o,{key:0,link:"",type:"primary",size:"small",onClick:a=>{return l=e.row,ye.value=l,ge.value.series_sequence=l.series_sequence,void(xe.value=!0);var l}},{default:p((()=>[_("创建推广链接")])),_:2},1032,["onClick"])),[[ze,"tuiguang.Promotion.add"]]):f("",!0)])),_:1})])),_:1},8,["data"])),[[Ne,g(Ce)]]),m(I)])]),m(Q,{draggable:"",modelValue:be.value,"onUpdate:modelValue":s[0]||(s[0]=e=>be.value=e),"align-center":"","append-to-body":"",width:"500px",center:"","show-close":!1,style:{background:"none","box-shadow":"none"},"destroy-on-close":""},{default:p((()=>[c("video",oe,[c("source",{src:ye.value.public_video_url,type:"video/mp4"},null,8,de)],512)])),_:1},8,["modelValue"]),m(ke,{modelValue:xe.value,"onUpdate:modelValue":s[6]||(s[6]=e=>xe.value=e),title:"创建推广链接","destroy-on-close":""},{default:p((()=>[h((n(),y(Ve,{model:ge.value,"label-width":"120px",ref_key:"form",ref:he,class:"pr-4"},{default:p((()=>[m(Z,{label:"推广名称",prop:"name",rules:[{required:!0,message:"推广名称必须填写"}]},{default:p((()=>[m(R,{modelValue:ge.value.name,"onUpdate:modelValue":s[1]||(s[1]=e=>ge.value.name=e),name:"name",clearable:""},null,8,["modelValue"])])),_:1}),m(Z,{label:"入口章节",prop:"series_sequence",rules:[{required:!1,message:"入口章节必须填写"}]},{default:p((()=>[m(R,{disabled:"",modelValue:ye.value.series_name,"onUpdate:modelValue":s[2]||(s[2]=e=>ye.value.series_name=e),name:"author",clearable:""},null,8,["modelValue"])])),_:1}),m(Z,{label:"充值模板配置"},{label:p((()=>[ne])),default:p((()=>[c("div",{class:"items-center w-full withdraw-popup-warn"},[c("div",null,[_("如果没有目标充值模板,请前往"),c("span",{class:"text-lg font-bold text-blue-400 cursor-pointer",onClick:Oe},"充值管理"),_("进行添加")])]),c("div",ue,[c("div",me,[pe,m(we,{modelValue:ge.value.first_charge_template_id,"onUpdate:modelValue":s[3]||(s[3]=e=>ge.value.first_charge_template_id=e),filterable:"",remote:"",clearable:"","remote-method":e=>{Fe(e,"firstCharge")},placeholder:"请选择首充模板"},{default:p((()=>[(n(!0),u(x,null,j(qe.value,((e,a)=>(n(),y(je,{key:a,label:e.name,value:e.id},null,8,["label","value"])))),128))])),_:1},8,["modelValue","remote-method"])]),c("div",ce,[ve,m(we,{modelValue:ge.value.not_first_charge_template_id,"onUpdate:modelValue":s[4]||(s[4]=e=>ge.value.not_first_charge_template_id=e),filterable:"",remote:"",clearable:"","remote-method":e=>{Fe(e,"notFirstCharge")},placeholder:"请选择非首充模板"},{default:p((()=>[(n(!0),u(x,null,j(Se.value,((e,a)=>(n(),y(je,{key:a,label:e.name,value:e.id},null,8,["label","value"])))),128))])),_:1},8,["modelValue","remote-method"])])])])),_:1}),c("div",_e,[m(o,{type:"primary",onClick:s[5]||(s[5]=e=>{return a=he.value,ge.value.first_charge_template_id?ge.value.not_first_charge_template_id?void(a&&a.validate((e=>{e&&W(ge.value).then((e=>{w.success(e.message),xe.value=!1,fe.push({path:"/promotion/promotionList",query:{tab:0}})}))})).then((()=>{}))):w.error("请选择非首充模板"):w.error("请选择首充模板");var a})},{default:p((()=>[_(v(l.$t("system.confirm")),1)])),_:1})])])),_:1},8,["model"])),[[Ne,g(Ce)]])])),_:1},8,["modelValue"])],64)}}}),[["__scopeId","data-v-dd6b00cf"]]);export{fe as default};