diff --git a/app/controller/PluginController.php b/app/controller/PluginController.php index f5e85ae..9f20e80 100644 --- a/app/controller/PluginController.php +++ b/app/controller/PluginController.php @@ -6,11 +6,144 @@ namespace app\controller; use app\BaseController; use think\facade\View; +use think\Request; class PluginController extends BaseController { + // 插件管理页 public function index() { return View::fetch(); } + /** + * 列表 + * @param Request $request + * @return Response + * @throws GuzzleException + */ + public function list(Request $request) {} + + /** + * 安装 + * @param Request $request + * @return Response + * @throws GuzzleException|BusinessException + */ + public function install(Request $request) {} + + /** + * 卸载 + * @param Request $request + * @return Response + */ + public function uninstall(Request $request) {} + + /** + * 支付 + * @param Request $request + * @return string|Response + * @throws GuzzleException + */ + public function pay(Request $request) {} + + /** + * 获取zip下载url + * @param $name + * @param $version + * @return mixed + * @throws BusinessException + * @throws GuzzleException + */ + protected function getDownloadUrl($name, $version) {} + + /** + * 下载zip + * @param $url + * @param $file + * @return void + * @throws BusinessException + * @throws GuzzleException + */ + protected function downloadZipFile($url, $file) {} + + /** + * 获取系统支持的解压命令 + * @param $zip_file + * @param $extract_to + * @return mixed|string|null + */ + protected function getUnzipCmd($zip_file, $extract_to) + { + if ($cmd = $this->findCmd('unzip')) { + $cmd = "$cmd -o -qq $zip_file -d $extract_to"; + } else if ($cmd = $this->findCmd('7z')) { + $cmd = "$cmd x -bb0 -y $zip_file -o$extract_to"; + } else if ($cmd = $this->findCmd('7zz')) { + $cmd = "$cmd x -bb0 -y $zip_file -o$extract_to"; + } + return $cmd; + } + + /** + * 使用解压命令解压 + * @param $cmd + * @return void + * @throws BusinessException + */ + protected function unzipWithCmd($cmd) {} + + /** + * 获取已安装的插件列表 + * @return array + */ + protected function getLocalPlugins() {} + + /** + * 获取已安装的插件列表 + * @param Request $request + * @return Response + */ + public function getInstalledPlugins(Request $request) {} + + + /** + * 获取本地插件版本 + * @param $name + * @return array|mixed|null + */ + protected function getPluginVersion($name) {} + + /** + * 获取webman/admin版本 + * @return string + */ + protected function getAdminVersion() {} + + /** + * 删除目录 + * @param $src + * @return void + */ + protected function rmDir($src) {} + + /** + * 获取httpclient + * @return Client + */ + protected function httpClient() {} + + /** + * 获取下载httpclient + * @return Client + */ + protected function downloadClient() {} + + /** + * 查找系统命令 + * @param string $name + * @param string|null $default + * @param array $extraDirs + * @return mixed|string|null + */ + protected function findCmd(string $name, string $default = null, array $extraDirs = []) {} } diff --git a/view/console/console.html b/view/console/console.html index 616770d..08d2181 100644 --- a/view/console/console.html +++ b/view/console/console.html @@ -24,26 +24,33 @@ .index-card>div { text-align: center; } + + .order-container>div>div { + min-height: 350px; + } + .order-tite { display: flex; justify-content: space-between; align-items: center; } + .order-total { margin: 18px; } - .order-total>div:first-child { + .order-total>div { text-align: center; } - .order-total>div:first-child>p:first-child { + .order-total>div>p:first-child { font-size: 2em; font-weight: 700; color: #566a7f; + line-height: 1.2em; } - .order-total>div:first-child>p:last-child { + .order-total>div>p:last-child { color: #686f77; } @@ -51,13 +58,20 @@ display: flex; justify-content: space-between; align-items: center; + padding-left: 15px; + padding-right: 15px; + } + .order-channel:hover{ + background-color: whitesmoke; + border-radius: 5px; } .order-channel>div:nth-child(2) { - width: 80px; + min-width: 80px; text-align: right; } + .order-channel>div:nth-child(3) { - width: 100px; + min-width: 100px; text-align: right; } @@ -94,6 +108,45 @@ .info-channel>div:last-child>p:last-child { color: #a1acb8; } + + .neworder-item { + display: flex; + justify-content: space-between; + align-items: center; + padding: 5px 10px; + } + + .neworder-item~.neworder-item:hover { + background-color: whitesmoke; + border-radius: 5px; + } + + .neworder-colname { + min-height: 2.2em; + color: #566a7f; + font-weight: 700; + } + + .neworder-colname>div { + text-align: center; + } + + .neworder-colname>div:nth-child(1) { + min-width: 135px; + } + + .neworder-colname>div:nth-child(2) { + min-width: 100px; + } + + .neworder-colname>div:nth-child(3) { + min-width: 36px; + } + + .neworder-item>span:nth-child(2) { + min-width: 100px; + text-align: right; + } @@ -107,7 +160,7 @@
-
+
@@ -173,119 +226,177 @@
-
+
+
+ 近7天收益 +
+ style="background-color:#ffffff;min-height:220px;padding: 10px">
-
-
-
订单统计
-
-
-
-

1433

-

总订单

+
+
+
+
+
+ 订单统计
-
-
-
-
-
- -
-
-

微信

-

全渠道统计

+
+
+
+

1433

+

总订单(笔)

+
+
+

12900

+

总金额(元)

-
99
-
120
-
-
-
-
- -
-
-

支付宝

-

全渠道统计

+
+
+
+
+ +
+
+

微信

+

全渠道统计

+
+
+
99
+
120
+
+
+
+
+ +
+
+

支付宝

+

全渠道统计

+
+
+
50
+
490
+
+
+
+
+ + + + +
+
+

云闪付

+

全渠道统计

+
+
+
31
+
68
-
50
-
490
-
-
-
-
- - - - -
-
-

云闪付

-

全渠道统计

-
-
-
31
-
68
-
-
-
-
-
最新订单
-
- 订单明细 +
+
+ +
+ 最新订单 +
+
+
+
+
订单号
+
金额
+
状态
+
+
+ H2024090710110110 + 168 + 成功 +
+
+ H2024090710110110 + 68 + 成功 +
+
+ H2024090710110110 + 268 + 成功 +
+
+ H2024090710110110 + 68 + 成功 +
+
+ H2024090710110110 + 5668 + 成功 +
+
+ H2024090710110110 + 5668 + 成功 +
+
+ H2024090710110110 + 5668 + 成功 +
+
+
+
-
+
-
-
-
- 寄语 -
-
- 原想将澎湃的爱平平稳稳放置你手心,奈何我徒有一股蛮劲,只顾向你跑去,一个不稳跌的满身脏兮兮。试图爬起的我, - 心想你会不会笑我 " 献爱献的这样笨拙, 怎么不知避开爱里的埋伏 " -
-
-
@@ -307,6 +418,17 @@
+
+
+
+ 寄语 +
+
+ 原想将澎湃的爱平平稳稳放置你手心,奈何我徒有一股蛮劲,只顾向你跑去,一个不稳跌的满身脏兮兮。试图爬起的我, + 心想你会不会笑我 " 献爱献的这样笨拙, 怎么不知避开爱里的埋伏 " +
+
+
更 新
@@ -336,11 +458,12 @@