mirror of https://github.com/allinssl/allinssl
2 lines
18 KiB
JavaScript
2 lines
18 KiB
JavaScript
import{d as e,_ as t,a0 as r,a1 as s,e as i,s as a,r as l,l as c,c as o,k as n,$ as d,m as p,y as m,z as u,a8 as f,b as v,B as x,i as y,a9 as g,a2 as b}from"./main-DxBfl9jt.js";import{u as _,b as h}from"./index-BVkzzSq5.js";import{N as w,q as S}from"./business-C202VbCi.js";import{f as L}from"./useStore-mdB8rUuJ.js";import{D as V}from"./index-D5T2yn7L.js";import{N as j}from"./Badge-OF6OsFUO.js";import{L as O}from"./LockOutlined-BCjG8oog.js";import{N as P,a as T}from"./Tabs-CkP-uPYz.js";import"./test-BCfkrViE.js";import"./useStore-Bl1aO3ff.js";import"./setting-BC6rRJcQ.js";import"./index-CR_r3eNz.js";import"./index-Cw7KyqX3.js";import"./index-BVih7gfm.js";import"./text-B4Jj_E15.js";import"./throttle-CAtYuFBS.js";const k={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 1024 1024"},E=e({name:"ShoppingCartOutlined",render:function(e,i){return r(),t("svg",k,i[0]||(i[0]=[s("path",{d:"M922.9 701.9H327.4l29.9-60.9l496.8-.9c16.8 0 31.2-12 34.2-28.6l68.8-385.1c1.8-10.1-.9-20.5-7.5-28.4a34.99 34.99 0 0 0-26.6-12.5l-632-2.1l-5.4-25.4c-3.4-16.2-18-28-34.6-28H96.5a35.3 35.3 0 1 0 0 70.6h125.9L246 312.8l58.1 281.3l-74.8 122.1a34.96 34.96 0 0 0-3 36.8c6 11.9 18.1 19.4 31.5 19.4h62.8a102.43 102.43 0 0 0-20.6 61.7c0 56.6 46 102.6 102.6 102.6s102.6-46 102.6-102.6c0-22.3-7.4-44-20.6-61.7h161.1a102.43 102.43 0 0 0-20.6 61.7c0 56.6 46 102.6 102.6 102.6s102.6-46 102.6-102.6c0-22.3-7.4-44-20.6-61.7H923c19.4 0 35.3-15.8 35.3-35.3a35.42 35.42 0 0 0-35.4-35.2zM305.7 253l575.8 1.9l-56.4 315.8l-452.3.8L305.7 253zm96.9 612.7c-17.4 0-31.6-14.2-31.6-31.6c0-17.4 14.2-31.6 31.6-31.6s31.6 14.2 31.6 31.6a31.6 31.6 0 0 1-31.6 31.6zm325.1 0c-17.4 0-31.6-14.2-31.6-31.6c0-17.4 14.2-31.6 31.6-31.6s31.6 14.2 31.6 31.6a31.6 31.6 0 0 1-31.6 31.6z",fill:"currentColor"},null,-1)]))}}),C=i("cert-apply-store",(()=>{const e=l("证书申请"),t=l("commercial"),r=l("dv"),s=l([{key:"commercial",title:"商业证书",desc:"品牌SSL证书,安全保障,全球兼容"},{key:"free",title:"免费证书",desc:"适用于个人博客、测试环境的免费SSL证书"}]),i=l({dv:"域名型(DV)",ov:"企业型(OV)",ev:"增强型(EV)"}),a=l([{type:"dv",title:"个人(DV 证书)",explain:"个人博客、个人项目等<br>可选择DV SSL证书。"},{type:"ov",title:"传统行业(OV 证书)",explain:"企业官网、电商、教育、医疗、公共<br>部门等,可选择OV SSL证书。"},{type:"ev",title:"金融机构(EV 证书)",explain:"银行、金融、保险、电子商务、中大型企<br>业、政府机关等,可选择EV SSL证书。"}]),o=l({dv:{title:"域名型SSL证书 (DV SSL)",features:["适用场景: 个人网站、博客、论坛等","验证方式: 仅验证域名所有权","签发时间: 最快5分钟","安全级别: 基础级"],advantages:"优势: 价格低廉,签发速度快,适合个人使用",disadvantages:"劣势: 仅显示锁形图标,不显示企业信息",recommendation:"推荐指数: ★★★☆☆"},ov:{title:"企业型SSL证书 (OV SSL)",features:["适用场景: 企业官网、电商网站、教育医疗网站等","验证方式: 验证域名所有权和企业真实性","签发时间: 1-3个工作日","安全级别: 中级"],advantages:"优势: 兼顾安全和价格,适合一般企业使用",disadvantages:"劣势: 签发时间较DV长",recommendation:"推荐指数: ★★★★☆"},ev:{title:"增强型SSL证书 (EV SSL)",features:["适用场景: 银行、金融机构、政府网站、大型企业","验证方式: 最严格的身份验证流程","签发时间: 5-7个工作日","安全级别: 最高级"],advantages:"优势: 提供最高级别安全认证,浏览器地址栏显示企业名称",disadvantages:"劣势: 价格较高,签发时间最长",recommendation:"推荐指数: ★★★★★"}}),n=l({dv:[{pid:8001,brand:"Positive",type:"域名型(DV)",add_price:0,other_price:398,title:"PositiveSSL 单域名SSL证书",code:"comodo-positivessl",num:1,price:159,discount:1,state:1,install_price:150,src_price:159},{pid:8002,brand:"Positive",type:"域名型(DV)",add_price:98,other_price:1194,title:"PositiveSSL 多域名SSL证书",code:"comodo-positive-multi-domain",num:3,price:589,discount:1,state:1,install_price:200,src_price:589},{pid:8008,brand:"Positive",type:"域名型(DV)",add_price:0,other_price:2100,title:"PositiveSSL 通配符SSL证书",code:"comodo-positivessl-wildcard",num:1,price:1289,discount:1,state:1,install_price:200,src_price:1289},{pid:8009,brand:"Positive",type:"域名型(DV)",add_price:880,other_price:4500,title:"PositiveSSL 多域名通配符SSL证书",code:"comodo-positive-multi-domain-wildcard",num:2,price:3789,discount:1,state:1,install_price:200,src_price:3789}],ov:[{pid:8303,brand:"Sectigo",type:"企业型(OV)",add_price:0,other_price:1880,title:"Sectigo OV SSL证书",code:"sectigo-ov",num:1,price:1388,discount:1,state:1,install_price:500,src_price:1388},{pid:8304,brand:"Sectigo",type:"企业型(OV)",add_price:880,other_price:5640,title:"Sectigo OV多域名SSL证书",code:"sectigo-ov-multi-san",num:3,price:3888,discount:1,state:1,install_price:500,src_price:3888},{pid:8305,brand:"Sectigo",type:"企业型(OV)",add_price:0,other_price:6980,title:"Sectigo OV通配符SSL证书",code:"sectigo-ov-wildcard",num:1,price:4888,discount:1,state:1,install_price:500,src_price:4888},{pid:8307,brand:"Sectigo",type:"企业型(OV)",add_price:3680,other_price:2094,title:"Sectigo OV多域名通配符SSL证书",code:"comodo-multi-domain-wildcard-certificate",num:3,price:15888,discount:1,state:1,install_price:500,src_price:15888}],ev:[{pid:8300,brand:"Sectigo",type:"企业增强型(EV)",add_price:0,other_price:3400,title:"Sectigo EV SSL证书",code:"comodo-ev-ssl-certificate",num:1,price:2788,discount:1,state:1,install_price:500,src_price:2788},{pid:8302,brand:"Sectigo",type:"企业增强型(EV)",add_price:1488,other_price:10200,title:"Sectigo EV多域名SSL证书",code:"comodo-ev-multi-domin-ssl",num:3,price:8388,discount:1,state:1,install_price:500,src_price:8388},{pid:8520,brand:"锐安信",type:"企业增强型(EV)",add_price:0,other_price:3480,title:"锐安信EV SSL证书",code:"ssltrus-ev-ssl",num:1,price:2688,discount:1,state:1,install_price:500,src_price:2688},{pid:8521,brand:"锐安信",type:"企业增强型(EV)",add_price:2380,other_price:10440,title:"锐安信EV多域名SSL证书",code:"ssltrus-ev-multi",num:3,price:9096,discount:1,state:1,install_price:500,src_price:9096}]}),d=l([{pid:9001,brand:"Let's Encrypt",type:"域名型(DV)",title:"Let's Encrypt 单域名SSL证书",code:"letsencrypt-single",num:1,valid_days:90,features:["90天有效期","自动续期","单域名","全球认可"]}]),p=c((()=>"commercial"===t.value&&n.value[r.value]||[]));return{test:e,handleTest:()=>{e.value="点击了证书申请"},activeMainTab:t,activeTab:r,mainTabOptions:s,typeOptions:i,sslTypeList:a,sslTypeDescriptions:o,products:n,freeProducts:d,filteredProducts:p}})),D=e({name:"CertificateForm",setup(){const{component:e}=q();return()=>o(e,{labelPlacement:"top",class:"max-w-[50rem] mx-auto"},null)}}),{handleError:z}=_(),B=()=>{const{test:e,handleTest:t,activeMainTab:r,activeTab:s,mainTabOptions:i,typeOptions:l,sslTypeList:c,sslTypeDescriptions:o,freeProducts:p,filteredProducts:m}=(()=>{const e=C();return{...e,...a(e)}})();return{test:e,handleTest:t,activeMainTab:r,activeTab:s,mainTabOptions:i,typeOptions:l,sslTypeList:c,sslTypeDescriptions:o,freeProducts:p,filteredProducts:m,handleBuyProduct:()=>{window.open("https://www.bt.cn/new/ssl.html","_blank")},handleOpenApplyModal:()=>{n({title:d("申请免费证书 - Let's Encrypt"),area:"500px",component:D,footer:!0})},formatPrice:e=>Math.floor(e).toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}},q=()=>{const{useFormInput:e}=p(),{addNewWorkflow:t}=L(),{open:r,close:s}=h({text:d("t_6_1746667592831")}),{confirm:i}=u(),a=l({domains:"",provider_id:"",provider:""}),n=c((()=>[e(d("t_17_1745227838561"),"domains"),{type:"custom",render:()=>o(V,{type:"dns",path:"provider_id",value:a.value.provider_id,"onUpdate:value":e=>{a.value.provider_id=e.value,a.value.provider=e.type}},null)}])),f={domains:{required:!0,message:d("t_7_1746667592468"),trigger:"input",validator:(e,t,r)=>{w(t)||S(t)?r():r(new Error(d("t_7_1746667592468")))}},provider_id:{required:!0,message:d("t_8_1746667591924"),trigger:"change",type:"string"}},{component:v,fetch:x}=m({config:n,defaultValue:a,request:async()=>{try{await t({name:`申请免费证书-Let's Encrypt(${a.value.domains})`,exec_type:"manual",active:"1",content:JSON.stringify({id:"start-1",name:"开始",type:"start",config:{exec_type:"manual"},childNode:{id:"apply-1",name:"申请证书",type:"apply",config:{...a.value,email:"test@test.com",end_day:30}}})})}catch(e){z(e)}},rules:f});return i((async e=>{try{r(),await x(),e()}catch(t){return z(t)}finally{s()}})),{component:v}},M=e({name:"ProductCard",props:{product:{type:Object,required:!0},formatPrice:{type:Function,required:!0},onBuy:{type:Function,required:!0}},setup(e){c((()=>{const t=e.product.title.toLowerCase();return t.includes("通配符")&&t.includes("多域名")?"多域名通配符":t.includes("通配符")?"通配符":t.includes("多域名")?"多域名":"单域名"}));const t=c((()=>e.product.title.toLowerCase().includes("通配符"))),r=c((()=>e.product.title.toLowerCase().includes("多域名"))),s=()=>{e.onBuy(e.product.pid)},i=e=>{const t=e.toLowerCase();return t.includes("sectigo")?"/static/icons/sectigo-ico.png":t.includes("positive")?"/static/icons/positive-ico.png":t.includes("锐安信")?"/static/icons/ssltrus-ico.png":t.includes("let's encrypt")?"/static/icons/letsencrypt-icon.svg":void 0};return()=>o("div",{class:"relative border border-gray-200 rounded-[0.8rem] p-[2rem] transition-all duration-300 h-full flex flex-col bg-white shadow-sm hover:shadow-md hover:border-blue-100 hover:-translate-y-[0.2rem]"},[e.product.discount<1&&o("div",{class:"absolute top-[1.2rem] right-[1.2rem] z-10"},[o(j,{type:"success",value:"推荐"},null)]),o("div",{class:"flex flex-col items-center text-center mb-[2rem] pb-[1.6rem] border-b border-gray-100"},[o("div",{class:"flex-none h-[6rem] w-2/5 mb-[1.2rem] flex items-center justify-center"},[o(f,{width:"100%",src:i(e.product.brand),fallbackSrc:"/static/icons/default.png",alt:e.product.brand},null)]),o("div",{class:"flex-1 w-full"},[o("h3",{class:"font-semibold mb-[0.8rem] text-gray-800 leading-tight"},[e.product.title]),o("p",{class:"text-[1.3rem] text-gray-500 m-0 leading-relaxed px-[0.8rem]"},[e.product.brand,v("是知名的证书颁发机构,提供高质量的SSL证书解决方案。")])])]),o("div",{class:"flex-1 flex flex-col mt-0"},[o("div",{class:"text-[1.3rem] mb-[2.4rem] flex-1 text-left"},[o("div",{class:"flex mb-[1rem] leading-relaxed"},[o("span",{class:"font-medium text-gray-500 flex-none w-[9rem]"},[v("支持域名数:")]),o("span",{class:"flex-1 text-gray-700"},[e.product.num,v("个")])]),o("div",{class:"flex mb-[1rem] leading-relaxed"},[o("span",{class:"font-medium text-gray-500 flex-none w-[9rem]"},[v("支持通配符:")]),o("span",{class:"flex-1 text-gray-700"},[t.value?"支持":"不支持"])]),o("div",{class:"flex mb-[1rem] leading-relaxed"},[o("span",{class:"font-medium text-gray-500 flex-none w-[9rem]"},[v("绿色地址栏:")]),o("span",{class:"flex-1 text-gray-700"},[e.product.type.includes("EV")?"显示":"不显示"])]),o("div",{class:"flex mb-[1rem] leading-relaxed"},[o("span",{class:"font-medium text-gray-500 flex-none w-[9rem]"},[v("支持小程序:")]),o("span",{class:"flex-1 text-gray-700"},[v("支持")])]),o("div",{class:"flex mb-[1rem] leading-relaxed whitespace-nowrap overflow-hidden text-ellipsis text-gray-500"},[o("span",{class:"font-medium text-gray-500 flex-none w-[9rem]"},[v("适用网站:")]),o("span",{class:"flex-1 text-gray-600 whitespace-nowrap overflow-hidden text-ellipsis"},[t.value?r.value?"*.bt.cn、*.btnode.cn":"*.bt.cn":r.value?"bt.cn、btnode.cn":"www.bt.cn、bt.cn"])])]),o("div",{class:"flex justify-between items-center mt-[1.6rem] pt-[1.6rem] border-t border-gray-100"},[o("div",{class:"flex-1 flex flex-col"},[o("div",{class:"flex items-baseline justify-start"},[o("span",{class:"text-[2.2rem] font-bold text-red-500 leading-tight"},[e.formatPrice(e.product.price)]),o("span",{class:"text-[1.3rem] text-gray-400 ml-[0.4rem]"},[v("元/年")])]),o("div",{class:"text-[1.3rem] text-gray-400 line-through mt-[0.4rem]"},[v("原价 "),e.formatPrice(e.product.other_price),v("元/年")])]),o(x,{type:"primary",class:"flex-none transition-all duration-300 min-w-[9rem] hover:scale-105 hover:shadow-md",onClick:s,strong:!0,round:!0},{default:()=>[v("立即查看")]})])])])}});const F=e({name:"FreeProductCard",props:{product:{type:Object,required:!0},onApply:{type:Function,required:!0}},setup(e){const t=c((()=>e.product.title.toLowerCase().includes(d("t_10_1746667589575")))),r=c((()=>e.product.title.toLowerCase().includes(d("t_11_1746667589598")))),s=()=>{e.onApply(e.product.pid)},i=e=>{const t=e.toLowerCase(),r={sectigo:"/static/icons/sectigo-ico.png",positive:"/static/icons/positive-ico.png",ssltrus:"/static/icons/ssltrus-ico.png","let's encrypt":"/static/icons/letsencrypt-icon.svg"};return Object.keys(r).find((e=>t.includes(e)))?r[Object.keys(r).find((e=>t.includes(e)))]:void 0};return()=>{let a;return o("div",{class:"relative border border-gray-200 rounded-[0.8rem] p-[2rem] transition-all duration-300 h-full flex flex-col bg-white shadow-sm hover:shadow-md hover:border-blue-100 hover:-translate-y-[0.2rem]"},["Let's Encrypt"===e.product.brand&&o("div",{class:"absolute top-[1.2rem] right-[1.2rem] z-10"},[o(j,{type:"info",value:d("t_12_1746667589733")},null)]),o("div",{class:"flex flex-col items-center text-center mb-[2rem] pb-[1.6rem] border-b border-gray-100"},[o("div",{class:"flex-none h-[6rem] w-2/5 mb-[1.2rem] flex items-center justify-center"},[o(f,{src:i(e.product.brand),fallbackSrc:"/static/icons/default.png",alt:e.product.brand},null)]),o("div",{class:"flex-1 w-full"},[o("h3",{class:"font-semibold mb-[0.8rem] text-gray-800 leading-tight"},[e.product.title]),o("p",{class:"text-[1.3rem] text-gray-500 m-0 leading-relaxed px-[0.8rem]"},[e.product.brand+d("t_13_1746667599218")])])]),o("div",{class:"flex-1 flex flex-col mt-0"},[o("div",{class:"text-[1.3rem] mb-[2.4rem] flex-1 text-left"},[o("div",{class:"flex mb-[1rem] leading-relaxed"},[o("span",{class:"font-medium text-gray-500 flex-none w-[9rem]"},[d("t_14_1746667590827")]),o("span",{class:"flex-1 text-gray-700"},[e.product.num+d("t_15_1746667588493")])]),o("div",{class:"flex mb-[1rem] leading-relaxed"},[o("span",{class:"font-medium text-gray-500 flex-none w-[9rem]"},[d("t_16_1746667591069")]),o("span",{class:"flex-1 text-gray-700"},[d("t_17_1746667588785")])]),o("div",{class:"flex mb-[1rem] leading-relaxed"},[o("span",{class:"font-medium text-gray-500 flex-none w-[9rem]"},[d("t_19_1746667589295")]),o("span",{class:"flex-1 text-gray-700"},[e.product.valid_days+d("t_20_1746667588453")])]),o("div",{class:"flex mb-[1rem] leading-relaxed"},[o("span",{class:"font-medium text-gray-500 flex-none w-[9rem]"},[d("t_21_1746667590834")]),o("span",{class:"flex-1 text-gray-700"},[d("t_17_1746667588785")])]),o("div",{class:"flex mb-[1rem] leading-relaxed whitespace-nowrap overflow-hidden text-ellipsis text-gray-500"},[o("span",{class:"font-medium text-gray-500 flex-none w-[9rem]"},[d("t_22_1746667591024")]),o("span",{class:"flex-1 text-gray-600 whitespace-nowrap overflow-hidden text-ellipsis"},[t.value?r.value?d("t_23_1746667591989"):d("t_24_1746667583520"):r.value?d("t_25_1746667590147"):d("t_26_1746667594662")])])]),o("div",{class:"flex justify-between items-center mt-[1.6rem] pt-[1.6rem] border-t border-gray-100"},[o("div",{class:"flex-1 flex flex-col"},[o("div",{class:"flex items-baseline justify-start"},[o("span",{class:"text-[2.2rem] font-bold text-green-500 leading-tight"},[d("t_27_1746667589350")])])]),o(x,{type:"primary",class:"flex-none transition-all duration-300 min-w-[9rem] hover:scale-105 hover:shadow-md",onClick:s,strong:!0,round:!0},(l=a=d("t_28_1746667590336"),"function"==typeof l||"[object Object]"===Object.prototype.toString.call(l)&&!y(l)?a:{default:()=>[a]}))])])]);var l}}});function A(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!y(e)}const N=e({setup(){const{activeMainTab:e,activeTab:t,mainTabOptions:r,sslTypeList:s,freeProducts:i,filteredProducts:a,handleBuyProduct:l,formatPrice:c,handleOpenApplyModal:n}=B();return()=>{let d;return o("div",{class:"w-full max-w-[160rem] mx-auto p-[2rem]"},[o("div",{class:"bg-white rounded-[0.8rem] shadow-lg p-[2.4rem] mb-[3rem]"},[o(P,{class:"rounded-[1.2rem] p-[0.6rem]",type:"segment",value:e.value,"onUpdate:value":t=>e.value=t,size:"large",justifyContent:"space-evenly"},A(d=r.value.map((r=>o(T,{key:r.key,name:r.key},{tab:()=>o("div",{class:"flex items-center my-[1rem] px-[0.8rem] py-[0.4rem] rounded-[0.8rem] transition-all duration-300 hover:bg-black/5 "},[o(b,{size:"20"},{default:()=>["commercial"===r.key?o(E,null,null):o(O,null,null)]}),o("span",{class:"ml-[0.8rem]"},[r.title])]),default:()=>{let r;return o("div",{class:"py-[0.4rem] rounded-[1.6rem]"},["commercial"===e.value&&o(P,{class:"w-full p-0 mt-[1.6rem] rounded-[0.8rem] overflow-hidden",type:"line",value:t.value,"onUpdate:value":e=>t.value=e,size:"medium",justifyContent:"space-evenly"},A(r=s.value.map((e=>o(T,{key:e.type,name:e.type,tab:e.title},{default:()=>[o("div",{class:"flex flex-col gap-[2.4rem] mt-[1rem]"},[a.value.length>0?o("div",{class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6"},[a.value.map((e=>o(M,{key:e.pid,product:e,formatPrice:c,onBuy:l},null)))]):o(g,{description:"暂无产品"},null)])]}))))?r:{default:()=>[r]}),"free"===e.value&&o("div",{class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6"},[i.value.map((e=>o(F,{key:e.pid,product:e,onApply:n},null)))])])}}))))?d:{default:()=>[d]})])])}}});export{N as default};
|