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 @@