权限调整

This commit is contained in:
hb 2025-08-04 15:23:50 +08:00
parent db15ca50e2
commit a1bce6f7b5
18 changed files with 963 additions and 109 deletions

View File

@ -63,6 +63,14 @@ export const checkOpenId = async (param: {
export const updateUserApi = async (param: any) => {
return await post("/open/login/js/updateUser", param);
};
export const updateSignFileApi = async (param: { userId: number; signFile: string }) => {
return await post("/api/user/updateSignFile", {
id: param.userId,
signFile: param.signFile
});
};
export const findJsByPhoneApi = async (param: any) => {
return await get("/api/js/findJsByPhone", param);
};

View File

@ -57,6 +57,15 @@
}
}
},
{
"path": "pages/system/subscribe/index",
"style": {
"navigationStyle": "custom",
"navigationBarTitleText": "关注服务号",
"enablePullDownRefresh": false,
"backgroundColor": "#f4f5f7"
}
},
{
"path": "pages/system/webView/webView",
"style": {
@ -242,6 +251,13 @@
"enablePullDownRefresh": false
}
},
{
"path": "pages/base/course-selection/noticeclub",
"style": {
"navigationBarTitleText": "告知书",
"enablePullDownRefresh": false
}
},
{
"path": "pages/base/course-selection/enrolled",
"style": {
@ -254,6 +270,14 @@
"navigationBarTitleText": "未开放",
"enablePullDownRefresh": false
}
},
{
"path": "pages/base/course-selection/enrollment-ended",
"style": {
"navigationBarTitleText": "选课已结束",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}
],
"globalStyle": {

View File

@ -1,7 +1,6 @@
<template>
<view class="countdown-section">
<template v-if="!isEnrollmentEnded">
<view class="countdown-title">{{ countdownTitle }}</view>
<view class="countdown-timer">
<view class="time-block">
<text class="time-value">{{ countdownTime.hours }}</text>
@ -20,10 +19,21 @@
</view>
</template>
<template v-else>
<view class="enrollment-ended">
<view class="enrollment-ended" v-if="isEnrollmentEnded && isCourseEnded">
<u-icon name="info-circle" color="#FF9900" size="20"></u-icon>
<text>选课已经结束</text>
</view>
<view class="enrollment-started" v-else-if="isEnrollmentEnded && !isCourseEnded">
<view class="enrollment-content">
<view class="enrollment-title">
<u-icon name="clock" color="#4CAF50" size="16"></u-icon>
<text>报名结束时间</text>
</view>
<view class="enrollment-date">
<text>{{ formatEndTime }}</text>
</view>
</view>
</view>
</template>
</view>
</template>
@ -48,17 +58,20 @@ const countdownTime = reactive({
const kcStatus = ref(false);
//
const countdownTitle = computed(() => {
return kcStatus.value ? "距离选课结束还剩" : "距离选课开始还剩";
});
//
let countdownTimer: number | null = null;
const remainTime = ref("00:00:00");
//
const isEnrollmentEnded = ref(false);
//
const isCourseEnded = ref(false);
//
const formatEndTime = computed(() => {
if (!props.xk || !props.xk.xkjstime) return '';
return dayjs(props.xk.xkjstime).format('YYYY-MM-DD');
});
//
const startCountdown = (endTimeStamp: number) => {
@ -82,26 +95,10 @@ const startCountdown = (endTimeStamp: number) => {
countdownTimer = null;
}
//
if (!kcStatus.value) {
//
kcStatus.value = true; //
uni.showToast({
title: "选课已开始",
icon: "none",
});
//
const xkjstime = dayjs(props.xk.xkjstime).valueOf();
startCountdown(xkjstime);
} else {
//
isEnrollmentEnded.value = true; //
emit("over");
uni.showToast({
title: "选课已结束",
icon: "none",
});
}
//
isEnrollmentEnded.value = true; //
isCourseEnded.value = false; //
emit("over");
return;
}
@ -134,22 +131,29 @@ const changeXk = (xk: any) => {
//
const xkjstime = dayjs(xk.xkjstime).valueOf();
//
if (now > xkjstime) {
kcStatus.value = true;
// >=
if (now >= xkjstime) {
isEnrollmentEnded.value = true;
isCourseEnded.value = true;
countdownTime.hours = "00";
countdownTime.minutes = "00";
countdownTime.seconds = "00";
return;
}
//
else if (now < xkkstime) {
kcStatus.value = false;
startCountdown(xkkstime);
} else {
kcStatus.value = true;
startCountdown(xkjstime);
// >= <
if (now >= xkkstime && now < xkjstime) {
isEnrollmentEnded.value = true;
isCourseEnded.value = false;
countdownTime.hours = "00";
countdownTime.minutes = "00";
countdownTime.seconds = "00";
return;
}
// <
kcStatus.value = false;
startCountdown(xkkstime);
}
//
@ -174,38 +178,37 @@ if (props.xk && props.xk.id) {
<style lang="scss" scoped>
.countdown-section {
.countdown-title {
font-size: 14px;
margin-bottom: 8px;
}
.countdown-timer {
display: flex;
align-items: center;
gap: 4px;
.time-block {
background-color: rgba(255, 255, 255, 0.2);
border-radius: 6px;
min-width: 40px;
padding: 5px 8px;
border-radius: 4px;
min-width: 30px;
padding: 3px 5px;
text-align: center;
.time-value {
font-size: 20px;
font-weight: bold;
display: block;
}
.time-value {
font-size: 14px;
font-weight: bold;
display: block;
line-height: 1;
color: #fff;
}
.time-unit {
font-size: 12px;
font-size: 9px;
opacity: 0.9;
line-height: 1;
}
}
.time-separator {
font-size: 20px;
font-size: 14px;
font-weight: bold;
margin: 0 5px;
margin: 0 1px;
}
}
@ -216,12 +219,49 @@ if (props.xk && props.xk.id) {
justify-content: center;
background-color: rgba(255, 255, 255, 0.2);
border-radius: 8px;
padding: 12px 15px;
font-size: 16px;
padding: 8px 12px;
font-size: 14px;
font-weight: 500;
color: #fff;
gap: 8px;
gap: 6px;
}
/* 选课已开始样式 */
.enrollment-started {
display: flex;
align-items: center;
justify-content: center;
background-color: rgba(76, 175, 80, 0.2);
border-radius: 8px;
padding: 8px 12px;
font-size: 12px;
font-weight: 500;
color: #fff;
text-align: center;
line-height: 1.3;
.enrollment-content {
display: flex;
flex-direction: column;
align-items: center;
gap: 4px;
.enrollment-title {
display: flex;
align-items: center;
gap: 4px;
font-size: 11px;
opacity: 0.9;
}
.enrollment-date {
font-size: 14px;
font-weight: bold;
color: #fff;
}
}
}
}
</style>

View File

@ -117,13 +117,6 @@ const loadXkList = async () => {
const switchXk = (xk: any) => {
curXk.value = xk;
showFlag.value = false;
if (xk && xk.id) {
//
uni.showToast({
title: `已切换到${xk.xkmc}`,
icon: "none",
});
}
emit("change", xk);
}

View File

@ -9,15 +9,17 @@
:class="{ selected: xkkc.isSelected }"
@click="toggleSelection(xkkc)"
>
<view class="course-name">{{ xkkc.kcmc }}</view>
<view class="course-header">
<view class="course-name">{{ xkkc.kcmc }}</view>
<view class="detail-btn" @click.stop="goToDetail(xkkc)">
<image src="/static/base/home/details.svg" class="detail-icon" />
</view>
</view>
<view class="register-info">
<text>报名情况</text>
<text class="register-count">{{ xkkc.hasNum || 0 }}</text>
<text> | {{ xkkc.maxNum || 0 }}</text>
</view>
<view class="detail-btn" @click.stop="goToDetail(xkkc)"
>详情</view
>
<view v-if="xkkc.isSelected" class="selected-mark">
<uni-icons
type="checkbox-filled"
@ -179,29 +181,40 @@ if (props.xk && props.xk.xkkcs) {
box-shadow: 0 2px 8px rgba(63, 191, 114, 0.15);
}
.course-name {
font-size: 16px;
font-weight: 500;
color: #333;
.course-header {
display: flex;
justify-content: space-between;
align-items: flex-start;
margin-bottom: 10px;
.course-name {
font-size: 16px;
font-weight: 500;
color: #333;
flex: 1;
margin-right: 10px;
}
.detail-btn {
flex-shrink: 0;
padding: 4px;
.detail-icon {
width: 20px;
height: 20px;
}
}
}
.register-info {
font-size: 14px;
color: #666;
margin-bottom: 12px;
.register-count {
color: #2879ff;
}
}
.detail-btn {
display: inline-block;
color: #2879ff;
font-size: 14px;
}
.selected-mark {
position: absolute;
top: -6px;

View File

@ -86,21 +86,21 @@ const switchXs = (xs: any) => {
setCurXs(xs);
showFlag.value = false;
emit('change', xs);
//
uni.showToast({
title: `已切换到${xs.xm}`,
icon: "none",
});
}
//
const setCurrentStudent = (xs: any) => {
setCurXs(xs);
emit('change', xs);
}
// bar
if (props.isBar
//&& (getCurXs === null || !getCurXs.id)
) {
if (props.isBar) {
if (getUser.xsList.length > 1 ) {
showPicker();
} else {
switchXs(getUser.xsList[0]);
//
setCurrentStudent(getUser.xsList[0]);
}
}
</script>

View File

@ -3,12 +3,15 @@
<!-- 选课信息头部 - 固定部分 -->
<view class="selection-header">
<view class="header-content">
<!-- 选课类型选择部分 -->
<XkPicker title="俱乐部信息" :is-qk="true" xklx-id="816059832" :xs-id="curXs.id" @change="switchXk" v-if="!xsFlag" />
<!-- 学生选择部分 -->
<XsPicker :is-bar="true" @change="switchXs" />
<!-- 倒计时-->
<XkCountdown :xk="curXk" @over="xkTimeOver" v-if="curXk && curXk.id" />
<!-- 第一行选课类型选择 -->
<view class="top-row" v-if="!xsFlag">
<XkPicker title="俱乐部信息" :is-qk="true" xklx-id="816059832" :xs-id="curXs.id" @change="switchXk" />
</view>
<!-- 第二行学生选择和倒计时 -->
<view class="bottom-row">
<XsPicker :is-bar="true" @change="switchXs" />
<XkCountdown :xk="curXk" @over="xkTimeOver" v-if="curXk && curXk.id" />
</view>
</view>
</view>
@ -35,6 +38,7 @@ import XkkcList from "@/pages/base/components/XkkcList/index.vue"
import { jzXkQkjApi } from "@/api/base/server";
import { useUserStore } from "@/store/modules/user";
import { useDataStore } from "@/store/modules/data";
import dayjs from "dayjs";
const { getCurXs, getUser } = useUserStore();
const { setData, getData } = useDataStore();
@ -46,9 +50,31 @@ const selectedXkkcIds = ref<any>([]);
const xsFlag = ref(true);
//
const checkEnrollmentStatus = (xk: any) => {
if (!xk || !xk.xkjstime) return;
const now = new Date().getTime();
const endTime = new Date(xk.xkjstime).getTime();
if (now > endTime) {
//
const courseInfo = encodeURIComponent(JSON.stringify(xk));
uni.navigateTo({
url: `/pages/base/course-selection/enrollment-ended?courseInfo=${courseInfo}`
});
return true;
}
return false;
};
//
const switchXk = (xk: any) => {
curXk.value = xk;
//
if (checkEnrollmentStatus(xk)) {
return;
}
}
const switchXs = (xs: any) => {
@ -57,7 +83,9 @@ const switchXs = (xs: any) => {
//
const xkTimeOver = (val: any) => {
console.log(val);
console.log('选课时间结束:', val);
//
//
}
//
@ -75,6 +103,21 @@ const submit = async () => {
});
return;
}
//
if (curXk.value && curXk.value.xkkstime) {
const now = dayjs().valueOf();
const startTime = dayjs(curXk.value.xkkstime).valueOf();
if (now < startTime) {
uni.showToast({
title: "选课还未开始,请耐心等待!",
icon: "none",
});
return;
}
}
uni.showLoading({
title: "抢课中...",
});
@ -173,6 +216,36 @@ const submit = async () => {
flex-direction: column;
gap: 15px;
.top-row {
display: flex;
align-items: center;
:deep(.title-section) {
width: 100%;
}
}
.bottom-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 15px;
//
:deep(.xs-bar) {
flex: 1;
min-width: 0;
}
//
:deep(.countdown-section) {
flex-shrink: 0;
background: rgba(255, 255, 255, 0.1);
border-radius: 6px;
padding: 6px 10px;
backdrop-filter: blur(10px);
}
}
}
}

View File

@ -161,7 +161,7 @@ const courseDetail = computed(() => {
location: data.kcdd || "暂无地点信息",
price: data.kcje || 0,
studyTime: data.studyTime || "暂无上课时间",
xkkcImg: data.xkkcImg || "/static/images/robot-course.jpg", //
xkkcImg: imagUrl(data.xkkcImg), // 使imagUrl
};
});

View File

@ -0,0 +1,291 @@
<template>
<view class="enrollment-ended-page">
<view class="ended-container">
<!-- 页面头部 -->
<view class="page-header">
<text class="page-title">选课已结束</text>
<text class="page-subtitle">本次选课活动已经结束感谢您的参与</text>
</view>
<!-- 主要信息显示区域 -->
<view class="main-content">
<view class="content-card">
<view class="icon-section">
<u-icon name="clock" size="80" color="#FF6B6B" />
</view>
<view class="info-section">
<view class="info-item">
<text class="info-label">选课名称</text>
<text class="info-value">{{ courseInfo?.xkmc || '兴趣课选课' }}</text>
</view>
<view class="info-item">
<text class="info-label">选课时间</text>
<text class="info-value">{{ formatTime(courseInfo?.xkkstime) }} - {{ formatTime(courseInfo?.xkjstime) }}</text>
</view>
<view class="info-item">
<text class="info-label">结束时间</text>
<text class="info-value">{{ formatTime(courseInfo?.xkjstime) }}</text>
</view>
<view class="info-item" v-if="courseInfo?.qdmc">
<text class="info-label">选课地点</text>
<text class="info-value">{{ courseInfo.qdmc }}</text>
</view>
</view>
<view class="status-section">
<view class="status-badge">
<u-icon name="close-circle" size="16" color="#FF6B6B" />
<text class="status-text">选课已结束</text>
</view>
</view>
</view>
</view>
<!-- 提示信息 -->
<view class="tips-section">
<view class="tips-header">
<u-icon name="info-circle" size="16" color="#409EFF" />
<text class="tips-title">温馨提示</text>
</view>
<view class="tips-content">
<text class="tip-item"> 本次选课活动已经结束无法继续选课</text>
<text class="tip-item"> 如需了解选课结果请联系相关老师</text>
<text class="tip-item"> 下次选课时间请关注学校通知</text>
<text class="tip-item"> 如有疑问请联系学校教务处</text>
</view>
</view>
<!-- 操作按钮 -->
<view class="action-buttons">
<button @click="goBack" class="back-btn">
<u-icon name="arrow-left" size="16" color="#666" />
<text class="btn-text">返回首页</text>
</button>
<button @click="refreshPage" class="refresh-btn">
<u-icon name="reload" size="16" color="#409EFF" />
<text class="btn-text">刷新页面</text>
</button>
</view>
</view>
</view>
</template>
<script lang="ts" setup>
import { ref, onMounted } from 'vue';
import { onLoad } from '@dcloudio/uni-app';
//
const courseInfo = ref<any>(null);
onLoad((options) => {
//
if (options?.courseInfo) {
try {
courseInfo.value = JSON.parse(decodeURIComponent(options.courseInfo));
} catch (error) {
console.error('解析选课信息失败:', error);
}
}
});
//
const formatTime = (time: string) => {
if (!time) return '未设置';
const date = new Date(time);
return date.toLocaleString('zh-CN', {
year: 'numeric',
month: '2-digit',
day: '2-digit',
hour: '2-digit',
minute: '2-digit'
});
};
//
const goBack = () => {
uni.reLaunch({
url: '/pages/base/home/index'
});
};
//
const refreshPage = () => {
uni.reLaunch({
url: '/pages/base/course-selection/index'
});
};
</script>
<style lang="scss" scoped>
.enrollment-ended-page {
min-height: 100vh;
background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
padding: 20px;
box-sizing: border-box;
}
.ended-container {
max-width: 400px;
margin: 0 auto;
}
//
.page-header {
text-align: center;
margin-bottom: 30px;
.page-title {
display: block;
font-size: 28px;
font-weight: 600;
color: white;
margin-bottom: 8px;
}
.page-subtitle {
font-size: 16px;
color: rgba(255, 255, 255, 0.8);
}
}
//
.main-content {
margin-bottom: 30px;
}
.content-card {
background: white;
border-radius: 16px;
padding: 24px;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}
.icon-section {
display: flex;
justify-content: center;
margin-bottom: 20px;
}
.info-section {
margin-bottom: 20px;
.info-item {
display: flex;
margin-bottom: 12px;
.info-label {
font-size: 14px;
color: #666;
min-width: 80px;
font-weight: 500;
}
.info-value {
font-size: 14px;
color: #333;
flex: 1;
}
}
}
.status-section {
display: flex;
justify-content: center;
.status-badge {
display: flex;
align-items: center;
gap: 8px;
background: #fff5f5;
border: 1px solid #ff6b6b;
border-radius: 20px;
padding: 8px 16px;
.status-text {
font-size: 14px;
font-weight: 600;
color: #ff6b6b;
}
}
}
//
.tips-section {
background: rgba(255, 255, 255, 0.1);
border-radius: 12px;
padding: 20px;
backdrop-filter: blur(10px);
margin-bottom: 30px;
.tips-header {
display: flex;
align-items: center;
gap: 8px;
margin-bottom: 12px;
.tips-title {
font-size: 16px;
font-weight: 600;
color: white;
}
}
.tips-content {
.tip-item {
display: block;
font-size: 14px;
color: rgba(255, 255, 255, 0.9);
margin-bottom: 8px;
line-height: 1.4;
}
}
}
//
.action-buttons {
display: flex;
gap: 12px;
.back-btn, .refresh-btn {
flex: 1;
height: 44px;
border: none;
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
font-size: 16px;
}
.back-btn {
background: #f5f5f5;
color: #666;
}
.refresh-btn {
background: #409EFF;
color: white;
}
.btn-text {
font-size: 14px;
}
}
//
@media (max-width: 375px) {
.enrollment-ended-page {
padding: 15px;
}
.content-card {
padding: 20px;
}
.page-header .page-title {
font-size: 24px;
}
}
</style>

View File

@ -5,10 +5,11 @@
<view class="header-content">
<!-- 选课类型选择部分 -->
<XkPicker title="俱乐部信息" :is-qk="true" xklx-id="962488654" :xs-id="curXs.id" @change="switchXk" v-if="!xsFlag" />
<!-- 学生选择部分 -->
<XsPicker :is-bar="true" @change="switchXs" />
<!-- 倒计时-->
<XkCountdown :xk="curXk" @over="xkTimeOver" v-if="curXk && curXk.id" />
<!-- 学生选择和倒计时 -->
<view class="bottom-row">
<XsPicker :is-bar="true" @change="switchXs" />
<XkCountdown :xk="curXk" @over="xkTimeOver" v-if="curXk && curXk.id" />
</view>
</view>
</view>
@ -35,6 +36,7 @@ import XkkcList from "@/pages/base/components/XkkcList/index.vue"
import { jzXkQkjApi } from "@/api/base/server";
import { useUserStore } from "@/store/modules/user";
import { useDataStore } from "@/store/modules/data";
import dayjs from "dayjs";
const { getCurXs, getUser } = useUserStore();
const { setData, getData } = useDataStore();
@ -47,9 +49,31 @@ const selectedXkkcIds = ref<any>([]);
const xsFlag = ref(true);
//
const checkEnrollmentStatus = (xk: any) => {
if (!xk || !xk.xkjstime) return;
const now = new Date().getTime();
const endTime = new Date(xk.xkjstime).getTime();
if (now > endTime) {
//
const courseInfo = encodeURIComponent(JSON.stringify(xk));
uni.navigateTo({
url: `/pages/base/course-selection/enrollment-ended?courseInfo=${courseInfo}`
});
return true;
}
return false;
};
//
const switchXk = (xk: any) => {
curXk.value = xk;
//
if (checkEnrollmentStatus(xk)) {
return;
}
}
//
@ -59,7 +83,12 @@ const switchXs = (xs: any) => {
//
const xkTimeOver = (val: any) => {
console.log(val);
console.log('选课时间结束:', val);
//
const courseInfo = encodeURIComponent(JSON.stringify(curXk.value));
uni.navigateTo({
url: `/pages/base/course-selection/enrollment-ended?courseInfo=${courseInfo}`
});
}
//
@ -77,6 +106,21 @@ const submit = async () => {
});
return;
}
//
if (curXk.value && curXk.value.xkkstime) {
const now = dayjs().valueOf();
const startTime = dayjs(curXk.value.xkkstime).valueOf();
if (now < startTime) {
uni.showToast({
title: "选课还未开始,请耐心等待!",
icon: "none",
});
return;
}
}
uni.showLoading({
title: "抢课中...",
});
@ -174,6 +218,27 @@ const submit = async () => {
flex-direction: column;
gap: 15px;
.bottom-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 15px;
//
:deep(.xs-bar) {
flex: 1;
min-width: 0;
}
//
:deep(.countdown-section) {
flex-shrink: 0;
background: rgba(255, 255, 255, 0.1);
border-radius: 6px;
padding: 6px 10px;
backdrop-filter: blur(10px);
}
}
}
}

View File

@ -25,14 +25,19 @@
</template>
<script lang="ts" setup>
import { ref } from "vue";
import { xkgzsApi } from "@/api/base/server";
import { updateSignFileApi } from "@/api/system/login";
import { useDataStore } from "@/store/modules/data";
import { useUserStore } from "@/store/modules/user";
import { showLoading } from "@/utils/uniapp";
import { onLoad } from "@dcloudio/uni-app";
import BasicSign from "@/components/BasicSign/Sign.vue";
const signCompRef = ref<any>(null);
const sign_file = ref<any>(null);
const { setData, getGlobal } = useDataStore();
const userStore = useUserStore();
const notice = ref("");
onLoad(async () => {
@ -43,20 +48,46 @@ onLoad(async () => {
});
async function submit() {
//
try {
//
const data = await signCompRef.value.getSyncSignature();
sign_file.value = data.base64;
//
const userInfo = userStore.getUser;
// localStorage userdatasignFile
const hasExistingSignFile = userInfo && userInfo.signFile;
// localStorage userdatasignFile
setData({
sign_file: sign_file.value,
});
if (getGlobal.type == 1) {
// localStorage userdatasignFileAPIu_user
if (!hasExistingSignFile && userInfo && userInfo.userId) {
try {
await updateSignFileApi({
userId: userInfo.userId,
signFile: sign_file.value
});
console.log('签名数据已更新到后端数据库');
} catch (error) {
console.error('更新后端签名数据失败:', error);
// 使
}
}
//
uni.reLaunch({
url: "/pages/base/course-selection/index",
});
}
if (getGlobal.type == 2) {
uni.reLaunch({
url: "/pages/base/course-selection/club-selection",
} catch (error) {
console.error('提交签名失败:', error);
uni.showToast({
title: '签名提交失败',
icon: 'none'
});
}
}
@ -67,4 +98,4 @@ async function submit() {
margin-top: 10px;
text-indent: 2em; /* 添加两个中文字符的缩进 */
}
</style>
</style>

View File

@ -0,0 +1,73 @@
<template>
<BasicLayout>
<view class="p-15">
<view class="white-bg-color p-15 r-md" v-if="notice">
<view> 各位家长</view>
<view class="notice-text">
{{ notice }}
</view>
</view>
<BasicSign ref="signCompRef" title="签名"></BasicSign>
</view>
<template #bottom>
<view class="white-bg-color py-5">
<view class="flex-row items-center pb-10 pt-5">
<u-button
text="下一步"
class="mx-15"
type="primary"
@click="submit"
/>
</view>
</view>
</template>
</BasicLayout>
</template>
<script lang="ts" setup>
import { xkgzsApi } from "@/api/base/server";
import { useDataStore } from "@/store/modules/data";
import { showLoading } from "@/utils/uniapp";
import { onLoad } from "@dcloudio/uni-app";
const signCompRef = ref<any>(null);
const sign_file = ref<any>(null);
const { setData, getGlobal } = useDataStore();
const notice = ref("");
onLoad(async () => {
showLoading({ title: "加载中..." });
const res = await xkgzsApi({ kcLx: "俱乐部" });
notice.value = res.rows?.[0]?.content || "";
uni.hideLoading();
});
async function submit() {
//
const data = await signCompRef.value.getSyncSignature();
sign_file.value = data.base64;
setData({
sign_file: sign_file.value,
});
uni.reLaunch({
url: "/pages/base/course-selection/club-selection",
});
/*if (getGlobal.type == 1) {
uni.reLaunch({
url: "/pages/base/course-selection/index",
});
}
if (getGlobal.type == 2) {
uni.reLaunch({
url: "/pages/base/course-selection/club-selection",
});
}*/
}
</script>
<style lang="scss" scoped>
.notice-text {
margin-top: 10px;
text-indent: 2em; /* 添加两个中文字符的缩进 */
}
</style>

View File

@ -90,7 +90,7 @@ const { setData, getAppCode } = useDataStore();
//
const { getLastRefreshTime, getRefreshInterval, setLastRefreshTime, updateStudentInfo, updateStudentList } = useUserStore();
const REFRESH_INTERVAL = 10 * 60 * 1000; // 10
const REFRESH_INTERVAL = 7 * 24 * 60 * 60 * 1000; // 17
// changeTime
const getCurrentChangeTime = () => {
@ -209,6 +209,18 @@ const menuItems = ref([
path: "/pages/base/club/index",
permissionKey: "school-jlb", //
},
{
title: "兴趣课选课",
icon: "/static/base/home/file-text-line.png",
path: "/pages/base/course-selection/notice",
permissionKey: "school-xqkxk", //
},
{
title: "俱乐部选课",
icon: "/static/base/home/contacts-book-3-line.png",
path: "/pages/base/course-selection/noticeclub",
permissionKey: "school-jlbxk", //
},
]);
//
@ -328,8 +340,43 @@ onMounted(async () => {
}
}
}
//
await checkSubscribeStatus();
});
//
const checkSubscribeStatus = async () => {
const userStore = useUserStore();
const userInfo = userStore.getUser;
if (userInfo && !userInfo.subscribed) {
//
setTimeout(() => {
showSubscribeReminder();
}, 2000);
}
};
//
const showSubscribeReminder = () => {
uni.showModal({
title: '关注服务号',
content: '请先关注我们的服务号,以便接收重要通知',
showCancel: true,
cancelText: '稍后关注',
confirmText: '立即关注',
success: (res) => {
if (res.confirm) {
//
uni.navigateTo({
url: '/pages/system/subscribe/index'
});
}
}
});
};
//
onShow(async () => {
await checkAndRefreshStudentInfo();

View File

@ -54,6 +54,7 @@ onLoad(async (data: any) => {
}
}
//
toHome(data);
} else {
uni.reLaunch({

View File

@ -265,7 +265,7 @@ function toHome() {
});
} else if (getGlobal.type == 2) {
uni.reLaunch({
url: "/pages/base/course-selection/club-selection",
url: "/pages/base/course-selection/noticeclub",
});
} else {
uni.reLaunch({

View File

@ -0,0 +1,194 @@
<template>
<view class="subscribe-page">
<!-- 内容区域 -->
<view class="content-container">
<!-- 二维码区域 -->
<view class="qr-section">
<view class="qr-container">
<image src="/static/base/home/rdcode.jpg" class="qr-code" mode="aspectFit"></image>
</view>
<text class="qr-tip">请长按二维码识别并关注我们的服务号</text>
</view>
<!-- 关注好处 -->
<view class="benefits-section">
<view class="section-title">
<text class="title-text">关注后可享受</text>
</view>
<view class="benefits-list">
<view class="benefit-item">
<view class="benefit-icon">
<uni-icons type="notification" size="20" color="#4A90E2"></uni-icons>
</view>
<view class="benefit-content">
<text class="benefit-title">重要通知</text>
<text class="benefit-desc">及时接收学校重要通知和公告</text>
</view>
</view>
<view class="benefit-item">
<view class="benefit-icon">
<uni-icons type="calendar" size="20" color="#4A90E2"></uni-icons>
</view>
<view class="benefit-content">
<text class="benefit-title">课程安排</text>
<text class="benefit-desc">课程变更和安排调整实时推送</text>
</view>
</view>
<view class="benefit-item">
<view class="benefit-icon">
<uni-icons type="star" size="20" color="#4A90E2"></uni-icons>
</view>
<view class="benefit-content">
<text class="benefit-title">成绩查询</text>
<text class="benefit-desc">考试成绩发布第一时间通知</text>
</view>
</view>
<view class="benefit-item">
<view class="benefit-icon">
<uni-icons type="checkmarkempty" size="20" color="#4A90E2"></uni-icons>
</view>
<view class="benefit-content">
<text class="benefit-title">请假审批</text>
<text class="benefit-desc">请假申请审批结果及时反馈</text>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script setup lang="ts">
import { useDataStore } from '@/store/modules/data';
const { getGlobal } = useDataStore();
//
</script>
<style lang="scss" scoped>
.subscribe-page {
min-height: 100vh;
background: linear-gradient(135deg, #f4f5f7 0%, #e8f0ff 100%);
display: flex;
flex-direction: column;
padding: 40rpx 30rpx;
}
.content-container {
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
gap: 40rpx;
}
.qr-section {
background: white;
border-radius: 24rpx;
padding: 60rpx 40rpx;
text-align: center;
box-shadow: 0 8rpx 32rpx rgba(0, 0, 0, 0.1);
width: 100%;
max-width: 600rpx;
}
.qr-container {
margin-bottom: 30rpx;
}
.qr-code {
width: 400rpx;
height: 400rpx;
border-radius: 16rpx;
box-shadow: 0 12rpx 36rpx rgba(0, 0, 0, 0.15);
}
.qr-tip {
font-size: 32rpx;
color: #333;
line-height: 1.5;
font-weight: 500;
}
.benefits-section {
background: white;
border-radius: 24rpx;
padding: 40rpx 30rpx;
box-shadow: 0 8rpx 32rpx rgba(0, 0, 0, 0.1);
width: 100%;
max-width: 600rpx;
}
.section-title {
margin-bottom: 40rpx;
text-align: center;
}
.title-text {
font-size: 36rpx;
font-weight: 600;
color: #333;
position: relative;
padding-left: 24rpx;
&::before {
content: '';
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%);
width: 8rpx;
height: 32rpx;
background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
border-radius: 4rpx;
}
}
.benefits-list {
display: flex;
flex-direction: column;
gap: 30rpx;
}
.benefit-item {
display: flex;
align-items: flex-start;
gap: 24rpx;
}
.benefit-icon {
width: 80rpx;
height: 80rpx;
background: linear-gradient(135deg, #f0f4ff 0%, #e6f0ff 100%);
border-radius: 16rpx;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
box-shadow: 0 6rpx 16rpx rgba(74, 144, 226, 0.15);
}
.benefit-content {
flex: 1;
display: flex;
flex-direction: column;
gap: 12rpx;
}
.benefit-title {
font-size: 32rpx;
font-weight: 500;
color: #333;
}
.benefit-desc {
font-size: 28rpx;
color: #666;
line-height: 1.5;
}
</style>

View File

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1754283033015" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="10483" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M511.812 929.397c-230.391 0-417.826-187.434-417.826-417.821 0-230.391 187.434-417.826 417.826-417.826 230.386 0 417.821 187.434 417.821 417.826 0 230.386-187.436 417.821-417.821 417.821zM511.812 137.482c-206.277 0-374.092 167.815-374.092 374.093 0 206.273 167.815 374.089 374.092 374.089 206.273 0 374.089-167.815 374.089-374.089 0-206.277-167.815-374.093-374.089-374.093z" p-id="10484" fill="#1296db"></path><path d="M589.938 510.195l-164.817 164.817 30.521 30.521 195.339-195.339-195.339-195.339-30.521 30.521z" p-id="10485" fill="#1296db"></path></svg>

After

Width:  |  Height:  |  Size: 889 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB