This commit is contained in:
zhengziru
2025-09-28 13:52:01 +08:00
parent d82a73d2a9
commit 923a23b89f
11 changed files with 60 additions and 40 deletions
+32 -13
View File
@@ -89,7 +89,7 @@
</view>
<view class="event-item-section-content">{{ item.rule }}</view>
</view>
<view class="event-item-section">
<view class="event-item-section-title">
<t-icon name="help-circle" size="16px" color="var(--td-brand-color-5)"/>
@@ -130,6 +130,7 @@ import {onLoad} from '@dcloudio/uni-app';
import {Toast} from 'tdesign-mobile-vue';
import {useRequest} from "@/utils/request";
import {config} from "@/utils/config";
import moment from "moment";
const request = useRequest();
const actId = ref(null);
@@ -139,28 +140,46 @@ const detailData = ref(null);
// 格式化日期
const formatDate = (dateStr) => {
if (!dateStr) return '';
try {
const date = new Date(dateStr);
return `${date.getFullYear()}.${(date.getMonth() + 1).toString().padStart(2, '0')}.${date.getDate().toString().padStart(2, '0')} ${date.getHours().toString().padStart(2, '0')}:${date.getMinutes().toString().padStart(2, '0')}`;
} catch (error) {
return dateStr;
}
return moment(dateStr).format('YYYY.MM.DD HH:mm');
// try {
// // 手动解析日期部分
// const [datePart, timePart] = dateStr.split(' ');
// const [year, month, day] = datePart.split('-').map(Number);
// const [hours, minutes, seconds] = timePart.split(':').map(Number);
//
// // 创建日期对象(月份需要减1)
// const date = new Date(year, month - 1, day, hours, minutes, seconds);
//
// // 检查日期是否有效
// if (isNaN(date.getTime())) {
// return dateStr;
// }
//
// return `${date.getFullYear()}.${(date.getMonth() + 1).toString().padStart(2, '0')}.${date.getDate().toString().padStart(2, '0')} ${date.getHours().toString().padStart(2, '0')}:${date.getMinutes().toString().padStart(2, '0')}`;
// } catch (error) {
// return dateStr;
// }
};
// 底部按钮文字
const bottomButton = computed(() => {
const {signStartTime, signEndTime} = detailData.value
if (signStartTime && signEndTime) {
const now = new Date();
const startTime = new Date(signStartTime);
const endTime = new Date(signEndTime);
if (now >= startTime && now <= endTime) {
// const now = new Date();
// const startTime = new Date(signStartTime);
// const endTime = new Date(signEndTime);
const now = moment();
const startTime = moment(signStartTime);
const endTime = moment(signEndTime);
if (now.isBetween(startTime, endTime, null, '[]')) {
return {
text: isSignUp.value ? '修改报名信息' : '立即报名',
disabled: false,
onClick: navigateToSignUp
}
} else if (now < startTime) {
} else if (now.isBefore(startTime)) {
return {
text: `报名开始时间:${formatDate(signStartTime)}`,
disabled: true,
@@ -510,7 +529,7 @@ onLoad((option) => {
max-height: 200rpx;
overflow: hidden;
position: relative;
&::after {
content: '';
position: absolute;
@@ -44,7 +44,7 @@
show-error-message
label-align="left"
scroll-to-first-error="auto"
labelWidth="90px"
labelWidth="100px"
:requiredMark="true"
>
<!-- <view class="form-block">-->
@@ -89,9 +89,9 @@
<t-radio :block="false" label="女" value="女"/>
</t-radio-group>
</t-form-item>
<t-form-item label="体重" :name="`userList[${index}].weight`"
<t-form-item label="体重(KG)" :name="`userList[${index}].weight`"
:rules="[{required:true,message: '请输入体重'}]">
<t-input placeholder="0.00" suffix="KG" type="number" borderless v-model="user.weight"></t-input>
<t-input placeholder="0.00" suffix="拔河比赛分组需要" type="number" borderless v-model="user.weight"></t-input>
</t-form-item>
<t-form-item label="单位名称">
<t-input v-model="user.unitName" borderless placeholder="请输入单位名称" readonly></t-input>
@@ -116,8 +116,8 @@
<t-radio :block="false" name="radio" :value="false" label="否"/>
</t-radio-group>
</t-form-item>
<t-form-item label="是否联系人" :name="`userList[${index}].isContacts`"
:rules="[{required:true,message: '请选择是否为联系人'}]">
<t-form-item label="是否联络员" :name="`userList[${index}].isContacts`"
:rules="[{required:true,message: '请选择是否为联络员'}]">
<t-radio-group v-model="user.isContacts" class="radio-box">
<t-radio :block="false" name="radio" :value="true" label="是"/>
<t-radio :block="false" name="radio" :value="false" label="否"/>
+3 -3
View File
@@ -2,7 +2,7 @@
<view class="page-container">
<view class="header">
<image class="header-bg"
src="/static/img/index2.png"
src="/static/img/index4.png"
mode="aspectFill"></image>
</view>
@@ -43,7 +43,7 @@
<!-- 精选内容区 -->
<view class="content-section">
<view class="section-header">
<view class="section-title">近期活动</view>
<view class="section-title">活动详情</view>
<view class="section-more" @click="navigateTo('/pages/activity/list/index')">更多</view>
</view>
@@ -288,7 +288,7 @@ uni-page-body {
}
.section-title {
font-size: 16px;
font-size: 18px;
font-weight: bold;
color: #333;
position: relative;
+13 -13
View File
@@ -61,18 +61,18 @@
<view class="login-card">
<view class="login-tabs">
<view
:class="['tab', loginForm.loginMethod === 'sms' ? 'active' : '']"
@click="loginForm.loginMethod = 'sms'"
>
验证码登录
</view>
<view
:class="['tab', loginForm.loginMethod === 'password' ? 'active' : '']"
@click="loginForm.loginMethod = 'password'"
>
密码登录
</view>
<!-- <view-->
<!-- :class="['tab', loginForm.loginMethod === 'sms' ? 'active' : '']"-->
<!-- @click="loginForm.loginMethod = 'sms'"-->
<!-- >-->
<!-- 验证码登录-->
<!-- </view>-->
<!-- <view-->
<!-- :class="['tab', loginForm.loginMethod === 'password' ? 'active' : '']"-->
<!-- @click="loginForm.loginMethod = 'password'"-->
<!-- >-->
<!-- 密码登录-->
<!-- </view>-->
</view>
<!-- 登录表单区域 -->
@@ -132,7 +132,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>
+1 -1
View File
@@ -137,7 +137,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>
Binary file not shown.

After

Width:  |  Height:  |  Size: 130 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB

+2 -2
View File
@@ -34,8 +34,8 @@ export default defineConfig({
},*/
proxy: {
'/api': {
// target: 'http://119.91.224.39:9090/',
target: 'http://192.168.118.1:9090/',
target: 'http://119.91.224.39:9090/',
// target: 'http://192.168.118.1:9090/',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, '')
}