diff --git a/index.html b/index.html index 562eb07..8bd26ba 100644 --- a/index.html +++ b/index.html @@ -6,7 +6,7 @@ - 素材网 + 好运徕 diff --git a/public/css/ly.less b/public/css/ly.less index baa9a6b..81a4b91 100644 --- a/public/css/ly.less +++ b/public/css/ly.less @@ -212,8 +212,7 @@ .banner { img { - width: auto; - height: calc(100vh - var(--tabheight)); + width: 100%; } } @@ -366,7 +365,7 @@ justify-content: center; overflow: hidden; height: calc(100vh - var(--tabheight)); - background: url(/images/com-bg.png) no-repeat center center; + background: url(/images/com-bg.jpg) no-repeat center center; background-size: auto 100%; .introbox { @@ -408,13 +407,13 @@ .box; .box-tb; .box-pack-between; - height: 350px; span { font-size: 16px; color: #333333; line-height: 30px; text-indent: 2em; + .text-hide(11); } button { diff --git a/public/images/banner.png b/public/images/banner.png deleted file mode 100644 index d667e25..0000000 Binary files a/public/images/banner.png and /dev/null differ diff --git a/public/images/com-bg.jpg b/public/images/com-bg.jpg new file mode 100644 index 0000000..ab34025 Binary files /dev/null and b/public/images/com-bg.jpg differ diff --git a/public/images/com-bg.png b/public/images/com-bg.png deleted file mode 100644 index 3e68c61..0000000 Binary files a/public/images/com-bg.png and /dev/null differ diff --git a/src/main.js b/src/main.js index 662ec0a..f6122b2 100644 --- a/src/main.js +++ b/src/main.js @@ -16,7 +16,6 @@ import 'element-plus/dist/index.css' // }); import routes from "./router"; import less from "less"; -import axios from 'axios'; import "vue-fast-marquee/style.css"; import Marquee from 'vue-fast-marquee'; import VueQr from "vue-qr/src/packages/vue-qr.vue"; @@ -146,15 +145,48 @@ app.config.globalProperties.$unsigned = (e) => { return e > 0 ? e : 0 }; app.config.globalProperties.$truncate = (e, p, a) => { return `${e.substring(0, p)}...${e.substring(e.length - a)}`; }; -app.config.globalProperties.$token = (e) => { - const token = localStorage.getItem(e).split('.'); - return { - header: JSON.parse(atob(token[0])), - payload: JSON.parse(atob(token[1])), +app.config.globalProperties.$toTimes = (e, format) => { + const date = new Date(e * 1000); + + switch (format) { + case 'year': + return date.getFullYear(); + case 'month': + return (date.getMonth() + 1).toString().padStart(2, '0'); // 月份从0开始 + case 'day': + return date.getDate().toString().padStart(2, '0'); + case 'hour': + return date.getHours().toString().padStart(2, '0'); + case 'minute': + return date.getMinutes().toString().padStart(2, '0'); + case 'second': + return date.getSeconds().toString().padStart(2, '0'); + default: + const options = { + year: 'numeric', + month: '2-digit', + day: '2-digit', + hour: '2-digit', + minute: '2-digit', + second: '2-digit', + timeZone: 'Asia/Shanghai', + }; + return date.toLocaleString('zh-CN', options); } }; app.config.globalProperties.$file = (e) => { - e = e || 'base/avatar.png'; + if (!e) { + return ''; + } + if (e.startsWith('http://') || e.startsWith('https://')) + return e; + else + return import.meta.env.VITE_OSS_URL + e; +}; +app.config.globalProperties.$file = (e) => { + if (!e) { + return ''; + } if (e.startsWith('http://') || e.startsWith('https://')) return e; else diff --git a/src/views/About.vue b/src/views/About.vue index 11f3b90..c33e8f8 100644 --- a/src/views/About.vue +++ b/src/views/About.vue @@ -1,44 +1,50 @@ - \ No newline at end of file + + + \ No newline at end of file diff --git a/src/views/Layout.vue b/src/views/Layout.vue index 087bad0..e7c7723 100644 --- a/src/views/Layout.vue +++ b/src/views/Layout.vue @@ -1,17 +1,10 @@