← Back
Editing: index406.js
import{s,c as a,p as e,q as t,v as l,e as i,A as o,y as r,x as n,M as u,C as d,B as m,aW as c,a$ as p,D as f}from"./base-lib.js?v=VERSION_NUMBER";import{u as y}from"./useController5.js?v=VERSION_NUMBER";import{u as v,a3 as g,p as x}from"./utils-lib.js?v=VERSION_NUMBER";import{N as j,O as _}from"./useMethod5.js?v=VERSION_NUMBER";import"./__commonjsHelpers__.js?v=VERSION_NUMBER";import"./site.js?v=VERSION_NUMBER";import"./column.js?v=VERSION_NUMBER";import"./index104.js?v=VERSION_NUMBER";import"./useStore4.js?v=VERSION_NUMBER";import"./useController6.js?v=VERSION_NUMBER";import"./validator.js?v=VERSION_NUMBER";v();const{verifyingData:C,localRow:W}=s(y()),{setVerifyingLoading:b,setReinstallLoading:L}=y(),P=async()=>{var s;C.value.text="",b(!0);try{const{data:s}=await j({s_id:W.value.id});C.value.status=!0,g(s)&&(C.value.text=s.msg)}catch(a){C.value.status=!1,C.value.text=(null==(s=null==a?void 0:a.message)?void 0:s.result)||""}finally{b(!1)}},k=async()=>{await x({title:"重新安装WP",content:"这将重新安装WordPress核心文件而不会丢失站点内容。建议您在重新安装之前备份网站。",onConfirm:async()=>{C.value.text="",L(!0);const s=await _({s_id:W.value.id});g(s)&&(C.value.text=s.msg,C.value.status=!0,L(!1))}})},w={class:"p-[2rem]"},D=["innerHTML"],M={class:"flex justify-center"},h=a({__name:"index",setup(a){const{verifyingData:v,verifyingLoading:g,reinstallLoading:x}=s(y()),{resetVerifyingData:j}=y();return e((()=>{j()})),(s,a)=>{const e=c,y=p,j=f;return t(),l("div",w,[i(e,{type:"info",closable:!1,style:{"margin-bottom":"1.6rem"}},{default:o((()=>a[0]||(a[0]=[r("div",{class:"flex flex-col"},[r("span",null,"如果您怀疑此站点是由恶意软件感染的,请通过从WordPress.org验证其参考校验和来检查WordPress核心文件的完整性。"),r("span",null,"如果校验和不匹配,则可以快速重新安装WordPress核心文件而不影响您的网站内容。")],-1)]))),_:1}),n(v).text?(t(),u(e,{key:0,type:n(v).status?"success":"error","show-icon":"",closable:!1},{default:o((()=>[r("span",{innerHTML:n(v).text},null,8,D)])),_:1},8,["type"])):d("",!0),i(y,{class:"my-[16px]"}),r("div",M,[i(j,{type:"primary",onClick:n(P),loading:n(g)},{default:o((()=>a[1]||(a[1]=[m("验证校验")]))),_:1},8,["onClick","loading"]),i(j,{style:{"margin-left":"7rem"},type:"info",onClick:n(k),loading:n(x)},{default:o((()=>a[2]||(a[2]=[m("重新安装WP")]))),_:1},8,["onClick","loading"])])])}}});export{h as default};
Save File
Cancel