Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
swx_weapp
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
hookehuyr
2022-10-25 14:33:30 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
d5c388204e6109bd19fd93e7ae3a3c18865d5d7c
d5c38820
1 parent
5cfbbbcf
🐞 fix: 活动时间创建时,需要落在报名时间之间
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletions
src/pages/createActivity/index.vue
src/pages/createActivity/index.vue
View file @
d5c3882
<!--
* @Date: 2022-09-21 16:04:10
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2022-10-2
1 17:53:26
* @LastEditTime: 2022-10-2
5 14:31:54
* @FilePath: /swx/src/pages/createActivity/index.vue
* @Description: 创建活动页面
-->
...
...
@@ -277,6 +277,8 @@ import Toast from '@/components/vant-weapp/toast/toast';
import { randomId } from '@/utils/tools'
import * as dayjs from 'dayjs'
import { activityInfoAPI } from '@/api/Host/index';
var isBetween = require('dayjs/plugin/isBetween')
dayjs.extend(isBetween);
const activity_name = ref('');
const onChange = ({ detail }) => {
...
...
@@ -695,6 +697,10 @@ const validForm = () => { // 校验表单
Toast('报名开始时间不能晚于报名截止时间');
return false;
}
if (!dayjs(activity_time.value).isBetween(dayjs(reg_begin_time.value), dayjs(reg_end_time.value), null, '[]')) {
Toast('活动时间请在报名时间之间');
return false;
}
if (reg_max.value === '') {
Toast('报名人数不能为空');
return false;
...
...
Please
register
or
login
to post a comment