1 |
- import{d as y,S as m,V as B,j as s,a6 as g,bV as C,B as p,A as n,C as x,y as r,T as d}from"./ResizeObserver.es.39b48a47.js";import{T as b}from"./index.e90d2179.js";import{C as F}from"./index.970ad07b.js";import{L as j}from"./index.6c529ad4.js";import{R as f,C as o}from"./index.16ffd6ad.js";import"./index.dc19bc54.js";import"./use-tab-status.bcc0c503.js";const Y="_bgImg_1jp2n_1",V="_sticky_1jp2n_9",I="_codeContainer_1jp2n_14",W="_codeInput_1jp2n_20",U="_codeBtn_1jp2n_34",M="_colGroup_1jp2n_44",R="_title_1jp2n_50",T="_colRow_1jp2n_65",H="_codeList_1jp2n_73",N="_c1_1jp2n_94",k="_c2_1jp2n_97",J="_c3_1jp2n_100",E="_liveBtn_1jp2n_103";var e={bgImg:Y,sticky:V,codeContainer:I,codeInput:W,codeBtn:U,colGroup:M,title:R,colRow:T,codeList:H,c1:N,c2:k,c3:J,liveBtn:E},O="./assets/bg-image.96b0426b.png",X="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADYAAAA2CAYAAACMRWrdAAAAAXNSR0IArs4c6QAACXtJREFUaEPNmmuMVdUVx3/73IEZHsWAr0Qeoq2VaptKOxMEKm3H1whVXkJ5jBWq6YepqTUm9UNTpPZDYxMT22LTDxIpyBSp5VWgSsIM5aGhtU0EtQSjHQcoKjRWHsMwj7ObffbZ5+yzzzn3wVyLN4GZe++ee/d/r7X+67/WXoKch/zGkjq8waPxeycj5GyEnIAnxyAYgQD9T+qfBfWfBM+8Hr5nPw9+D9d7wvrd+qzi608hOIonDlGQGykMfpUT4phYtao7C4LaUeIhWe7xtfca8PxFwCyEHItAJDZtNuBJ/bfR85xNqm9JALMOwH49Whe+rz4/9Zr6QinxOELB2wR+K8Mn/E0sX+7bQBLA5Lx5BY4PW4SUTyAYh4enT1mA+hK1CRuIsVripK31kWUt8OrzUpYNLZiymGX56HvV35v1wseTndR4y5jY2yrm/6HfgIuABaCODn8Az38KGJ44qdSphpt3N5nritZmsiyQOq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McO2LdXyy47N5kKujKtGFwjXfjFn9sqqK2ByTdB0zS46srSDqgsd/x9UO3uAwegvy+pULIsVp5WVBd/5qo245I70GRO69v2aTOxY05YrS8Al4+CW+qhcTIMNeznsMfZLti9F177O3z0UbpLZQOoXCtu0Jfrvr8aT4TzUlW8g64bBDdep/seIy/Rm//vx1rpq1hyE3expo0tfIvfQUtq1OX6QMYhSvUVsy7lEtWwMz6Rt76ctlzcl+ykUNeoB1jOiSdBPhQPhbm3mhd4B53aaN6FnUXtWXfK9gHaJJcGHA+wBGlHjRwh14HUI0fBJEzG2EMlfcWiY0pl9gkrnW9EduCFI0c6n6ohsY7FSJkxJGb181Oud9HmFdPVdTAk5rVQ+/l4SCwAZ8b6hP8UHrocjhT5p3VeMQqZM0j5KA1+cqzPJJzsQcwB3EHnxYvb2bXFbvS7FQ5564XwEbKTAsuo788exIzAZY3OqlSQU4JH88FBUP+/5hVRsynlj87aUiE57Nw/G09MQEjVihqRO4qXU6anGqB5vfjocJy41uutYWexkUJN0WHn/wFrc3q7Jm06IwAAAABJRU5ErkJggg==",q=y({name:"activation-code",setup(){const t=m({refreshing:!1,height:0,list:[],dataShow:!0,loading:!1,finished:!1,params:{page:1,rows:10},isClick:!1,code:""}),A=a=>({MONTH:1,QUARTERLY:3,YEAR_HALF:6,YEAR:12})[a],i=async(a=!1)=>{try{if(t.isClick)return;t.isClick=!0;const u=await r.post("/api-student/tenantActivationCode/page",{data:{...t.params},hideLoading:a});t.isClick=!1,t.loading=!1,t.refreshing=!1;const c=u.data||{};if(t.list.length>0&&c.current===1)return;(c.rows||[]).forEach(l=>{const w=A(l.purchaseType)||1;l.purchaseCycle=l.purchaseCycle*w}),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}},v=async()=>{try{if(!t.code){d("\u8BF7\u8F93\u5165\u6FC0\u6D3B\u7801");return}await r.post("/api-student/tenantActivationCode/active?activationCode="+t.code),d.success("\u6FC0\u6D3B\u6210\u529F"),t.params.page=1,t.list=[],i(!0)}catch{}},h=async a=>{try{await r.post("/api-student/tenantActivationCode/activeById?id="+a.id),d.success("\u6FC0\u6D3B\u6210\u529F"),t.params.page=1,t.list=[],i(!0)}catch{}};return B(()=>{i()}),()=>s("div",{class:e.activationCode},[s("div",{class:e.sticky},[s(b,{position:"top"},{default:()=>[s(F,{background:"transparent",isFixed:!1,border:!1,color:"#131415"},null),s("div",{class:e.codeContainer},[g(s("input",{"onUpdate:modelValue":a=>t.code=a,placeholder:"\u8BF7\u8F93\u5165\u6FC0\u6D3B\u7801",class:e.codeInput,maxlength:7},null),[[C,t.code]]),s(p,{type:"primary",round:!0,class:e.codeBtn,block:!0,onClick:v},{default:()=>[n("\u7ACB\u5373\u5151\u6362")]})])]}),s("img",{class:e.bgImg,src:O},null),s(j,{"loading-text":" ",finished:t.finished,"finished-text":" ",onLoad:i,style:{overflow:"hidden"}},{default:()=>[s("div",{class:e.colGroup},[s("div",{class:e.title},[s("img",{src:X},null),n("\u6FC0\u6D3B\u8BB0\u5F55")]),s(f,{class:e.colRow},{default:()=>[s(o,{span:5},{default:()=>[n("\u6FC0\u6D3B\u7801")]}),s(o,{span:5},{default:()=>[n("\u5468\u671F")]}),s(o,{span:5},{default:()=>[n("\u6FC0\u6D3B\u72B6\u6001")]}),s(o,{span:9},{default:()=>[n("\u6FC0\u6D3B\u65F6\u95F4")]})]}),s("div",{class:e.codeList},[t.list.map(a=>s(f,null,{default:()=>[s(o,{span:5},{default:()=>[a.activationCode]}),s(o,{span:5},{default:()=>[a.purchaseCycle,n("\u4E2A\u6708")]}),s(o,{span:5,class:a.activationStatus?e.c1:e.c2},{default:()=>[a.activationStatus?"\u5DF2\u6FC0\u6D3B":"\u5F85\u6FC0\u6D3B"]}),s(o,{span:9},{default:()=>[a.activationStatus?a.activationTime:s(p,{class:e.liveBtn,color:"#FE2451",onClick:()=>h(a)},{default:()=>[n("\u6FC0\u6D3B")]})]})]})),!t.dataShow&&s("div",{class:e.emptyContainer},[s(x,{tips:"\u6682\u65E0\u6FC0\u6D3B\u7801",btnStatus:!1},null)])])])]})])])}});export{q as default};
|