From 736adae554bb0e8a5fb6cef1a9713d85c68c25ea Mon Sep 17 00:00:00 2001 From: chenhao Date: Thu, 21 May 2026 17:23:54 +0800 Subject: [PATCH] feat: 5.21 update --- .env.development | 2 +- .env.production | 2 +- src/components/ManagerPopup.vue | 2 +- src/main.js | 19 ++++- src/router.js | 30 ++----- src/styles/ch.less | 10 +++ src/styles/public.less | 43 +++++----- src/styles/tailwind.less | 2 +- src/views/Account/Login.vue | 13 +-- src/views/Goods/GoodsDetail.vue | 2 - src/views/Index.vue | 11 ++- src/views/Platform/ColumnDetail.vue | 7 ++ src/views/Tabbars/Home.vue | 126 ++++------------------------ src/views/User/My.vue | 4 +- 14 files changed, 99 insertions(+), 174 deletions(-) diff --git a/.env.development b/.env.development index b1704f7..45c63c5 100644 --- a/.env.development +++ b/.env.development @@ -1,2 +1,2 @@ VITE_API_URL = "https://m.taigurun.cn" -VITE_OSS_URL = "https://m.taigurun.cn" \ No newline at end of file +VITE_OSS_URL = "https://m.taigurun.cn/uploads" \ No newline at end of file diff --git a/.env.production b/.env.production index b1704f7..45c63c5 100644 --- a/.env.production +++ b/.env.production @@ -1,2 +1,2 @@ VITE_API_URL = "https://m.taigurun.cn" -VITE_OSS_URL = "https://m.taigurun.cn" \ No newline at end of file +VITE_OSS_URL = "https://m.taigurun.cn/uploads" \ No newline at end of file diff --git a/src/components/ManagerPopup.vue b/src/components/ManagerPopup.vue index 920ee9c..ab29cc5 100644 --- a/src/components/ManagerPopup.vue +++ b/src/components/ManagerPopup.vue @@ -101,7 +101,7 @@ export default { this.$showConfirmDialog({ title: "确认退出?", }).then(() => { - this.$ls.remove('token'); + this.$ls.remove('member_token'); location.replace('#/Login'); setTimeout(() => { location.reload(); diff --git a/src/main.js b/src/main.js index 50a8fc3..3284a7c 100644 --- a/src/main.js +++ b/src/main.js @@ -53,9 +53,24 @@ datadicStore.init() const userStore = useUserStore() +// 全局前置守卫 +router.beforeEach((to, from, next) => { + if (to.meta.title) { + document.title = to.meta.title; + } + if (to.meta.noLogin) { + return next(); + } + const isLogin = userStore.isLogin; + if (!isLogin) { + return next({ name: 'Login', query: { redirect: to.fullPath } }); + } + next(); +}); + app.config.globalProperties.$datadic = { - get: (code) => dictCache[code] || null, - getContent: (code) => dictCache[code] ? dictCache[code].contents : '', + get: (code) => dictCache[code] || null, + getContent: (code) => dictCache[code] ? dictCache[code].contents : '', } app.config.globalProperties.$userInfo = userStore.getUserInfo; diff --git a/src/router.js b/src/router.js index e8d402a..a4f3642 100644 --- a/src/router.js +++ b/src/router.js @@ -30,7 +30,7 @@ const routes = [ path: '/My', name: 'My', component: () => import('./views/User/My.vue'), - meta: { title: '我的' } + meta: { title: '我的', cache: true } }, ], meta: { noLogin: true } @@ -176,31 +176,31 @@ const routes = [ path: '/Business_School', name: 'Business_School', component: () => import('./views/Platform/Business_School.vue'), - meta: { title: '商学院' } + meta: { title: '商学院', noLogin: true, } }, { path: '/School_detail', name: 'School_detail', component: () => import('./views/Platform/School_Detail.vue'), - meta: { title: '商学院详情' } + meta: { title: '商学院详情', noLogin: true, } }, { path: '/School_Category', name: 'School_Category', component: () => import('./views/Platform/School_Category.vue'), - meta: { title: '商学院分类' } + meta: { title: '商学院分类', noLogin: true, } }, { path: '/Column', name: 'Column', component: () => import('./views/Platform/Column.vue'), - meta: { title: '栏目列表' } + meta: { title: '栏目列表', noLogin: true, } }, { path: '/ColumnDetail', name: 'ColumnDetail', component: () => import('./views/Platform/ColumnDetail.vue'), - meta: { title: '栏目详情' } + meta: { title: '栏目详情', noLogin: true, } }, { path: '/GoodsDetail', @@ -212,7 +212,7 @@ const routes = [ path: '/Category', name: 'Category', component: () => import('./views/Goods/Category.vue'), - meta: { title: '全部分类' } + meta: { title: '全部分类', noLogin: true, } }, { path: '/Operations', @@ -340,19 +340,3 @@ const router = createRouter({ }) export default router - -// 全局前置守卫 -router.beforeEach((to, from, next) => { - const userStore = useUserStore(); - if (to.meta.title) { - document.title = to.meta.title; - } - if (to.meta.noLogin) { - return next(); - } - const isLogin = userStore.isLogin; - if (!isLogin) { - return next({ name: 'Login', query: { redirect: to.fullPath } }); - } - next(); -}); diff --git a/src/styles/ch.less b/src/styles/ch.less index c8d097e..fb7a732 100644 --- a/src/styles/ch.less +++ b/src/styles/ch.less @@ -134,6 +134,10 @@ .box-center-center; margin-top: 5.6vw; width: 100%; + + a { + color: #f00; + } } .toLogin { @@ -5058,12 +5062,18 @@ } .list { + .box; + .box-tb; + .box-align-center; + width: 100%; margin-top: 4vw; padding: 0 4vw; + overflow: hidden; .item { .box; .box-align-center; + width: 100%; margin-bottom: 4vw; img { diff --git a/src/styles/public.less b/src/styles/public.less index 84e16f5..e6ecd79 100644 --- a/src/styles/public.less +++ b/src/styles/public.less @@ -2303,14 +2303,11 @@ img { max-width: 80vw; max-height: 90vh; overflow-y: auto; - border-radius: 2.67vw; .share_box { .box; .box-tb; - .box-align-center; - .box-pack-center; margin: 0 auto; padding: 6.8vw 9.2vw; width: 100%; @@ -2321,21 +2318,35 @@ img { border-radius: 2.67vw; } - .logo { - width: 18.93vw; - height: 22.27vw; - } - .bottom_box { .box; .box-align-center; .box-pack-around; width: 100%; + padding: 3.33vw 0; + + .logo { + width: 18.93vw; + height: 22.27vw; + } + + .qrcode { + .box; + .box-tb; + .box-align-center; + + img { + width: 17.07vw; + height: 17.07vw; + margin-bottom: 1.2vw; + } + } } .share_userinfo { .box; .box-align-center; + margin: 0 auto; position: relative; img { @@ -2357,7 +2368,7 @@ img { // padding: 1.2vw 4vw 6vw; padding-left: 6vw; padding-right: 4vw; - margin-left: -3.33vw; + margin-left: -4.33vw; height: 8vw; text-align: center; @@ -2412,20 +2423,6 @@ img { } } - .qrcode { - .box; - .box-tb; - .box-align-center; - margin-top: 3.33vw; - padding-bottom: 3vw; - - img { - width: 17.07vw; - height: 17.07vw; - margin-bottom: 1.2vw; - } - } - .share_result { // margin-top: 4vw; text-align: center; diff --git a/src/styles/tailwind.less b/src/styles/tailwind.less index 9db9bb7..3593efa 100644 --- a/src/styles/tailwind.less +++ b/src/styles/tailwind.less @@ -161,7 +161,7 @@ a { .box { display: flex; flex-wrap: nowrap; - flex-shrink: 0; + // flex-shrink: 0; } /*从左至右*/ diff --git a/src/views/Account/Login.vue b/src/views/Account/Login.vue index d72737c..2a0de54 100644 --- a/src/views/Account/Login.vue +++ b/src/views/Account/Login.vue @@ -83,7 +83,7 @@ 邀请人
- +
@@ -314,10 +314,10 @@ export default { return } // 验证用户输入的验证码与接口返回的是否一致 - if (this.formData.SmsCode !== this.smsCode) { - this.$showFailToast?.('验证码错误') - return - } + // if (this.formData.SmsCode !== this.smsCode) { + // this.$showFailToast?.('验证码错误') + // return + // } if (!this.formData.Password) { this.$showFailToast?.('请输入密码') return @@ -335,7 +335,8 @@ export default { this.$post('/v1/client/AuthClient/register', { cellphone: this.formData.Phone, userpwd: this.formData.Password, - pcellphone: this.formData.Recommend + pcellphone: this.formData.Recommend, + code: this.formData.SmsCode }).then(data => { this.loading = false if (data.status !== 200) { diff --git a/src/views/Goods/GoodsDetail.vue b/src/views/Goods/GoodsDetail.vue index b304b32..0ee7b52 100644 --- a/src/views/Goods/GoodsDetail.vue +++ b/src/views/Goods/GoodsDetail.vue @@ -125,8 +125,6 @@