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/store3.js
import{aJ as z,aL as J,r as l,$ as K,g as N}from"./base-lib.js?v=1777008528";import{c as X,k as f,c4 as Y,n as Q,M as I,c5 as U,w as Z,bW as ee,I as te,c6 as ae}from"./utils-lib.js?v=1777008528";import{l as H,m as se,r as ne,q as oe,k as le,s as re,o as R,p as ie}from"./index3.js?v=1777008528";const me=z("SOFTWARE-STORE",()=>{const C=J(),{adHideInfo:P,aliyunEcsLtd:b,payment:E}=X(),d=l(""),h=l(!1),p=l([]),g=l(),c=l([]),r=l([]),w=l(!1),y=l(!1),L=l(0),u=l(!1),_=12;let o=l([]),i=[];const F=e=>"/static/img/soft_ico/ico-".concat(e.replace(/-+[{0-9},\.,]+$/,""),".png"),T=e=>e.status||e.name==="phpmyadmin"?"start":"stop",k=e=>e.status||e.name==="phpmyadmin"?"var(--el-color-primary)":"#FF4949",m=async(e="")=>{if(!u.value){if(Q(e)&&e!==""){u.value=!0;const t=N(()=>{if(!e)return o.value;const a=e.toLowerCase();return i.filter(n=>n.name.toLowerCase().includes(a)||n.ps.toLowerCase().includes(a)||n.title.toLowerCase().includes(a))});o.value=t.value,u.value=!1;return}D(e)}},D=K(async e=>{await f({loading:u,request:H({p:1,type:-1,tojs:"soft.get_list",query:e,force:0,row:100}),data:{"list.data":[Array,o],"list.page":Y(L)},success:t=>{o.value=t["list.data"].filter(a=>a.index_display).concat(t["list.data"].filter(a=>!a.index_display)),i=o.value}})},5e3),q=async(e,t)=>{const a=i.filter(n=>n.index_display).length;if(i.length,o.value.length,a>12&&e.index_display)return e.index_display=!e.index_display,I.error("首页最多只能显示12个软件!");try{const n=e.index_display?se:ne;await f({loading:"正在处理,请稍后...",request:n(e.name),message:!0,success:v=>{v.status&&(o.value=o.value.map(s=>(s.name===s.name&&(s.index_display=s.index_display),s)),i=i.map(s=>(s.name===s.name&&(s.index_display=s.index_display),s)),c.value=i.filter(s=>s.index_display)),S()}})}catch(n){e.index_display=!e.index_display}},A=()=>{C.push({path:"/soft"})},V=(e,t)=>{t(M(e))},M=e=>{const t=e?i.filter(n=>{if(n.title.toLowerCase().includes(e.trim().toLowerCase()))return{value:n.title}}):i;let a=[];return t.forEach((n,v,s)=>{a.push({value:n.title})}),a},O=e=>{const t=e.offsetX,a=e.offsetY,n=g.value.offsetWidth,v=g.value.offsetHeight;if(t<0||a<0||t>=n||a>=v){const s=document.querySelector(".soft-search-popover");s&&(s==null?void 0:s.style.display)!="none"?y.value=!0:(y.value=!1,d.value="")}},W=(e="")=>{d.value==""?(h.value=!1,m()):(h.value=!0,m(d.value))},$=async()=>{await f({loading:w,request:oe(),success:e=>{const t=e.data.filter(a=>a.setup);r.value=t,c.value=t,S(),B()}})},S=()=>{if(c.value.length<=12&&(p.value.length>0&&!(b.value||E.value.authType==="ltd")&&!P.value.homeSoft?r.value=[...c.value,...p.value].slice(0,12):r.value=[...c.value].slice(0,12)),r.value.length<12)for(;r.value.length<12;)r.value.push({})},j=async()=>{let e=Math.ceil(L.value/_),t=Math.ceil(o.value.length/_);if(t>=e)return;const{data:a}=await H({p:t+1,type:-1,tojs:"soft.get_list",force:0,row:12});o.value=o.value.concat(a.list.data)},x=e=>{let t={total:41,monitor:175,btwaf:40,tamper_core:42,bt_security:43,oneav:44,security_notice:56};le({disablePro:e.type!==8,sourceId:t[e.name]||0})},B=()=>{const e=document.querySelector(".soft-wrapper");U.create(e,{animation:500,handle:".soft-move",chosenClass:"ghost",onEnd:async t=>{const a=r.value.splice(t.oldIndex,1)[0];r.value.splice(t.newIndex,0,a),G()}})},G=()=>{let e=r.value.filter(t=>typeof t.id<"u"?t.name:!1).map(t=>t.name).join("|");f({request:re({ssort:e})})};return{popShow:y,isGetSoft:w,pluginKeyword:d,recommendList:p,containerRef:g,mySoftList:o,tableLoading:u,softShowList:r,load:j,createSoftList:S,getHomeInstallSoftData:$,getRecommendInfo:async()=>{await f({request:ae(),success:e=>{var t;Array.isArray(e.data)&&e.data.length>0&&(p.value=((t=e.data[1])==null?void 0:t.list)||[])}})},goSoft:A,showPopoverHandle:m,leave:O,querySearch:V,searchPluginHandle:W,renderSoftImages:F,changeSwitchHandle:q,openSoftView:async e=>(e.endtime>=0||e.price===0?R({name:e.name,pluginInfo:e}):(await Z({title:"购买插件",content:"插件已过期,是否前往购买?"}),x(e)),!1),softStatusColor:k,softStatus:T,openRecommendSoftView:e=>{if(e.name&&!e.install&&!ee(e.isBuy))return R({name:e.name,pluginInfo:e}),!1},openSoftPreLink:e=>{window.open(e.preview,"_blank","noopener,noreferrer")},openLtdPayView:x,openInstall:async e=>{const{data:t}=await te({sName:e.name});if(t.task==="-1")return I.error("当前插件正在安装,不可重复安装");ie({name:t.name,type:"i",pluginInfo:t})}}});export{me as H};