智慧教务系统
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.
 
 
 
 
 
 

1 lines
7.9 KiB

import{d as ee,r as l,S as te,l as $,k as n,V as z,h as r,c as C,m as x,w as o,a as e,u as i,i as p,e as s,t as m,B as T,F as ae,W as oe,X as se,Y as le,Z as ne,M as re,E as ie,_ as ce,$ as de,D as ue,G as pe,K as _e,H as me,U as fe,a0 as xe,a1 as he}from"./index-f5d841af.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./el-form-item-4ed993c7.js";/* empty css *//* empty css *//* empty css *//* empty css */import{b as ve}from"./sys-4eb1a831.js";import{g as ge,a as ye,s as we}from"./module-3ff668d4.js";import ke from"./index-95601cf6.js";import Ce from"./index-057976c1.js";import"./dark-fe8149ea.js";/* empty css *//* empty css *//* empty css */import"./_plugin-vue_export-helper-c27b6911.js";/* empty css */const Ve={class:"main-container"},be={class:"flex"},Be={class:"w-[450px] mr-[20px] p-[50px] bg-[var(--el-color-info-light-9)]"},Ee={class:"flex items-center justify-between"},Te=e("span",{class:"text-page-title"},"版本信息",-1),Ie={class:"flex-1 w-0 flex justify-end"},Ae={class:"mt-[30px] flex items-center text-[14px] text-[#797979]"},De=e("span",null,"当前版本",-1),Fe={class:"text-[26px] ml-[15px] mr-[10px] text-[#656668]"},Me={key:0,class:"text-[12px]"},Le={key:1,class:"text-[12px] text-[red]"},Re={class:"flex flex-1 justify-between items-center p-[50px] bg-[var(--el-color-info-light-9)]"},He={class:"flex flex-col"},Pe={class:"flex flex-wrap items-center"},Ue=e("p",{class:"text-page-title mr-[20px]"},"授权信息",-1),je={class:"text-[14px] text-[#666]"},$e={class:"mt-[46px] ml-[40px] flex flex-wrap"},ze={class:"text-[14px] mr-[84px]"},Ne={class:"ml-[12px] text-[12px]"},Se={class:"text-[14px] flex items-center"},qe=e("span",null,"授权码",-1),Ge={class:"ml-[12px] mr-[10px] text-[12px]"},Ke={class:"flex flex-1 flex-wrap justify-end relative"},We={class:"px-[18px] py-[8px]"},Xe=e("p",{class:"leading-[32px] text-[14px]"}," 您在官方应用市场购买任意一款应用,即可获得授权码。输入正确授权码认证通过后,即可支持在线升级和其它相关服务 ",-1),Ye={class:"flex justify-end mt-[36px]"},Ze={class:"mt-[20px]"},Je={class:"text-sm mt-[10px] text-info"},Oe={class:"mt-[20px]"},Qe={class:"mt-[10px] text-right"},et=e("div",{class:"text-page-title mb-[20px]"},"历史版本",-1),tt={key:0,class:"mt-[10px] p-[20px] bg-overlay rounded-md timeline-log-wrap whitespace-pre-wrap"},at=["innerHTML"],bt=ee({__name:"authorize",setup(ot){const I=l(null),y=l(null),A=l(null),h=l(!1),v=l(!1),V=l([]),D=l(null);ve().then(({data:a})=>{D.value=a}).catch();const F=l(!1),M=()=>{ge().then(({data:a})=>{V.value=a,F.value?(!d.value||d.value&&d.value.version_no==k.value)&&se({message:n("versionTips"),type:"success"}):F.value=!0})};M();const d=te(()=>V.value.length?V.value[0]:null),N=a=>{const t=le(a);return t.slice(0,t.length/2)+t.slice(t.length/2,t.length-1).replace(/./g,"*")},B=()=>{h.value=!0},_=l({company_name:"",site_address:"",auth_code:""}),b=l(!0),w=l(!1),L=()=>{ye().then(a=>{b.value=!1,a.data.data&&a.data.data.length!=0&&(_.value=a.data.data,h.value=!1)}).catch(()=>{b.value=!1,h.value=!1})};L();const g=$({auth_code:"",auth_secret:""}),R=l(),S=$({auth_code:[{required:!0,message:n("authCodePlaceholder"),trigger:"blur"}],auth_secret:[{required:!0,message:n("authSecretPlaceholder"),trigger:"blur"}]}),q=async a=>{w.value||!a||await a.validate(async t=>{t&&(w.value=!0,we(g).then(()=>{w.value=!1,L()}).catch(()=>{w.value=!1,h.value=!1}))})},H=()=>{var a;window.open((a=D.value)==null?void 0:a.website_url)},k=l("");(()=>{ne().then(a=>{k.value=a.data.version.version})})();const G=()=>{var a;if(!_.value.auth_code){B();return}(a=I.value)==null||a.open()},K=()=>{var a;if(!_.value.auth_code){B();return}if(y.value.cloudBuildTask){(a=y.value)==null||a.open();return}re.confirm(n("cloudBuildTips"),n("warning"),{confirmButtonText:n("confirm"),cancelButtonText:n("cancel"),type:"warning"}).then(()=>{var t;(t=y.value)==null||t.open()})};return(a,t)=>{const u=ie,W=z("View"),P=ce,X=z("Hide"),Y=de,U=ue,j=pe,E=_e,Z=me,J=fe,O=xe,Q=he;return r(),C("div",Ve,[b.value?T("",!0):(r(),x(E,{key:0,class:"box-card !border-none",shadow:"never"},{default:o(()=>{var f;return[e("div",be,[e("div",Be,[e("div",Ee,[Te,e("div",Ie,[!i(d)||i(d)&&i(d).version_no==k.value?(r(),x(u,{key:0,class:"text-[#4C4C4C] w-[78px] h-[32px] !bg-transparent",onClick:M},{default:o(()=>[p("检测更新")]),_:1})):(r(),x(u,{key:1,class:"text-[#4C4C4C] w-[78px] h-[32px]",type:"primary",onClick:G},{default:o(()=>[p("一键升级")]),_:1})),s(u,{class:"text-[#4C4C4C] w-[78px] h-[32px]",type:"primary",onClick:K,loading:(f=y.value)==null?void 0:f.loading},{default:o(()=>[p("云编译")]),_:1},8,["loading"])])]),e("div",Ae,[De,e("span",Fe,m(k.value),1),!i(d)||i(d)&&i(d).version_no==k.value?(r(),C("em",Me,"(当前已是最新版本)")):(r(),C("em",Le,"(最新版本"+m(i(d).version_no)+")",1))])]),e("div",Re,[e("div",He,[e("div",Pe,[Ue,e("span",je,m(_.value.company_name||"--"),1)]),e("div",$e,[e("span",ze,[p("授权域名"),e("em",Ne,m(_.value.site_address||"--"),1)]),e("span",Se,[qe,e("em",Ge,m(_.value.auth_code?v.value?_.value.auth_code:N(_.value.auth_code):"--"),1),v.value?(r(),x(P,{key:1,onClick:t[1]||(t[1]=c=>v.value=!v.value),class:"text-[12px] cursor-pointer"},{default:o(()=>[s(X)]),_:1})):(r(),x(P,{key:0,onClick:t[0]||(t[0]=c=>v.value=!v.value),class:"text-[12px] cursor-pointer"},{default:o(()=>[s(W)]),_:1}))])])]),e("div",Ke,[s(u,{class:"w-[154px] !h-[48px] mt-[8px]",type:"primary",onClick:B},{default:o(()=>[p("授权码认证")]),_:1}),s(Y,{ref_key:"getAuthCodeDialog",ref:A,placement:"bottom-start",width:478,trigger:"click",class:"mt-[8px]"},{reference:o(()=>[s(u,{class:"w-[154px] !h-[48px] mt-[8px] !text-[var(--el-color-primary)] hover:!text-[var(--el-color-primary)] !bg-transparent",plain:"",type:"primary"},{default:o(()=>[p("如何获取授权码?")]),_:1})]),default:o(()=>[e("div",We,[Xe,e("div",Ye,[s(u,{class:"w-[182px] !h-[48px]",plain:"",onClick:H},{default:o(()=>[p("去应用市场逛逛")]),_:1}),s(u,{class:"w-[100px] !h-[48px]",plain:"",onClick:t[2]||(t[2]=c=>A.value.hide())},{default:o(()=>[p("关闭")]),_:1})])])]),_:1},512)]),s(J,{modelValue:h.value,"onUpdate:modelValue":t[6]||(t[6]=c=>h.value=c),title:"授权码认证",width:"400px"},{default:o(()=>[s(Z,{model:g,"label-width":"0",ref_key:"formRef",ref:R,rules:S,class:"page-form"},{default:o(()=>[s(E,{class:"box-card !border-none",shadow:"never"},{default:o(()=>[s(j,{prop:"auth_code"},{default:o(()=>[s(U,{modelValue:g.auth_code,"onUpdate:modelValue":t[3]||(t[3]=c=>g.auth_code=c),modelModifiers:{trim:!0},placeholder:i(n)("authCodePlaceholder"),class:"input-width",clearable:"",size:"large"},null,8,["modelValue","placeholder"])]),_:1}),e("div",Ze,[s(j,{prop:"auth_secret"},{default:o(()=>[s(U,{modelValue:g.auth_secret,"onUpdate:modelValue":t[4]||(t[4]=c=>g.auth_secret=c),modelModifiers:{trim:!0},clearable:"",placeholder:i(n)("authSecretPlaceholder"),class:"input-width",size:"large"},null,8,["modelValue","placeholder"])]),_:1})]),e("div",Je,m(i(n)("authInfoTips")),1),e("div",Oe,[s(u,{type:"primary",class:"w-full",size:"large",loading:w.value,onClick:t[5]||(t[5]=c=>q(R.value))},{default:o(()=>[p(m(i(n)("confirm")),1)]),_:1},8,["loading"])]),e("div",Qe,[s(u,{type:"primary",link:"",onClick:H},{default:o(()=>[p(m(i(n)("notHaveAuth")),1)]),_:1})])]),_:1})]),_:1},8,["model","rules"])]),_:1},8,["modelValue"])])])]}),_:1})),b.value?T("",!0):(r(),x(E,{key:1,class:"box-card !border-none",shadow:"never"},{default:o(()=>[et,s(Q,null,{default:o(()=>[(r(!0),C(ae,null,oe(V.value,(f,c)=>(r(),x(O,{timestamp:f.release_time+" 版本:"+f.version_no,type:"primary",hollow:!0,placement:"top",key:c},{default:o(()=>[f.upgrade_log?(r(),C("div",tt,[e("div",{innerHTML:f.upgrade_log},null,8,at)])):T("",!0)]),_:2},1032,["timestamp"]))),128))]),_:1})]),_:1})),s(ke,{ref_key:"upgradeRef",ref:I},null,512),s(Ce,{ref_key:"cloudBuildRef",ref:y},null,512)])}}});export{bt as default};