HEX
Server: nginx/1.28.3
System: Linux ip-172-31-12-242 6.17.0-1007-aws #7~24.04.1-Ubuntu SMP Thu Jan 22 21:04:49 UTC 2026 x86_64
User: root (0)
PHP: 7.4.33
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: /www/server/panel/BTPanel/static/js/useController26.js
import{e as n,_ as c,R as P,f as F,c as B,k as L,w as Y}from"./utils-lib.js?v=1777008528";import{r as s,g as k,t as q,e as _,x as S,aW as W}from"./base-lib.js?v=1777008528";import{a as v,r as U,b as H}from"./domain.js?v=1777008528";import{u as N}from"./useStore6.js?v=1777008528";import{h as Q}from"./index3.js?v=1777008528";const{isRegListRefresh:V,domainSearchDialog:C}=N(),l=F(),b=s(""),f=s(""),O=s("wechat"),u=s(null),o=s({domain:"",firstYearPrice:"¥0.00",renewalPrice:"¥0.00",totalPrice:"",years:1,accountBalance:"¥0.00",type:"purchase"}),I=k(()=>o.value.type==="renewal"),d=s(""),i=s({wx:"",ali:""}),g=s(!1),A=s(!1),h=s(null),x=s(!1),R=s(!1),D=s(!1),$=async(e,a="payment")=>{const t=a==="renewal"?"域名续费":"支付订单",r=a==="renewal"?{...e,type:"renewal"}:e,w=await n({title:t,area:54,btn:!1,showFooter:!1,compData:r,component:()=>c(()=>import("./index227.js?v=1777008528"),__vite__mapDeps([]),import.meta.url),onCancel:()=>{p(),b.value="",f.value="",u.value=null,R.value=!1}});u.value=w},ne=async e=>{p();const a=String(e);if(O.value=a,a==="balance"){d.value="";return}const t=a==="wechat"?i.value.wx:i.value.ali;if(t){d.value=t,T();return}g.value=!0,d.value="",await M()},ce=async()=>{var e,a;if(!I.value&&!D.value){l.warn("请先同意协议条款");return}A.value=!0;try{const t=await v({url:"/api/v1/order/buy/buy_payment",order_no:f.value});return t.data.status?(R.value=!0,l.success(t.data.msg||"支付成功!"),V.value=!0,u.value&&((a=(e=u.value.config)==null?void 0:e.globalProperties)!=null&&a.close)&&(C.value&&C.value.close(),u.value.config.globalProperties.close()),!0):(l.error(t.data.msg),!1)}catch(t){}finally{A.value=!1}},G=s("¥0.00"),ie=async()=>{try{const e=await v({url:"/api/v1/order/buy/get_buy"});if(e.data.status){const a=e.data.data.balance||"0.00";G.value="¥".concat((Number(a)/100).toFixed(2))}else l.error(e.data.msg)}catch(e){}},J=async e=>{try{const a=await v({url:"/api/v1/order/renew",domain_list:[{domain:e.domain,year:e.years,domain_service:0}]});return{success:a.data.status,data:a.data.data,message:a.data.msg}}catch(a){return g.value=!1,{success:!1,message:"创建订单失败,请重试"}}finally{g.value=!1}},j=async e=>{g.value=!0;try{const a=e.domain,t=a.lastIndexOf("."),r=await v({url:"/api/v1/order/direct_purchase_domain",domain_name:a.substring(0,t),suffix:e.suffix||(t>0?a.substring(t+1):""),years:e.years});return{success:r.data.status,data:r.data.data,message:r.data.msg}}catch(a){return{success:!1,message:"创建订单失败,请重试"}}finally{g.value=!1}},z=async()=>{var e,a;if(f.value)try{const t=await v({url:"/api/v1/order/payment/status",order_no:f.value});t.data.status?t.data.data.status===1?(p(),R.value=!0,l.success("支付成功!"),V.value=!0,u.value&&((a=(e=u.value.config)==null?void 0:e.globalProperties)!=null&&a.close)&&u.value.config.globalProperties.close()):t.data.data.status===2?(l.warn("订单已取消,请重新操作"),d.value=""):t.data.data.status===3&&(p(),l.error("订单已退款"),d.value=""):(p(),l.error(t.data.msg||"支付失败"),d.value="")}catch(t){}},T=()=>{x.value||h.value||(x.value=!0,h.value=setInterval(()=>{z()},3e3))},p=()=>{h.value&&(clearInterval(h.value),h.value=null),x.value=!1},M=async()=>{try{const e=I.value?await J({domain:o.value.domain,totalPrice:o.value.totalPrice,years:o.value.years,accountBalance:o.value.accountBalance}):await j({domain:o.value.domain,firstYearPrice:o.value.firstYearPrice,totalPrice:o.value.totalPrice,years:o.value.years,accountBalance:o.value.accountBalance,suffix:o.value.suffix});if(e.success){b.value=e.data.order_id,f.value=e.data.order_no||"",o.value.totalPrice=String(e.data.total_price||"0"),i.value.wx=e.data.wx||"",i.value.ali=e.data.ali||"";const a=O.value==="wechat"?i.value.wx:i.value.ali;d.value=a,a&&T()}else l.error(e.message||"获取支付二维码失败")}catch(e){}},ue=async e=>{if(p(),d.value="",b.value="",f.value="",i.value.wx="",i.value.ali="",g.value=!0,o.value.years=e,I.value&&o.value.currentExpiry){const a=new Date(o.value.currentExpiry),t=new Date(a);t.setFullYear(t.getFullYear()+e),o.value.newExpiry=P(t,"yyyy-MM-dd")}await M()},de=async e=>{if(!e){D.value=!1;return}D.value=!1,await n({title:"域名注册注意事项",area:60,btn:["同意并继续"],component:()=>c(()=>import("./agreement-dialog.js?v=1777008528"),__vite__mapDeps([]),import.meta.url),onConfirm:()=>(D.value=!0,!0)})},{isRegListRefresh:E,ipSearchValue:K,domainSearchDialog:X}=N(),{payment:Z}=B(),{bindUser:ee}=q(Z.value);let y={};const me=async e=>{if(!ee.value)return Q(),!1;const a=await n({title:"域名注册",area:60,compData:{domainName:e.value},component:()=>c(()=>import("./index228.js?v=1777008528"),__vite__mapDeps([]),import.meta.url),onCancel:()=>{e.value=""}});X.value={close:()=>{var t,r;a&&((r=(t=a.config)==null?void 0:t.globalProperties)!=null&&r.close)&&a.config.globalProperties.close()}}},ve=e=>{n({title:"修改解析IP",area:50,btn:["修改","取消"],compData:{currentIp:e},component:()=>c(()=>import("./index158.js?v=1777008528"),__vite__mapDeps([]),import.meta.url),onConfirm:()=>{E.value=!0}})},pe=e=>{n({title:"WHOIS查询",area:70,compData:{domainName:e.value},component:()=>c(()=>import("./index229.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)})},fe=()=>({label:"状态",prop:"status",minWidth:100,isCustom:!0,render:e=>{const t={0:{text:"待注册",color:"var(--el-color-info)"},1:{text:"正常",color:"var(--el-color-primary)"},2:{text:"即将到期",color:"var(--el-color-warning)"},3:{text:"已过期",color:"var(--el-color-danger)"},4:{text:"待赎回",color:"var(--el-color-warning)"},5:{text:"注册失败",color:"var(--el-color-danger)"}}[e.status]||{text:"未知",color:"var(--el-color-info)"};return _("span",{style:{color:t.color}},[t.text])}}),ge=()=>({label:"实名状态",prop:"real_name_status",width:100,isCustom:!0,render:e=>{const t={0:{text:"未认证",color:"var(--el-color-warning)"},1:{text:"认证中",color:"var(--el-color-info)"},2:{text:"已认证",color:"var(--el-color-primary)"},3:{text:"认证失败",color:"var(--el-color-danger)"}}[e.real_name_status]||{text:"未知",color:"var(--el-color-info)"};return _("span",{style:{color:t.color}},[t.text])}}),ye=()=>({label:"宝塔DNS",prop:"ns_status",minWidth:100,isCustom:!0,render:e=>{const a=e.ns_status===0,t=a?"var(--el-color-error)":"var(--el-color-primary)";return a?_(W,{placement:"top"},{default:()=>_("span",{style:{color:t,cursor:"pointer"},onClick:()=>{window.open("https://www.bt.cn/domain/domain-resolve","_blank")}},[S("未生效")]),content:()=>"该域名需前往后台设置"}):_("span",{style:{color:t}},[S("已生效")])}}),_e=e=>{n({title:e.full_domain,area:120,compData:{domain:e.full_domain,domainId:e.id},component:()=>c(()=>import("./index230.js?v=1777008528").then(a=>a.i),__vite__mapDeps([]),import.meta.url)})},he=e=>{const a=(t,r)=>{const w=new Date(t*1e3),m=new Date(w);return m.setFullYear(m.getFullYear()+r),P(m,"yyyy-MM-dd")};$({domain:e.full_domain,years:1,currentExpiry:P(e.expire_time,"yyyy-MM-dd"),newExpiry:a(e.expire_time,1),type:"renewal"},"renewal")},we=e=>{n({title:"实名信息详情",area:50,showFooter:!1,compData:{domainId:e.id,domain:e.full_domain},component:()=>c(()=>import("./index231.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)})},De=async e=>{await Y({title:"删除域名【"+e.full_domain+"】",content:"即将删除域名【"+e.full_domain+"】,是否继续操作?",icon:"warning",onConfirm:()=>{const a={url:"/api/v1/domain/manage/delete_domain",id:e.id};L({loading:"正在删除域名,请稍后...",request:v(a),message:!0,success:()=>{E.value=!0}})}})},Pe=e=>{n({title:"域名【"+e.full_domain+"】选择实名模板",area:50,btn:"提交认证",compData:{domainName:e.full_domain,domainId:e.id},component:()=>c(()=>import("./index232.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)})},xe=e=>{n({title:"创建网站 - 【"+e.full_domain+"】",area:80,btn:["创建","取消"],showFooter:!0,compData:{domainId:e.id,domainName:e.full_domain,type:"domain"},component:()=>c(()=>import("./index157.js?v=1777008528").then(a=>a.i),__vite__mapDeps([]),import.meta.url)})},be=async e=>{const a=JSON.stringify(e),t=Date.now();try{const r={url:"/api/v1/domain/manage/list",p:e.p||1,rows:e.limit||30,keyword:e.search||""},m=(await v(r)).data.data;return y[a]={data:{data:m.data||[],total:m.count||0,other:{search_history:m.search_history||[]}},timestamp:t},y[a].data}catch(r){return r.message==="canceled"&&y[a]&&t-y[a].timestamp<100?y[a].data:{data:[],total:0}}},ae=async()=>{try{const e=await H();return e.data.status?e.data.data:""}catch(e){return""}},Ie=async()=>{try{const e=await ae();K.value=e}catch(e){}},Re=async()=>{await L({loading:"正在刷新本地缓存,请稍后...",request:U(),message:!0,success:()=>{E.value=!0}})};export{M as A,p as B,d as C,b as D,i as E,D as F,I as G,ne as H,de as I,$ as J,pe as a,ve as b,ye as c,ge as d,De as e,_e as f,be as g,me as h,he as i,we as j,Pe as k,Ie as l,o as m,G as n,xe as o,ce as p,f as q,Re as r,O as s,A as t,fe as u,u as v,ue as w,R as x,g as y,ie as z};
function __vite__mapDeps(indexes) {
  if (!__vite__mapDeps.viteFileDeps) {
    __vite__mapDeps.viteFileDeps = []
  }
  return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
}