diff --git a/README.md b/README.md index 2b58e2e..da45834 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ ## 主要功能 -- 全部重构 -### × 1.登录注册功能 +### √ 1.登录注册功能 ### × 2.首页展示导航快捷入口 ### × 3.画廊页面展示共享图片 ### × 4.文章详情页展示文章内容 diff --git a/package.json b/package.json index 086a4de..ef825b2 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "axios": "^1.8.4", "less": "^4.3.0", "pinia": "^3.0.1", + "qweather-icons": "^1.6.0", "tdesign-vue-next": "^1.11.5", "unplugin-auto-import": "^19.1.2", "unplugin-vue-components": "^28.4.1", diff --git a/src/assets/logo/柚子娘-绿.png b/src/assets/logo/柚子娘-绿.png new file mode 100644 index 0000000..5e31ce4 Binary files /dev/null and b/src/assets/logo/柚子娘-绿.png differ diff --git a/src/assets/logo/柚子娘.png b/src/assets/logo/柚子娘.png new file mode 100644 index 0000000..9123f02 Binary files /dev/null and b/src/assets/logo/柚子娘.png differ diff --git a/src/assets/logo/红色字体.png b/src/assets/logo/红色字体.png new file mode 100644 index 0000000..b9403b0 Binary files /dev/null and b/src/assets/logo/红色字体.png differ diff --git a/src/assets/logo/绿色字体.png b/src/assets/logo/绿色字体.png new file mode 100644 index 0000000..04b0f65 Binary files /dev/null and b/src/assets/logo/绿色字体.png differ diff --git a/src/components/menu.vue b/src/components/menu.vue new file mode 100644 index 0000000..4496dde --- /dev/null +++ b/src/components/menu.vue @@ -0,0 +1,103 @@ + + + + + + + + + + + + 首页 + 画廊 + 工具 + 软件分享 + 友链 + + + + + + + + + + + + + 登录 + + + + + + + + + + + + \ No newline at end of file diff --git a/src/components/wea.vue b/src/components/wea.vue new file mode 100644 index 0000000..f031281 --- /dev/null +++ b/src/components/wea.vue @@ -0,0 +1,68 @@ + + + + + {{ addr }} + + + + {{ now.text }} {{ now.temp }} ℃ + + + + + + diff --git a/src/config/http.js b/src/config/http.js index b4c51c2..18891b2 100644 --- a/src/config/http.js +++ b/src/config/http.js @@ -3,7 +3,7 @@ const files = import.meta.glob('@/api/*/index.js', { }) const http = {} -console.log(files); +// console.log(files); for (const i in files) { const t = i.split("/") const name = t[t.length - 2] diff --git a/src/main.js b/src/main.js index 8daa994..54f8428 100644 --- a/src/main.js +++ b/src/main.js @@ -2,15 +2,16 @@ import { useConfig } from '@/config'; import { createPinia } from 'pinia'; +import "qweather-icons/font/qweather-icons.css"; import TDesign from 'tdesign-vue-next'; import 'tdesign-vue-next/es/style/index.css'; import { createApp } from 'vue'; import App from './App.vue'; import './assets/main.less'; +import menu from './components/menu.vue'; import icon from './icon/index.js'; import router from "./router/guard.js"; - const app = createApp(App) app.use(createPinia()) @@ -23,6 +24,6 @@ for (const key in icon) { // console.log(key, icon[key]); app.component('icon-'+key, icon[key]); } - +app.component('home-menu', menu) app.mount('#app') diff --git a/src/util/router.js b/src/util/router.js index 4723018..d121771 100644 --- a/src/util/router.js +++ b/src/util/router.js @@ -2,7 +2,7 @@ import home from '@/views/home/index.vue' export default { path: '/', - redirect:'/login', + redirect:'/home', children:[ { path:'home', @@ -17,6 +17,34 @@ export default { meta:{ title:'登录' } + }, + { + path:"gallery", + component:()=>import('@/views/gallery/index.vue'), + meta:{ + title:'画廊' + } + }, + { + path:"widget", + component:()=>import('@/views/widget/index.vue'), + meta:{ + title:'工具' + } + }, + { + path:"appshare", + component:()=>import('@/views/appshare/index.vue'), + meta:{ + title:'软件分享' + } + }, + { + path:"plink", + component:()=>import('@/views/plink/index.vue'), + meta:{ + title:'友链' + } } ] } \ No newline at end of file diff --git a/src/views/appshare/index.vue b/src/views/appshare/index.vue new file mode 100644 index 0000000..23bf667 --- /dev/null +++ b/src/views/appshare/index.vue @@ -0,0 +1,22 @@ + + + + 这是软件分享页 + + + + + + \ No newline at end of file diff --git a/src/views/gallery/index.vue b/src/views/gallery/index.vue new file mode 100644 index 0000000..898ce81 --- /dev/null +++ b/src/views/gallery/index.vue @@ -0,0 +1,22 @@ + + + + 这是画廊页 + + + + + + \ No newline at end of file diff --git a/src/views/home/index.vue b/src/views/home/index.vue index 0d485f6..042cfa4 100644 --- a/src/views/home/index.vue +++ b/src/views/home/index.vue @@ -1,4 +1,5 @@ + 这里是主页 diff --git a/src/views/login/index.vue b/src/views/login/index.vue index da936cc..46650f7 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -124,7 +124,7 @@ async function loginSubmit({ validateResult, firstError }) { const res = await $http.user.login(loginData) if (res.code == 1) { $cookies.set('token', res.token, 60 * 60 * 24 * 7) - $cookies.set('userInfo', res.data, 60 * 60 * 24 * 7) + $cookies.set('userinfo', res.data, 60 * 60 * 24 * 7) $msg.success(res.msg) router.push('/') return diff --git a/src/views/plink/index.vue b/src/views/plink/index.vue new file mode 100644 index 0000000..9f1c8ee --- /dev/null +++ b/src/views/plink/index.vue @@ -0,0 +1,22 @@ + + + + 这是友链页 + + + + + + \ No newline at end of file diff --git a/src/views/widget/index.vue b/src/views/widget/index.vue new file mode 100644 index 0000000..9db3abb --- /dev/null +++ b/src/views/widget/index.vue @@ -0,0 +1,22 @@ + + + + 这是工具页 + + + + + + \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index dd246a4..3ff8a2d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1552,6 +1552,11 @@ queue-microtask@^1.2.2: resolved "https://registry.npmmirror.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== +qweather-icons@^1.6.0: + version "1.6.0" + resolved "https://registry.npmmirror.com/qweather-icons/-/qweather-icons-1.6.0.tgz#097676b8bbbe34e3e7c18371de8c6631d37c1e49" + integrity sha512-uINrSOteHHarEeHRpP37aBnuuwYnWc1eyZ2gbnujoEqOVabIPDiEseF7a9eIOnBn7GZBlo5nYj29eOEfLH/bEA== + read-cache@^1.0.0: version "1.0.0" resolved "https://registry.npmmirror.com/read-cache/-/read-cache-1.0.0.tgz#e664ef31161166c9751cdbe8dbcf86b5fb58f774"