diff --git a/README.md b/README.md index a65b172..0433468 100644 --- a/README.md +++ b/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文件,因此无系统架构限制 | + + diff --git a/app/lib/Btapi.php b/app/lib/Btapi.php index b429d58..360c4b7 100644 --- a/app/lib/Btapi.php +++ b/app/lib/Btapi.php @@ -129,6 +129,21 @@ class Btapi $data = json_decode($result,true); 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(){ diff --git a/app/lib/Plugins.php b/app/lib/Plugins.php index f51d04b..dacdb8e 100644 --- a/app/lib/Plugins.php +++ b/app/lib/Plugins.php @@ -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); diff --git a/app/view/admin/plugins.html b/app/view/admin/plugins.html index c0899ae..84e30ed 100644 --- a/app/view/admin/plugins.html +++ b/app/view/admin/plugins.html @@ -34,7 +34,7 @@ td{overflow: hidden;text-overflow: ellipsis;white-space: nowrap;max-width:340px;
- 一键安装脚本 + Centos安装脚本
-
wget -O install.sh {$siteurl}/install/install_6.0.sh && sh install.sh
- 复制 +
yum install -y wget && wget -O install.sh {$siteurl}/install/install_6.0.sh && sh install.sh
+ 复制 +
+
+
+ Ubuntu/Debian安装脚本 +
+
wget -O install.sh {$siteurl}/install/install_6.0.sh && bash install.sh
+ 复制