From b9973f343d33f327bf386891d0535ac741459240 Mon Sep 17 00:00:00 2001 From: jacky Date: Tue, 9 Apr 2024 12:31:09 +0800 Subject: [PATCH] init --- src/api/initdb.js | 27 -- src/router/index.js | 8 +- src/view/{about => blank}/index.vue | 2 +- src/view/dashboard/{index.vue => admin.vue} | 39 +- .../dashboardTable/dashboardTable.vue | 98 ----- src/view/dashboard/home.vue | 165 ++++++++ src/view/dashboard/weather.js | 8 +- src/view/init/index.vue | 361 ------------------ src/view/layout/bottomInfo/bottomInfo.vue | 8 +- 9 files changed, 174 insertions(+), 542 deletions(-) delete mode 100644 src/api/initdb.js rename src/view/{about => blank}/index.vue (86%) rename src/view/dashboard/{index.vue => admin.vue} (80%) delete mode 100644 src/view/dashboard/dashboardTable/dashboardTable.vue create mode 100644 src/view/dashboard/home.vue delete mode 100644 src/view/init/index.vue diff --git a/src/api/initdb.js b/src/api/initdb.js deleted file mode 100644 index f1eb2f4..0000000 --- a/src/api/initdb.js +++ /dev/null @@ -1,27 +0,0 @@ -import service from '@/utils/request' -// @Tags InitDB -// @Summary 初始化用户数据库 -// @Produce application/json -// @Param data body request.InitDB true "初始化数据库参数" -// @Success 200 {string} string "{"code":0,"data":{},"msg":"自动创建数据库成功"}" -// @Router /init/initdb [post] -export const initDB = (data) => { - return service({ - url: '/init/initdb', - method: 'post', - data, - donNotShowLoading: true - }) -} - -// @Tags CheckDB -// @Summary 初始化用户数据库 -// @Produce application/json -// @Success 200 {string} string "{"code":0,"data":{},"msg":"探测完成"}" -// @Router /init/checkdb [post] -export const checkDB = () => { - return service({ - url: '/init/checkdb', - method: 'post' - }) -} diff --git a/src/router/index.js b/src/router/index.js index 52d3763..b7261b9 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -4,11 +4,6 @@ const routes = [{ path: '/', redirect: '/login' }, -{ - path: '/init', - name: 'Init', - component: () => import('@/view/init/index.vue') -}, { path: '/login', name: 'Login', @@ -20,8 +15,7 @@ const routes = [{ closeTab: true, }, component: () => import('@/view/error/index.vue') -} -] +}] const router = createRouter({ history: createWebHashHistory(), diff --git a/src/view/about/index.vue b/src/view/blank/index.vue similarity index 86% rename from src/view/about/index.vue rename to src/view/blank/index.vue index 1c858b1..366bddf 100644 --- a/src/view/about/index.vue +++ b/src/view/blank/index.vue @@ -3,7 +3,7 @@
- email: phpcrazy@163.com + 建设中...
diff --git a/src/view/dashboard/index.vue b/src/view/dashboard/admin.vue similarity index 80% rename from src/view/dashboard/index.vue rename to src/view/dashboard/admin.vue index ed6b422..406b64e 100644 --- a/src/view/dashboard/index.vue +++ b/src/view/dashboard/admin.vue @@ -3,7 +3,7 @@
-
早安,请开始一天的工作吧
+
您好,请开始一天的工作吧
{{ weatherInfo }}
@@ -16,11 +16,6 @@
-
@@ -53,33 +48,10 @@
-
-
-
数据统计
-
- - - - - - - - -
-
-
- - diff --git a/src/view/dashboard/home.vue b/src/view/dashboard/home.vue new file mode 100644 index 0000000..36d49b4 --- /dev/null +++ b/src/view/dashboard/home.vue @@ -0,0 +1,165 @@ + + + + + diff --git a/src/view/dashboard/weather.js b/src/view/dashboard/weather.js index 11b2152..d926d37 100644 --- a/src/view/dashboard/weather.js +++ b/src/view/dashboard/weather.js @@ -2,15 +2,15 @@ import axios from 'axios' import { ref } from 'vue' -const weatherInfo = ref('今日晴,0℃ - 10℃,天气寒冷,注意添加衣物。') -const amapKey = '8e8baa8a7317586c29ec694895de6e0a' +const weatherInfo = ref('') +const amapKey = '1f0c8b27920dc41d204800793d629d8e' export const useWeatherInfo = () => { ip() return weatherInfo } -export const ip = async() => { +export const ip = async () => { // key换成你自己的 https://console.amap.com/dev/index if (amapKey === '') { return false @@ -21,7 +21,7 @@ export const ip = async() => { } } -const getWeather = async(code) => { +const getWeather = async (code) => { const response = await axios.get('https://restapi.amap.com/v3/weather/weatherInfo?key=' + amapKey + '&extensions=base&city=' + code) if (response.data.status === '1') { const s = response.data.lives[0] diff --git a/src/view/init/index.vue b/src/view/init/index.vue deleted file mode 100644 index 5478d4a..0000000 --- a/src/view/init/index.vue +++ /dev/null @@ -1,361 +0,0 @@ - - - - - diff --git a/src/view/layout/bottomInfo/bottomInfo.vue b/src/view/layout/bottomInfo/bottomInfo.vue index fb1f055..c18478d 100644 --- a/src/view/layout/bottomInfo/bottomInfo.vue +++ b/src/view/layout/bottomInfo/bottomInfo.vue @@ -1,11 +1,5 @@