From 5d661472e2c9aa109fc4cd1981eb4ceb9d6caef5 Mon Sep 17 00:00:00 2001 From: LisianthusLeaf <3106334435@qq.com> Date: Thu, 5 Dec 2024 23:57:50 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 2 +- src/App.vue | 70 +------------- src/api/market/api.ts | 17 +++- src/api/workbench/api.ts | 4 +- src/assets/main.css | 26 +++-- src/components/normal/Text.vue | 14 +++ src/util/request.ts | 2 +- src/views/home/index.vue | 172 ++++++++++++--------------------- 8 files changed, 107 insertions(+), 200 deletions(-) create mode 100644 src/components/normal/Text.vue diff --git a/index.html b/index.html index 9e5fc8f..5dd6e40 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ - Vite App + OTOW
diff --git a/src/App.vue b/src/App.vue index f7a8c32..430ca34 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,77 +1,11 @@ diff --git a/src/api/market/api.ts b/src/api/market/api.ts index e6d31ec..a213e50 100644 --- a/src/api/market/api.ts +++ b/src/api/market/api.ts @@ -4,7 +4,7 @@ import request from '@/util/request'; export async function searchProject(page: number=1, limit: number=10,cmd: number=2,name?: string):Promise{ try { const response = await request({ - url: '/search', + url: '/project/search', method: "post", params: { page:page, @@ -17,4 +17,19 @@ export async function searchProject(page: number=1, limit: number=10,cmd: number } catch (error) { console.error('查询项目请求失败:', error); } +} + +export async function downloadProject(id:number):Promise{ + try { + const response = await request({ + url: '/project/download', + method: "get", + params: { + id: id + } + }) + return response; + } catch (error) { + console.error('下载项目请求失败:', error); + } } \ No newline at end of file diff --git a/src/api/workbench/api.ts b/src/api/workbench/api.ts index 9518bcd..fff7bd0 100644 --- a/src/api/workbench/api.ts +++ b/src/api/workbench/api.ts @@ -5,7 +5,7 @@ import type {detail, project} from "@/api/workbench/type.ts"; export async function creatProject(data: detail):Promise { try { const response = await request({ - url: '/create', + url: '/project/create', method: "post", data: data }); @@ -19,7 +19,7 @@ export async function creatProject(data: detail):Promise { export async function editProject(data: project):Promise{ try { const response = await request({ - url: '/edit', + url: '/project/edit', method: "post", data: data }) diff --git a/src/assets/main.css b/src/assets/main.css index 3f86cb6..0fbd4ec 100644 --- a/src/assets/main.css +++ b/src/assets/main.css @@ -1,6 +1,6 @@ #app { - min-width: 100vw; - min-height: 100vh; + min-width: 100vw; + min-height: 100vh; max-width: 1280px; margin: 0 auto; padding: 0; @@ -16,21 +16,17 @@ input{ border: none; outline: none; } - -a, -.green { - text-decoration: none; - color: hsla(160, 100%, 37%, 1); - transition: 0.4s; - padding: 3px; +.test{ + border: solid 1px #000000; } - -@media (hover: hover) { - a:hover { - background-color: hsla(160, 100%, 37%, 0.2); - } +.flex{ + display: flex; + align-items: center; + justify-content: center; +} +button{ + padding: 10px 20px; } - @media (min-width: 1024px) { body { display: flex; diff --git a/src/components/normal/Text.vue b/src/components/normal/Text.vue new file mode 100644 index 0000000..a0a1e7e --- /dev/null +++ b/src/components/normal/Text.vue @@ -0,0 +1,14 @@ + + + \ No newline at end of file diff --git a/src/util/request.ts b/src/util/request.ts index 75a4894..d8ec692 100644 --- a/src/util/request.ts +++ b/src/util/request.ts @@ -4,7 +4,7 @@ import { statusTextMap,errorStatusCodes,ignoreStatusCodes } from '@/util/statusC import {storage} from "@/util/storage"; const request = axios.create({ - baseURL: "http://122.152.215.226:9020", + baseURL: "http://119.3.234.15:9000", timeout: 10000, }); diff --git a/src/views/home/index.vue b/src/views/home/index.vue index 9eacfd0..3ede32c 100644 --- a/src/views/home/index.vue +++ b/src/views/home/index.vue @@ -1,129 +1,77 @@ - - - \ No newline at end of file