File: /www/wwwroot/www.213n.cn/wp-content/themes/rk-blogger/wbc/settings/assets/Env-nEq56lE6.js
import{_ as l,r as t,o as n,b as e,c as s,w as a,d as o,t as r,i,F as u,j as d,g as c,f as p,h as m,A as h,q as f}from"./wbs-B6MCNH29.js";import{v as b}from"./el-loading-C_URt9Q3.js";import{E as _}from"./index-oRN0N-gp.js";import{E as y}from"./index-BfyIpsK4.js";const v={name:"env",setup(){const l=t(),e=t(!1),s=t(""),a=t("");return n((()=>{h.getData({action:"wb_setting_ajax",do:"get_env_info"}).then((t=>{l.value=t.data,e.value=!0})),h.getData({action:"wb_setting_ajax",do:"chk_ver"}).then((l=>{l&&(s.value=l)}))})),{info:l,newVer:s,isLoaded:e,createSystemInfo:()=>{let l=[];const t=document.querySelectorAll("#wbs-group-version .sc-version");Array.prototype.forEach.call(t,(t=>{const n=t.querySelector(".data-sc-title span").innerHTML.trim();l.push("======="+n+"=========");const e=t.querySelectorAll("tbody tr");Array.prototype.forEach.call(e,(t=>{l.push(t.querySelector("th").innerText.trim()+": "+t.querySelector("td").innerText.trim())}))})),a.value=l.join("\n");const n=`<textarea style="width:100%;box-sizing:border-box;height:300px;padding:10px;" id="sys_info_textarea">${a.value}</textarea><div class="description mt">可复制粘贴生成的系统报告至工单,以帮助技术人员快速定位解决问题。</div>`;_.alert(n,"系统报告",{dangerouslyUseHTMLString:!0,confirmButtonText:"复制",callback:l=>{document.querySelector("#sys_info_textarea").select(),document.execCommand("Copy"),y({type:"success",message:"已复制",position:"center"})}})}}}},w={class:"wbs-content base-env"},x={class:"wbs-content-inner"},g={class:"wbs-main",id:"wbs-group-version"},P={class:"sc-body sc-version"},k=o("h3",{class:"data-sc-title"},[o("span",null,"主题版本")],-1),L={key:0,class:"wbs-data-table"},S=o("th",{class:"w8em"},"主题名称",-1),j=o("th",null,"当前版本",-1),q=o("th",null,"最新版本",-1),H={key:0},M={key:1},W={class:"sc-body sc-version"},z=o("h3",{class:"data-sc-title"},[o("span",null,"WordPress环境")],-1),A={key:0,class:"wbs-data-table"},D=o("th",{class:"w8em"},"网站首页",-1),T=o("th",null,"WP内容路径",-1),V=o("th",null,"WP安装路径",-1),C=o("th",null,"WP版本信息",-1),E=o("th",null,"PHP内存限制",-1),I=o("th",null,"WP调试模式",-1),G=o("th",null,"语言版本",-1),R={class:"sc-body sc-version"},U=o("h3",{class:"data-sc-title"},[o("span",null,"服务器环境")],-1),B={key:0,class:"wbs-data-table"},F=o("th",{class:"w8em"},"服务器信息",-1),O=o("th",null,"PHP版本",-1),Q=o("th",null,"PHP Post Max Size",-1),Z=o("th",null,"PHP Time Limit",-1),$=o("th",null,"PHP Max Input Vars",-1),J=o("th",null,"ZipArchive",-1),K=o("th",null,"MySQL Version",-1),N=o("th",null,"Max Upload Size",-1),X=o("th",null,"DOMDocument",-1),Y=o("th",null,"WP Remote Get",-1),ll=o("th",null,"WP Remote Post",-1),tl=o("th",null,"GD Library",-1),nl={class:"sc-body sc-version"},el=o("h3",{class:"data-sc-title"},[o("span",null,"激活插件")],-1),sl={key:0,class:"wbs-data-table"},al={class:"w8em"},ol={key:0,class:"wbs-footer"},rl={class:"wbsf-inner"};const il=l(v,[["render",function(l,t,n,h,_,y){const v=f,il=b;return e(),s("div",w,[a((e(),s("div",x,[o("div",g,[o("div",P,[k,h.isLoaded?(e(),s("table",L,[o("tbody",null,[o("tr",null,[S,o("td",null,r(h.info.pd_name),1)]),o("tr",null,[j,o("td",null,r(h.info.current_ver),1)]),o("tr",null,[q,o("td",null,[h.newVer?i("",!0):(e(),s("span",H,r(h.info.current_ver),1)),h.newVer?(e(),s("span",M,r(h.newVer),1)):i("",!0)])])])])):i("",!0)]),o("div",W,[z,h.isLoaded?(e(),s("table",A,[o("tbody",null,[o("tr",null,[D,o("td",null,r(h.info.home_url),1)]),o("tr",null,[T,o("td",null,r(h.info.wp_content_dir),1)]),o("tr",null,[V,o("td",null,r(h.info.abspath),1)]),o("tr",null,[C,o("td",null,r(h.info.wp_version),1)]),o("tr",null,[E,o("td",null,r(h.info.memory),1)]),o("tr",null,[I,o("td",null,r(h.info.wp_debug),1)]),o("tr",null,[G,o("td",null,r(h.info.wp_locale),1)])])])):i("",!0)]),o("div",R,[U,h.isLoaded?(e(),s("table",B,[o("tbody",null,[o("tr",null,[F,o("td",null,r(h.info.server_software),1)]),o("tr",null,[O,o("td",null,r(h.info.php_version),1)]),o("tr",null,[Q,o("td",null,r(h.info.post_max_size),1)]),o("tr",null,[Z,o("td",null,r(h.info.max_execution_time)+"s",1)]),o("tr",null,[$,o("td",null,r(h.info.max_input_vars),1)]),o("tr",null,[J,o("td",null,r(h.info.zip_archive),1)]),o("tr",null,[K,o("td",null,r(h.info.db_version),1)]),o("tr",null,[N,o("td",null,r(h.info.wp_max_upload_size),1)]),o("tr",null,[X,o("td",null,r(h.info.dom_document),1)]),o("tr",null,[Y,o("td",null,r(h.info.wp_remote_get),1)]),o("tr",null,[ll,o("td",null,r(h.info.wp_remote_post),1)]),o("tr",null,[tl,o("td",null,r(h.info.gd_info),1)])])])):i("",!0)]),o("div",nl,[el,h.isLoaded?(e(),s("table",sl,[o("tbody",null,[(e(!0),s(u,null,d(h.info.active_plugins,((l,t)=>(e(),s("tr",{key:t},[o("th",al,r(l.name),1),o("td",null,"Develop by "+r(l.author),1)])))),128))])])):i("",!0)])]),h.isLoaded?(e(),s("div",ol,[o("div",rl,[c(v,{type:"primary",onClick:h.createSystemInfo},{default:p((()=>[m("生成系统报告")])),_:1},8,["onClick"])])])):i("",!0)])),[[il,!h.isLoaded]])])}]]);export{il as default};