From 3018ee3eca4e611313a98f72372cf00daa442b71 Mon Sep 17 00:00:00 2001 From: sws <1141121512@qq.com> Date: Mon, 30 Sep 2024 17:12:42 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=AF=BC=E5=85=A5=E6=96=B0=E5=A2=9E=E6=A8=A1?= =?UTF-8?q?=E7=89=88=E5=BC=B9=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/diy.ts | 17 +- .../common/template-import/index.vue | 300 +++++++++++++++++- src/views/layout/index.vue | 18 +- 3 files changed, 308 insertions(+), 27 deletions(-) diff --git a/src/api/diy.ts b/src/api/diy.ts index 3d819fbf..9de435b7 100644 --- a/src/api/diy.ts +++ b/src/api/diy.ts @@ -1,4 +1,3 @@ -import { id } from 'element-plus/es/locale'; import request from '@/utils/request'; class DiyAPI { @@ -18,6 +17,14 @@ class DiyAPI { data, }); } + /** diy导入--获取列表 */ + static getImportList(data: any) { + return request({ + url: `diyapi/diymarket`, + method: 'post', + data, + }); + } /** diy导入 */ static import(data: FormData) { return request({ @@ -29,6 +36,14 @@ class DiyAPI { }, }); } + /** diy导入 -- 安装 */ + static install(data: diy) { + return request({ + url: `diyapi/diyinstall`, + method: 'post', + data, + }); + } /** diy导出 */ static export(data: diy) { return request({ diff --git a/src/components/common/template-import/index.vue b/src/components/common/template-import/index.vue index 496468eb..51888094 100644 --- a/src/components/common/template-import/index.vue +++ b/src/components/common/template-import/index.vue @@ -10,33 +10,92 @@
- + -
+
+ {{ upload_file.name }} + ({{ annex_size_to_unit(upload_file.size) }}) +
+

1. 选择已下载的diy设计zip包

2. 导入将自动新增一条数据

- + +
+ + +
+
+
+
+ + +
+
+ +
+ + 查看 +
+
+
+
+
+
{{ item.title }}
+
+

{{ item.price_data.value }}

+ {{ item.buy_data.title }} +
+
{{ item.version_apply.name }}
+
+
+
+
+
+
+
- diff --git a/src/views/layout/index.vue b/src/views/layout/index.vue index 512f9e0b..ee037163 100644 --- a/src/views/layout/index.vue +++ b/src/views/layout/index.vue @@ -18,7 +18,6 @@