1 |
- import{d as g,Q as A,U as B,j as s,a5 as m,bK as C,B as r,z as o,C as v,w as l,T as d}from"./index.e6d6174e.js";import{T as w}from"./index.275665ec.js";import{C as k}from"./index.045f03fd.js";import{b as I}from"./bg-image.e9966434.js";import{L as b}from"./index.f904775d.js";import{R as u,C as i}from"./index.83d3716a.js";import"./index.684ca989.js";import"./index.d8c651bf.js";import"./use-height.8140ea04.js";import"./use-tab-status.e9ba8498.js";const D="_bgImg_4scih_1",_="_sticky_4scih_9",Q="_codeContainer_4scih_13",F="_codeInput_4scih_19",y="_codeBtn_4scih_33",N="_colGroup_4scih_43",W="_title_4scih_49",R="_colRow_4scih_64",H="_codeList_4scih_72",L="_c1_4scih_93",U="_c2_4scih_96",q="_c3_4scih_99",M="_liveBtn_4scih_102";var a={bgImg:D,sticky:_,codeContainer:Q,codeInput:F,codeBtn:y,colGroup:N,title:W,colRow:R,codeList:H,c1:L,c2:U,c3:q,liveBtn:M},J="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAAXNSR0IArs4c6QAABHRJREFUWEe1mE1sFVUUx393BiqhVOIXbhAXfkWesYJUWqtGNHWBGze6AE0xIfLVQi2CSQvEEBMasdaEh5TXVmmCImElJpiIxE0tCDWxhNoSI8aPhTHWQLvAtu91zJ2PNzO305m5LbykSefN5N3fnPs//3vOESgfq7o2g8l6TGoQ1hJMyhAWGLh/wf+jvku4bzKKwe8ITiPoFG3HBoIIwruwlr5cwm3zWzHYhLBMG8AE5BOGusgNuy5gcIgFhe3inRPjksUGsmEWlp7CsJ4vAkgYCRWMTiTgLCNmv6w4w/zCagnlAFXWHkBQ58Dc1IjE/X5WtByvF1ZFbQaDfgycbfIiUoyQCzjd9j33NKx5Ba5fh0+PwsUfA3rT0JigQIlRLqyKdW0YVkMxOqbl6sb9MfU6qKe774Tse2BKWmB8AnbugKvDMUkQoz/BhxLoEoaVsYG8KHgQ9nWMRlYuh51bw3l6MAt952eWlUIMSKARhFV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:"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 f=await l.post("/api-student/tenantActivationCode/page",{data:{...t.params},hideLoading:e});t.isClick=!1,t.loading=!1,t.refreshing=!1;const c=f.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}},h=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{}},p=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()}),()=>s("div",{class:a.activationCode},[s("div",{class:a.sticky},[s(w,{position:"top"},{default:()=>[s(k,{background:"transparent",isFixed:!1,border:!1,color:"#131415"},null),s("div",{class:a.codeContainer},[m(s("input",{"onUpdate:modelValue":e=>t.code=e,placeholder:"\u8BF7\u8F93\u5165\u6FC0\u6D3B\u7801",class:a.codeInput,maxlength:7},null),[[C,t.code]]),s(r,{type:"primary",round:!0,class:a.codeBtn,block:!0,onClick:h},{default:()=>[o("\u7ACB\u5373\u5151\u6362")]})])]}),s("img",{class:a.bgImg,src:I},null),s(b,{"loading-text":" ",finished:t.finished,"finished-text":" ",onLoad:n,style:{overflow:"hidden"}},{default:()=>[s("div",{class:a.colGroup},[s("div",{class:a.title},[s("img",{src:J},null),o("\u6FC0\u6D3B\u8BB0\u5F55")]),s(u,{class:a.colRow},{default:()=>[s(i,{span:5},{default:()=>[o("\u6FC0\u6D3B\u7801")]}),s(i,{span:4},{default:()=>[o("\u5468\u671F")]}),s(i,{span:6},{default:()=>[o("\u6FC0\u6D3B\u72B6\u6001")]}),s(i,{span:9},{default:()=>[o("\u6FC0\u6D3B\u65F6\u95F4")]})]}),s("div",{class:a.codeList},[t.list.map(e=>s(u,null,{default:()=>[s(i,{span:5},{default:()=>[e.activationCode]}),s(i,{span:4},{default:()=>[e.purchaseCycle,o("\u4E2A\u6708")]}),s(i,{span:6,class:e.activationStatus?a.c1:a.c3},{default:()=>[e.activationStatus?"\u5DF2\u6FC0\u6D3B":"\u5F85\u6FC0\u6D3B"]}),s(i,{span:9},{default:()=>[e.activationStatus?e.activationTime:s(r,{class:a.liveBtn,color:"#FE2451",onClick:()=>p(e)},{default:()=>[o("\u6FC0\u6D3B")]})]})]})),!t.dataShow&&s("div",{class:a.emptyContainer},[s(v,{tips:"\u6682\u65E0\u6FC0\u6D3B\u7801",btnStatus:!1},null)])])])]})])])}});export{j as default};
|