You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
13 KiB

1 month ago
"use strict";(self["webpackChunkh5_u2"]=self["webpackChunkh5_u2"]||[]).push([[780],{8859:function(e,a,l){var t=l(4311),i=l(5975);const n={baseURL:location.origin,timeout:5e3},s=t.Z.create(n);s.interceptors.request.use((function(e){return"get"===e.method&&"/api/login"!==e.url&&(localStorage.getItem("os-token")?(e.params||(e.params={}),Object.assign(e.params,{token:localStorage.getItem("os-token")})):((0,i.z8)({message:"请先登录",type:"warning"}),localStorage.clear())),e}),(function(e){return Promise.reject(e)})),s.interceptors.response.use((function(e){return 1===e.data.ret&&(0,i.z8)({message:"请先登录",type:"warning"}),e.data}),(function(e){return Promise.reject(e)})),a["Z"]=s},279:function(e,a,l){l.r(a),l.d(a,{default:function(){return A}});l(7658);var t=l(3396),i=l(4870),n=l(7139),s=l(5102),d=l(5975),u=l(7096),o=l(5743),m=l.n(o),r=l(8859);const p=e=>((0,t.dD)("data-v-b3c4a346"),e=e(),(0,t.Cn)(),e),c={class:"addRealm"},g={key:0,style:{height:"40px",display:"flex","align-items":"center"}},v={class:"text",style:{"font-size":"15px","margin-right":"10px"}},w={class:"text",style:{"font-size":"15px","margin-right":"10px"}},y={class:"text",style:{"font-size":"15px","margin-right":"10px"}},h=p((()=>(0,t._)("br",null,null,-1))),k={key:1,style:{height:"40px",display:"flex","align-items":"center"}},f={class:"text",style:{"font-size":"15px","margin-right":"10px"}},b={class:"text",style:{"font-size":"15px","margin-right":"10px"}},x={class:"text",style:{"font-size":"15px","margin-right":"10px"}},_=p((()=>(0,t._)("br",null,null,-1))),T={key:2,style:{width:"340px",height:"40px",display:"flex","align-items":"flex-start","justify-content":"flex-start"}},I={class:"text",style:{"font-size":"15px","margin-right":"10px"}},z={class:"card-header",style:{display:"flex","justify-content":"space-between"}},D=p((()=>(0,t._)("span",{style:{"font-size":"20px","vertical-align":"middle"}}," 最近开服 ",-1))),U={key:0},q={key:1},R={style:{display:"inline-block",position:"absolute",top:"10px",right:"46px"}},W={key:0,class:"color-span add"},S={key:1,class:"color-span del"},j={key:2,class:"color-span edit"},H={key:0,class:"text"},N={key:0},V={key:0};var Y={__name:"addRealm",setup(e){const a=(0,i.iH)("add"),l=(0,i.iH)([]),o=async e=>{if("edit"===e&&(Y.list[0]={areaName:Y.list[0].areaName,bigRealmId:Z.value[A.value].bigRealmId.toString(),openTime:m().unix(Z.value[A.value].openTime).toDate(),visibleTime:m().unix(Z.value[A.value].visibleTime).toDate(),realmId:Z.value[A.value].realmId},E.value=[...Z.value.filter((e=>e.bigRealmId==Z.value[A.value].bigRealmId)).map((e=>e.name)),Z.value[Z.value.length-1].name.replace(/([0-9]+)/g,(function(e){return Number(e)+1}))]),"add"===e&&(Y.list[0]={areaName:"",bigRealmId:"",openTime:m()().set("hour",5).set("minute",0).set("second",0).toDate(),visibleTime:"",realmId:""},Z.value=[],E.value=[]),"select"===e){const{data:e}=await r.Z.get("/api/select_recentOperationRealm");l.value=e,e.some((e=>"del"===e.operation))&&(Z.value.push(...e.filter((e=>"del"===e.operation))),A.value=Z.value.length-1)}a.value=e},p=(0,t.Fl)((()=>l?.value?.find((e=>e.realmId===Z.value[A.value].realmId))||{})),Y=(0,i.qj)({list:[{areaName:"",bigRealmId:"",openTime:m()().set("hour",5).set("minute",0).set("second",0).toDate(),visibleTime:"",realmId:""}]}),C=(0,i.iH)([]),Z=(0,i.iH)([]),A=(0,i.iH)(0),M=e=>{A.value+=e};let B=0;const $=async e=>{const{data:a}=await r.Z.get("/api/select_recentRealm",{params:{areaName:e}});Z.value=a,A.value=a.length-1,B=a[a.length-1].bigRealmId,C.value[0]=[];for(let l=0;l<2;l++)C.value[0][l]=(B+l).toString();Y.list[0].bigRealmId&&!C.value[0].includes(Y.list[0].bigRealmId)&&(Y.list[0].bigRealmId="",E.value=[])},E=(0,i.iH)([]),K=e=>{E.value=[...Z.value.filter((a=>a.bigRealmId==e)).map((e=>e.name)),Z.value[Z.value.length-1].name.replace(/([0-9]+)/g,(function(e){return Number(e)+1}))]},O=((0,i.iH)(""),(0,i.iH)(""),e=>e.getTime()<Date.now()-864e5||e.getTime()>Date.now()+1728e5),F=(0,t.Fl)((()=>Y.list.map((e=>!!e.openTime)))),P=(e,a)=>!F.value[a]||e.getTime()<=Y.list[a].openTime.getTime()-864e5,L=e=>Y.list.some((a=>a.bigRealm
//# sourceMappingURL=addRealm.4dc256fb.js.map