import ColField from '@/components/col-field' import ColFieldGroup from '@/components/col-field-group' import { Button, Col, Field, Form, Radio, RadioGroup, Row, Sticky, Tab, Tabs, Image, Icon, Popup, DatetimePicker } from 'vant' import { defineComponent } from 'vue' import { createState } from './createState' import styles from './course-start.module.less' import ColUpload from '@/components/col-upload' import { verifiyNumberInteger } from '@/helpers/toolsValidate' import { formatterDate } from '@/helpers/utils' import activeButtonIcon from '@common/images/icon_checkbox.png' import inactiveButtonIcon from '@common/images/icon_checkbox_default.png' import dayjs from 'dayjs' export default defineComponent({ name: 'course-start', data() { return { dateStatus: false, currentDate: new Date(), minDate: dayjs().toDate(), maxDate: new Date() } }, mounted() { this.maxDate = dayjs(createState.selectCourseList[0].startTime) .subtract(1, 'day') .toDate() createState.live.salesStartDate = dayjs(this.minDate).format('YYYY-MM-DD') createState.live.salesEndDate = dayjs(this.maxDate).format('YYYY-MM-DD') }, methods: { tabChange(name: number) { createState.tabIndex = name }, selectImg(val: string) { createState.live.backgroundPic = '' createState.live.backgroundPicTemplate = val }, onFormatterInt(val: any) { if (val && val >= 1) { return verifiyNumberInteger(val) } else { return '' } }, onConfirm(val: any) { this.dateStatus = false } }, render() { return (
(createState.active = 5)} scrollToError > { this.currentDate = dayjs( createState.live.salesStartDate ).toDate() this.dateStatus = true }} rules={[{ required: true, message: '请选择停售日期' }]} /> { this.currentDate = dayjs(createState.live.salesEndDate).toDate() this.dateStatus = true }} rules={[{ required: true, message: '请选择停售日期' }]} placeholder="请选择停售日期" /> }} />
课程停售时付费学员达到该人数可开课,若未达到该人数课程将会失效,已付费学员将自动退款
( ) }} >

模板图片将作为改课程封面为学员展示

{createState.tabIndex === 1 ? ( ( {createState.templateList.map((item: any) => ( this.selectImg(item)} > ( ) }} /> ))} ) }} /> ) : null} {createState.tabIndex == 2 ? ( ( { if (val) { createState.live.backgroundPicTemplate = '' } }} v-model={createState.live.backgroundPic} class={styles.imgContainer} /> ) }} /> ) : null}
{ this.dateStatus = false }} onConfirm={this.onConfirm} />
) } })