mirror of
https://github.com/flucont/btcloud.git
synced 2025-02-02 09:48:13 -05:00
第三方插件支持自动购买
This commit is contained in:
parent
a3eafecde5
commit
9067cb7b3c
13
README.md
13
README.md
@ -24,8 +24,8 @@
|
||||
|
||||
## 部署方法
|
||||
|
||||
- [下载最新版的Release包](https://github.com/flucont/btcloud/releases)
|
||||
- 如果是下载的源码包,需要执行 `composer install --no-dev` 安装依赖,如果是下载的Release包,则不需要
|
||||
- 下载最新的源码包
|
||||
- 执行 `composer install --no-dev` 安装依赖
|
||||
- 设置网站运行目录为`public`
|
||||
- 设置伪静态为`ThinkPHP`
|
||||
- 导入`install.sql`到数据库
|
||||
@ -44,5 +44,14 @@
|
||||
|
||||
- [bt官方更新包修改记录](./wiki/update.md)
|
||||
|
||||
- 宝塔面板官方版与此第三方云端版对比:
|
||||
|
||||
| | 官方版 | 此第三方云端版 |
|
||||
| ---------- | ------------------------------------------------------------ | -------------------------------------------------- |
|
||||
| 版本更新 | 支持 | 支持 |
|
||||
| 面板广告 | 有广告 | 无广告 |
|
||||
| 是否全开源 | 没有全开源 | 全开源 |
|
||||
| 资源占用 | 各种统计上报等任务,资源占用略高 | 去除了很多无用的定时任务,资源占较少 |
|
||||
| 兼容性 | 由于编译的so文件有系统架构限制,兼容的系统仅限已编译的so对应的系统架构 | 由于全开源,没有已编译的so文件,因此无系统架构限制 |
|
||||
|
||||
|
||||
|
@ -130,6 +130,21 @@ class Btapi
|
||||
return $data;
|
||||
}
|
||||
|
||||
//购买第三方插件
|
||||
public function create_plugin_other_order($pid){
|
||||
$url = $this->BT_PANEL.'/auth?action=create_plugin_other_order';
|
||||
|
||||
$p_data = $this->GetKeyData();
|
||||
$p_data['pid'] = $pid;
|
||||
$p_data['cycle'] = '999';
|
||||
$p_data['type'] = '0';
|
||||
|
||||
$result = $this->curl($url,$p_data);
|
||||
|
||||
$data = json_decode($result,true);
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
||||
private function GetKeyData(){
|
||||
$now_time = time();
|
||||
|
@ -81,6 +81,10 @@ class Plugins
|
||||
$plugin_info = Plugins::get_plugin_info($plugin_name);
|
||||
if(!$plugin_info) throw new Exception('未找到该插件信息');
|
||||
if($plugin_info['type'] == 10 && isset($plugin_info['versions'][0]['download'])){
|
||||
if($plugin_info['price'] == 0){
|
||||
$btapi = self::get_btapi();
|
||||
$btapi->create_plugin_other_order($plugin_info['id']);
|
||||
}
|
||||
$fname = $plugin_info['versions'][0]['download'];
|
||||
$filemd5 = $plugin_info['versions'][0]['md5'];
|
||||
Plugins::download_plugin_other($fname, $filemd5);
|
||||
|
@ -34,7 +34,7 @@ td{overflow: hidden;text-overflow: ellipsis;white-space: nowrap;max-width:340px;
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>“版本与状态”一列中,红色的按钮代表本地不存在该版本插件包,需要点击下载;绿色的按钮代表已存在。</p>
|
||||
<p>插件包本地存储路径是/data/plugins/package/软件标识-版本号.zip,对于部分包含二次验证的插件可以自行修改。</p>
|
||||
<p>官方插件包本地存储路径是/data/plugins/package/软件标识-版本号.zip,第三方插件包路径是/data/plugins/other/other/,对于部分包含二次验证的插件可以自行修改。</p>
|
||||
<p>点击【重新获取】按钮会从宝塔官方获取最新插件列表,但是插件包需要手动点击下载。如果需要批量下载插件包,可查看<a href="/admin/set/type/task">定时任务设置</a></p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
|
@ -43,10 +43,17 @@
|
||||
,根据系统执行相应命令开始安装:
|
||||
</div>
|
||||
<div class="install-code">
|
||||
<span class="osname">一键安装脚本</span>
|
||||
<span class="osname">Centos安装脚本</span>
|
||||
<div class="code-cont">
|
||||
<div class="command" title="点击复制一键安装脚本">wget -O install.sh {$siteurl}/install/install_6.0.sh && sh install.sh</div>
|
||||
<span class="ico-copy" title="点击复制一键安装脚本" data-clipboard-text="wget -O install.sh {$siteurl}/install/install_6.0.sh && sh install.sh">复制</span>
|
||||
<div class="command" title="点击复制Centos安装脚本">yum install -y wget && wget -O install.sh {$siteurl}/install/install_6.0.sh && sh install.sh</div>
|
||||
<span class="ico-copy" title="点击复制Centos安装脚本" data-clipboard-text="yum install -y wget && wget -O install.sh {$siteurl}/install/install_6.0.sh && sh install.sh">复制</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="install-code">
|
||||
<span class="osname">Ubuntu/Debian安装脚本</span>
|
||||
<div class="code-cont">
|
||||
<div class="command" title="点击复制Ubuntu/Debian安装脚本">wget -O install.sh {$siteurl}/install/install_6.0.sh && bash install.sh</div>
|
||||
<span class="ico-copy" title="点击复制Ubuntu/Debian安装脚本" data-clipboard-text="wget -O install.sh {$siteurl}/install/install_6.0.sh && bash install.sh">复制</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="install-code">
|
||||
|
Loading…
Reference in New Issue
Block a user