This commit is contained in:
那些花儿
2025-05-14 18:25:35 +08:00
parent 31709a69f8
commit 8eeb4843ee
8 changed files with 2439 additions and 66 deletions
+2 -2
View File
@@ -133,7 +133,7 @@
<view class="footer-info">
<view class="footer-item">主办单位:浙江省教育工会</view>
<view class="footer-item">承办单位:杭州医学院工会</view>
<view class="footer-item">技术支持:武汉地大三思科技有限公司</view>
<view class="footer-item">技术支持:武汉地大三思科技有限公司(智慧工会提供商)</view>
</view>
</view>
</template>
@@ -531,7 +531,7 @@ body {
}
.footer-item {
font-size: 12px;
font-size: 12.5px;
color: #999;
line-height: 1.8;
}
+2 -2
View File
@@ -138,7 +138,7 @@
<view class="footer-info">
<view class="footer-item">主办单位:浙江省教育工会</view>
<view class="footer-item">承办单位:杭州医学院工会</view>
<view class="footer-item">技术支持:武汉地大三思科技有限公司</view>
<view class="footer-item">技术支持:武汉地大三思科技有限公司(智慧工会提供商)</view>
</view>
<!-- 自定义单位选择弹窗 -->
@@ -703,7 +703,7 @@ onMounted(() => {
}
.footer-item {
font-size: 12px;
font-size: 12.5px;
color: #999;
line-height: 1.8;
}
+16 -5
View File
@@ -12,14 +12,26 @@ export const setupRouterInterceptor = (whiteList = []) => {
}
export const checkAuth = async () => {
if (process.env.VUE_APP_PLATFORM === 'h5' && window.location.pathname !== '/') {
const path = window.location.pathname.replace(/^\//, '')
if (!getDefaultWhiteList().includes(path)) {
if (process.env.VUE_APP_PLATFORM === 'h5') {
if(window.location.pathname !== '/'){
const path = window.location.pathname.replace(/^\//, '')
if (!getDefaultWhiteList().includes(path)) {
const token = uni.getStorageSync('token')
if (token) {
await useUserStore().getUserInfo()
} else {
uni.setStorageSync('REDIRECT_URL', window.location.pathname + window.location.search)
await uni.redirectTo({
url: '/pages/login/index'
})
}
}
}else{
const token = uni.getStorageSync('token')
if (token) {
await useUserStore().getUserInfo()
} else {
uni.setStorageSync('REDIRECT_URL', window.location.pathname + window.location.search)
uni.setStorageSync('REDIRECT_URL', '/pages/index/index')
await uni.redirectTo({
url: '/pages/login/index'
})
@@ -120,7 +132,6 @@ async function routeInterceptor(args, whiteList) {
*/
export const getDefaultWhiteList = () => {
return [
'/pages/index/index',
'/pages/login/index',
'/pages/login/register',
'/pages/activity/list/index'