1 |
- import{d as g,Q as A,U as B,j as a,a5 as m,bK as w,B as r,z as o,C,w as l,T as d}from"./index.cf487d9e.js";import{T as v}from"./index.0656d807.js";import{C as b}from"./index.36fcf68d.js";import{L as k}from"./index.f45751d0.js";import{R as u,C as i}from"./index.e075959b.js";import"./index.dffaafe3.js";import"./index.b915e986.js";import"./use-height.6b216291.js";import"./use-tab-status.56c677c5.js";const I="_bgImg_1oiw6_1",D="_sticky_1oiw6_9",_="_codeContainer_1oiw6_14",Q="_codeInput_1oiw6_20",F="_codeBtn_1oiw6_34",y="_colGroup_1oiw6_44",N="_title_1oiw6_50",W="_colRow_1oiw6_65",R="_codeList_1oiw6_73",H="_c1_1oiw6_94",L="_c2_1oiw6_97",U="_c3_1oiw6_100",q="_liveBtn_1oiw6_103";var s={bgImg:I,sticky:D,codeContainer:_,codeInput:Q,codeBtn:F,colGroup:y,title:N,colRow:W,codeList:R,c1:H,c2:L,c3:U,liveBtn:q},M="./assets/bg-image.96b0426b.png",J="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAAXNSR0IArs4c6QAABHRJREFUWEe1mE1sFVUUx393BiqhVOIXbhAXfkWesYJUWqtGNHWBGze6AE0xIfLVQi2CSQvEEBMasdaEh5TXVmmCImElJpiIxE0tCDWxhNoSI8aPhTHWQLvAtu91zJ2PNzO305m5LbykSefN5N3fnPs//3vOESgfq7o2g8l6TGoQ1hJMyhAWGLh/wf+jvku4bzKKwe8ITiPoFG3HBoIIwruwlr5cwm3zWzHYhLBMG8AE5BOGusgNuy5gcIgFhe3inRPjksUGsmEWlp7CsJ4vAkgYCRWMTiTgLCNmv6w4w/zCagnlAFXWHkBQ58Dc1IjE/X5WtByvF1ZFbQaDfgycbfIiUoyQCzjd9j33NKx5Ba5fh0+PwsUfA3rT0JigQIlRLqyKdW0YVkMxOqbl6sb9MfU6qKe774Tse2BKWmB8AnbugKvDMUkQoz/BhxLoEoaVsYG8KHgQ9nWMRlYuh51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AAAABJRU5ErkJggg==",Y=g({name:"activation-code",setup(){const t=A({refreshing:!1,height:0,list:[],dataShow:!0,loading:!1,finished:!1,params:{page:1,rows:10},isClick:!1,code:""}),n=async(e=!1)=>{try{if(t.isClick)return;t.isClick=!0;const h=await l.post("/api-student/tenantActivationCode/page",{data:{...t.params},hideLoading:e});t.isClick=!1,t.loading=!1,t.refreshing=!1;const c=h.data||{};if(t.list.length>0&&c.current===1)return;t.list=t.list.concat(c.rows||[]),t.finished=c.current>=c.pages,t.params.page=c.current+1,t.dataShow=t.list.length>0}catch{t.isClick=!1,t.dataShow=!1,t.refreshing=!1,t.finished=!0}},p=async()=>{try{if(!t.code){d("\u8BF7\u8F93\u5165\u6FC0\u6D3B\u7801");return}await l.post("/api-student/tenantActivationCode/active?activationCode="+t.code),d.success("\u6FC0\u6D3B\u6210\u529F"),t.params.page=1,t.list=[],n(!0)}catch{}},f=async e=>{try{await l.post("/api-student/tenantActivationCode/activeById?id="+e.id),d.success("\u6FC0\u6D3B\u6210\u529F"),t.params.page=1,t.list=[],n(!0)}catch{}};return B(()=>{n()}),()=>a("div",{class:s.activationCode},[a("div",{class:s.sticky},[a(v,{position:"top"},{default:()=>[a(b,{background:"transparent",isFixed:!1,border:!1,color:"#131415"},null),a("div",{class:s.codeContainer},[m(a("input",{"onUpdate:modelValue":e=>t.code=e,placeholder:"\u8BF7\u8F93\u5165\u6FC0\u6D3B\u7801",class:s.codeInput,maxlength:7},null),[[w,t.code]]),a(r,{type:"primary",round:!0,class:s.codeBtn,block:!0,onClick:p},{default:()=>[o("\u7ACB\u5373\u5151\u6362")]})])]}),a("img",{class:s.bgImg,src:M},null),a(k,{"loading-text":" ",finished:t.finished,"finished-text":" ",onLoad:n,style:{overflow:"hidden"}},{default:()=>[a("div",{class:s.colGroup},[a("div",{class:s.title},[a("img",{src:J},null),o("\u6FC0\u6D3B\u8BB0\u5F55")]),a(u,{class:s.colRow},{default:()=>[a(i,{span:5},{default:()=>[o("\u6FC0\u6D3B\u7801")]}),a(i,{span:4},{default:()=>[o("\u5468\u671F")]}),a(i,{span:6},{default:()=>[o("\u6FC0\u6D3B\u72B6\u6001")]}),a(i,{span:9},{default:()=>[o("\u6FC0\u6D3B\u65F6\u95F4")]})]}),a("div",{class:s.codeList},[t.list.map(e=>a(u,null,{default:()=>[a(i,{span:5},{default:()=>[e.activationCode]}),a(i,{span:4},{default:()=>[e.purchaseCycle,o("\u4E2A\u6708")]}),a(i,{span:6,class:e.activationStatus?s.c1:s.c3},{default:()=>[e.activationStatus?"\u5DF2\u6FC0\u6D3B":"\u5F85\u6FC0\u6D3B"]}),a(i,{span:9},{default:()=>[e.activationStatus?e.activationTime:a(r,{class:s.liveBtn,color:"#FE2451",onClick:()=>f(e)},{default:()=>[o("\u6FC0\u6D3B")]})]})]})),!t.dataShow&&a("div",{class:s.emptyContainer},[a(C,{tips:"\u6682\u65E0\u6FC0\u6D3B\u7801",btnStatus:!1},null)])])])]})])])}});export{Y as default};
|