diff --git a/src/api/login.js b/src/api/login.js new file mode 100644 index 0000000..623ef42 --- /dev/null +++ b/src/api/login.js @@ -0,0 +1,29 @@ +import request from "@/utils/request.js"; +import qs from "qs"; + +const baseUrl = '/dev' + + +export function login(params) { + return request({ + url: baseUrl+"/login", + method: "post", + data:params + }); +} + +export function register(params) { + return request({ + url: baseUrl+"/register", + method: "post", + data:params + }); +} + +export function sendActiveCode() { + return request({ + url: baseUrl+"/sendActiveCode", + method: "get", + + }); +} \ No newline at end of file diff --git a/src/assets/css/home-style.css b/src/assets/css/home-style.css index 8156aa4..741c2c4 100644 --- a/src/assets/css/home-style.css +++ b/src/assets/css/home-style.css @@ -565,7 +565,7 @@ body.light-mode .video-bg:before { white-space: nowrap; transition: 0.3s; } -.content-section ul li:hover { +.content-section ul:hover { background-color: var(--theme-bg-color); } .content-section ul li:hover:first-child { @@ -587,7 +587,7 @@ body.light-mode .video-bg:before { .products { display: flex; align-items: center; - width: 150px; + width: 40px; } @media screen and (max-width: 480px) { .products { @@ -596,28 +596,29 @@ body.light-mode .video-bg:before { } .status { - margin-left: auto; + /*margin-left: auto;*/ width: 140px; font-size: 15px; position: relative; + text-align: left; } @media screen and (max-width: 700px) { .status { display: none; } } -.status-circle { - width: 6px; - height: 6px; - background-color: #396df0; - position: absolute; - border-radius: 50%; - top: 4px; - left: -20px; -} -.status-circle.green { - background-color: #3bf083; -} +/*.status-circle {*/ +/* width: 6px;*/ +/* height: 6px;*/ +/* background-color: #396df0;*/ +/* position: absolute;*/ +/* border-radius: 50%;*/ +/* top: 4px;*/ +/* left: -20px;*/ +/*}*/ +/*.status-circle.green {*/ +/* background-color: #3bf083;*/ +/*}*/ .status-button { font-size: 15px; margin-top: 0; @@ -642,57 +643,57 @@ body.light-mode .video-bg:before { background: #1e59f1; } -.menu { - width: 5px; - height: 5px; - background-color: var(--button-inactive); - border-radius: 50%; - box-shadow: 7px 0 0 0 var(--button-inactive), 14px 0 0 0 var(--button-inactive); - margin: 0 12px; -} +/*.menu {*/ +/* width: 5px;*/ +/* height: 5px;*/ +/* background-color: var(--button-inactive);*/ +/* border-radius: 50%;*/ +/* box-shadow: 7px 0 0 0 var(--button-inactive), 14px 0 0 0 var(--button-inactive);*/ +/* margin: 0 12px;*/ +/*}*/ @media screen and (max-width: 415px) { .adobe-product .menu { display: none; } } -.dropdown { - position: relative; - height: 53px; - width: 40px; - top: -24px; - display: flex; - left: -5px; - background: transparent; - border: none; - cursor: pointer; -} -.dropdown ul { - position: absolute; - background: var(--dropdown-bg); - height: 110px; - width: 120px; - right: 0; - top: 20px; - pointer-events: none; - opacity: 0; - transform: translatey(10px); - transition: all 0.4s ease; -} -.dropdown ul li a { - text-decoration: none; - color: var(--theme-color); - font-size: 12px; -} +/*.dropdown {*/ +/* position: relative;*/ +/* height: 53px;*/ +/* width: 40px;*/ +/* top: -24px;*/ +/* display: flex;*/ +/* left: -5px;*/ +/* background: transparent;*/ +/* border: none;*/ +/* cursor: pointer;*/ +/*}*/ +/*.dropdown ul {*/ +/* position: absolute;*/ +/* background: var(--dropdown-bg);*/ +/* height: 30px;*/ +/* width: 50px;*/ +/* right: 0;*/ +/* top: 20px;*/ +/* pointer-events: none;*/ +/* opacity: 0;*/ +/* transform: translatey(10px);*/ +/* transition: all 0.4s ease;*/ +/*}*/ +/*.dropdown ul li a {*/ +/* text-decoration: none;*/ +/* color: var(--theme-color);*/ +/* font-size: 12px;*/ +/*}*/ -.dropdown.is-active ul { - opacity: 1; - pointer-events: all; - transform: translatey(25px); -} -.dropdown.is-active ul li:hover { - background-color: var(--dropdown-hover); -} +/*.dropdown.is-active ul {*/ +/* opacity: 1;*/ +/* pointer-events: all;*/ +/* transform: translatey(25px);*/ +/*}*/ +/*.dropdown.is-active ul:hover {*/ +/* background-color: var(--dropdown-hover);*/ +/*}*/ .button-wrapper { display: flex; diff --git a/src/assets/img/notice.svg b/src/assets/img/notice.svg new file mode 100644 index 0000000..138cba8 --- /dev/null +++ b/src/assets/img/notice.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/img/wallhaven-1pd98v.jpg b/src/assets/img/wallhaven-1pd98v.jpg new file mode 100644 index 0000000..98de1f0 Binary files /dev/null and b/src/assets/img/wallhaven-1pd98v.jpg differ diff --git a/src/components/home/Carousel.vue b/src/components/home/Carousel.vue new file mode 100644 index 0000000..4e4b43b --- /dev/null +++ b/src/components/home/Carousel.vue @@ -0,0 +1,66 @@ + + + \ No newline at end of file diff --git a/src/components/home/HomeHeader.vue b/src/components/home/HomeHeader.vue index 7bf3aac..cd3d740 100644 --- a/src/components/home/HomeHeader.vue +++ b/src/components/home/HomeHeader.vue @@ -2,14 +2,16 @@
- {{item.libel}} + {{ item.libel }} +
- - - - - - + + + + + + @@ -39,10 +41,10 @@ :close-on-click-modal="true" > - - + + 登录 - + - + - + - + -
+
记住我 - + + 忘记密码?找回 +
- + 注册 - + - + @@ -132,12 +138,13 @@ placeholder="确认密码" auto-complete="new-password" > - + - +
获取验证码 - ({{sendTime}}s) + ({{ sendTime }}s)
+
+
+ + + 找回密码 + + + + + + +
+ + + 获取验证码 + ({{ sendTime }}s) + +
+ + +
+ + + + + + + + + + + + + +
+
- \ No newline at end of file diff --git a/src/components/home/Notice.vue b/src/components/home/Notice.vue new file mode 100644 index 0000000..c8160ff --- /dev/null +++ b/src/components/home/Notice.vue @@ -0,0 +1,76 @@ + + + + + \ No newline at end of file diff --git a/src/components/hotNews/NewsCard.vue b/src/components/hotNews/NewsCard.vue index 4cc1c55..1a75c21 100644 --- a/src/components/hotNews/NewsCard.vue +++ b/src/components/hotNews/NewsCard.vue @@ -18,7 +18,7 @@ - +
@@ -87,7 +87,8 @@ export default { } .widget { - background-color: #fff; + color: var(--theme-color); + background-color: var(--theme-bg-color); border-radius: 1.0rem; flex-direction: column; height: 540px; @@ -146,7 +147,7 @@ export default { .nav__title { - color: #444; + color: var(--theme-color); position: absolute; } .refresh{ @@ -156,6 +157,7 @@ export default { .refresh:hover{ font-size: 20px; color: #999ba5; + cursor: pointer; } .hot-rank-1 { color: #fff; diff --git a/src/components/myNav/MyNav.vue b/src/components/myNav/MyNav.vue new file mode 100644 index 0000000..53aed8c --- /dev/null +++ b/src/components/myNav/MyNav.vue @@ -0,0 +1,233 @@ + + + \ No newline at end of file diff --git a/src/components/setting/home/PersonalHomePage.vue b/src/components/setting/home/PersonalHomePage.vue new file mode 100644 index 0000000..c1cfb5b --- /dev/null +++ b/src/components/setting/home/PersonalHomePage.vue @@ -0,0 +1,25 @@ + + + \ No newline at end of file diff --git a/src/components/setting/layout/SettingLeftSide.vue b/src/components/setting/layout/SettingLeftSide.vue index dc506a7..13cbc8f 100644 --- a/src/components/setting/layout/SettingLeftSide.vue +++ b/src/components/setting/layout/SettingLeftSide.vue @@ -3,6 +3,17 @@
+ + + + + + + + + 首页 + + @@ -21,6 +32,13 @@ 网站管理 + + + + + 站内设置 + +
diff --git a/src/components/setting/layout/SettingMainHeader.vue b/src/components/setting/layout/SettingMainHeader.vue index 098d670..96fab61 100644 --- a/src/components/setting/layout/SettingMainHeader.vue +++ b/src/components/setting/layout/SettingMainHeader.vue @@ -18,13 +18,13 @@ import $ from 'jquery' export default { name:"SettingMainHeader", + props:{ + tabList:Object + }, data() { return { - tabList:[ - {path:'/appearance',libel:'外观设置'}, - {path:'/information',libel:'信息设置'}, - {path:'/function',libel:'功能设置'} - ] + + }}, mounted() { this.toggleActive(); diff --git a/src/components/setting/onsite/BaseSettings.vue b/src/components/setting/onsite/BaseSettings.vue new file mode 100644 index 0000000..f4d7a27 --- /dev/null +++ b/src/components/setting/onsite/BaseSettings.vue @@ -0,0 +1,39 @@ + + + \ No newline at end of file diff --git a/src/components/setting/onsite/ImportExport.vue b/src/components/setting/onsite/ImportExport.vue new file mode 100644 index 0000000..7fe4f30 --- /dev/null +++ b/src/components/setting/onsite/ImportExport.vue @@ -0,0 +1,23 @@ + + + \ No newline at end of file diff --git a/src/components/setting/onsite/OnSiteSetting.vue b/src/components/setting/onsite/OnSiteSetting.vue new file mode 100644 index 0000000..f352f50 --- /dev/null +++ b/src/components/setting/onsite/OnSiteSetting.vue @@ -0,0 +1,34 @@ + + + \ No newline at end of file diff --git a/src/components/setting/system/AppearanceSettings.vue b/src/components/setting/system/AppearanceSettings.vue index 418af34..0d508a0 100644 --- a/src/components/setting/system/AppearanceSettings.vue +++ b/src/components/setting/system/AppearanceSettings.vue @@ -1,25 +1,99 @@ \ No newline at end of file diff --git a/src/components/setting/system/FunctionSettings.vue b/src/components/setting/system/FunctionSettings.vue index 3681eeb..9be9139 100644 --- a/src/components/setting/system/FunctionSettings.vue +++ b/src/components/setting/system/FunctionSettings.vue @@ -1,34 +1,181 @@ \ No newline at end of file diff --git a/src/components/setting/system/InformationSettings.vue b/src/components/setting/system/InformationSettings.vue index 6f6b45b..45dbdb3 100644 --- a/src/components/setting/system/InformationSettings.vue +++ b/src/components/setting/system/InformationSettings.vue @@ -1,31 +1,214 @@ \ No newline at end of file diff --git a/src/components/setting/system/SystemSettings.vue b/src/components/setting/system/SystemSettings.vue index 88d9347..6d30148 100644 --- a/src/components/setting/system/SystemSettings.vue +++ b/src/components/setting/system/SystemSettings.vue @@ -1,6 +1,6 @@ @@ -20,7 +20,11 @@ export default { }, data() { return { - + tabList:[ + {path:'/appearance',libel:'外观设置'}, + {path:'/information',libel:'信息设置'}, + {path:'/function',libel:'功能设置'} + ] }}, mounted() { diff --git a/src/components/setting/system/Upload.vue b/src/components/setting/system/Upload.vue new file mode 100644 index 0000000..cb574f6 --- /dev/null +++ b/src/components/setting/system/Upload.vue @@ -0,0 +1,154 @@ + + + \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index d8030e2..d008b77 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -11,6 +11,11 @@ import informationSettings from "@/components/setting/system/InformationSettings import functionSettings from "@/components/setting/system/FunctionSettings.vue"; import systemSettings from "@/components/setting/system/SystemSettings.vue"; import websiteManage from "@/components/setting/website/websiteManage.vue"; +import myNav from "@/components/myNav/MyNav.vue"; +import personalHomePage from "@/components/setting/home/PersonalHomePage.vue"; +import onSiteSetting from "@/components/setting/onsite/OnSiteSetting.vue"; +import baseSettings from "@/components/setting/onsite/BaseSettings.vue"; +import importExport from "@/components/setting/onsite/ImportExport.vue"; const originalPush = VueRouter.prototype.push VueRouter.prototype.push = function push(location) { return originalPush.call(this, location).catch(err => err) @@ -41,13 +46,18 @@ const routes = [ path: '/navDetail', name: 'navDetail', component: navDetail + }, + { + path: '/myNav', + name: 'myNav', + component: myNav } ], }, { path: '/settings', - redirect: '/admin', - name: 'settings', + redirect: '/personal', + name: '/settings', component: settings, children: [ { @@ -77,7 +87,30 @@ const routes = [ path: '/website', name: '/website', component: websiteManage - } + }, + { + path: '/personal', + name: '/personal', + component: personalHomePage + }, + { + path: '/onSite', + name: '/onSite', + redirect:'/baseSettings', + component: onSiteSetting, + children:[ + { + path: '/baseSettings', + name: '/baseSettings', + component: baseSettings + }, + { + path: '/importExport', + name: '/importExport', + component: importExport + }, + ] + }, ], }, diff --git a/src/store/index.js b/src/store/index.js index ceffa8e..743346f 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -5,10 +5,15 @@ Vue.use(Vuex) export default new Vuex.Store({ state: { + theme:'dark', }, getters: { }, mutations: { + SET_THEME:(state,data)=>{ + state.theme=data; + window.sessionStorage.setItem('theme',data); + } }, actions: { }, diff --git a/src/views/Index.vue b/src/views/Index.vue index 7a34e67..8efcae6 100644 --- a/src/views/Index.vue +++ b/src/views/Index.vue @@ -9,7 +9,7 @@ Your browser does not support the video tag. -
+
@@ -40,23 +40,51 @@ export default { HomeHeader, }, data() { - return {} + return { + isLight:false, + darkMode:window.sessionStorage.getItem('theme') + } }, mounted() { - this.toggleDarkLight(); + let nowDate=new Date() + let hour=nowDate.getHours() + //黑夜时 + if(hour>18&&hour<=24||hour<6){ + this.goDark() + } + //根据本地存储状态哦按段 + if(this.darkMode==='dark'){ this.goDark()} }, created() { }, computed: {}, methods:{ - toggleDarkLight() { - const toggleButton = document.querySelector('.dark-light'); + goDark() { + //黑夜的 + document.body.classList.remove('light-mode') + window.sessionStorage.setItem('theme', 'dark') + }, + goLight(){ + //白天的 + document.body.classList.add('light-mode') + window.sessionStorage.setItem('theme','light') + }, + changeStyle(){ + this.isLight=!this.isLight + if(this.isLight!==true){ + this.goDark(); + }else{ + this.goLight(); + } - toggleButton.addEventListener('click', () => { - document.body.classList.toggle('light-mode'); - }); - } + }, + // toggleDarkLight() { + // const toggleButton = document.querySelector('.dark-light'); + // toggleButton.addEventListener('click', () => { + // document.body.classList.toggle('light-mode'); + // }); + // } } } diff --git a/vue.config.js b/vue.config.js index b7222c8..1a987e5 100644 --- a/vue.config.js +++ b/vue.config.js @@ -6,6 +6,10 @@ module.exports = defineConfig({ client: { overlay: false // 编译错误时,取消全屏覆盖 }, + open: true, //配置自动启动浏览器 + host: "localhost", + https: false, + port: 8081, proxy: { '/api': { @@ -24,6 +28,22 @@ module.exports = defineConfig({ '^/api': '' } }, + '/dev': { + //后端接口的baseurl + target: 'http://localhost:8080', + //是否允许跨域 + changeOrigin: true, + // ws: true, //是否代理 websockets + // secure: true, + // 'secure': true, + headers: { + Connection: "kepp-alive" + }, + pathRewrite: { + //这里的作用是使用去掉api + '^/dev': '' + } + }, } } })