diff --git a/app/Http/Controllers/Api/SystemController.php b/app/Http/Controllers/Api/SystemController.php
index 7ed839ed5..c1a31a3fd 100755
--- a/app/Http/Controllers/Api/SystemController.php
+++ b/app/Http/Controllers/Api/SystemController.php
@@ -221,89 +221,6 @@ class SystemController extends AbstractController
return Base::getIpInfo(Request::input("ip"));
}
- /**
- * @api {get} api/system/get/appinfo 09. 获取应用下载信息
- *
- * @apiVersion 1.0.0
- * @apiGroup system
- * @apiName get__appinfo
- *
- * @apiSuccess {Number} ret 返回状态码(1正确、0错误)
- * @apiSuccess {String} msg 返回信息(错误描述)
- * @apiSuccess {Object} data 返回数据
- */
- public function get__appinfo() {
- $array = [
- 'name' => '',
- 'version' => '',
- 'list' => [],
- ];
- //
- $files = [
- base_path("package.json"),
- base_path("electron/package.json")
- ];
- $dist = base_path("electron/dist");
- foreach ($files as $file) {
- if (file_exists($file)) {
- $packageArray = json_decode(file_get_contents($file), true);
- $array['name'] = $packageArray['name'] ?? 'No app';
- $array['version'] = $packageArray['version'] ?? '';
- //
- $list = [
- [
- 'icon' => 'logo-apple',
- 'name' => 'macOS Intel',
- 'file' => "{$array['name']}-{$array['version']}.dmg"
- ],
- [
- 'icon' => 'logo-apple',
- 'name' => 'macOS M1',
- 'file' => "{$array['name']}-{$array['version']}-arm64.dmg"
- ],
- [
- 'icon' => 'logo-windows',
- 'name' => 'Windows x64',
- 'file' => "{$array['name']} Setup {$array['version']}.exe"
- ]
- ];
- foreach ($list as $item) {
- if (file_exists("{$dist}/{$item['file']}")) {
- $item['url'] = Base::fillUrl('api/system/get/appdown?file=' . urlencode($item['file']));
- $item['size'] = filesize("{$dist}/{$item['file']}");
- $array['list'][] = $item;
- }
- }
- }
- if (count($array['list']) > 0) {
- break;
- }
- }
- //
- if (count($array['list']) == 0) {
- return Base::retError('No file');
- }
- return Base::retSuccess('success', $array);
- }
-
- /**
- * @api {get} api/system/get/appdown 10. 下载应用
- *
- * @apiVersion 1.0.0
- * @apiGroup system
- * @apiName get__appdown
- *
- * @apiParam {String} file 文件名称
- */
- public function get__appdown() {
- $file = Request::input("file");
- $path = base_path("electron/dist/" . $file);
- if (!file_exists($path)) {
- return Base::ajaxError("No file");
- }
- return Response::download($path);
- }
-
/**
* @api {post} api/system/imgupload 11. 上传图片
*
diff --git a/resources/assets/js/components/AppDown.vue b/resources/assets/js/components/AppDown.vue
new file mode 100644
index 000000000..97e410382
--- /dev/null
+++ b/resources/assets/js/components/AppDown.vue
@@ -0,0 +1,195 @@
+
+
-
-