|
@@ -5,7 +5,7 @@ import request from '@/helpers/request'
|
|
import dayjs from 'dayjs'
|
|
import dayjs from 'dayjs'
|
|
import { Icon, Sticky, Button, Dialog, Toast, Popup } from 'vant'
|
|
import { Icon, Sticky, Button, Dialog, Toast, Popup } from 'vant'
|
|
import { defineComponent } from 'vue'
|
|
import { defineComponent } from 'vue'
|
|
-import styles from './live-detail.module.less'
|
|
|
|
|
|
+import styles from './group-detail.module.less'
|
|
import iconTips from '@common/images/icon_tips.png'
|
|
import iconTips from '@common/images/icon_tips.png'
|
|
import { onSubmitZero, orderStatus } from '@/views/order-detail/orderStatus'
|
|
import { onSubmitZero, orderStatus } from '@/views/order-detail/orderStatus'
|
|
import ColHeader from '@/components/col-header'
|
|
import ColHeader from '@/components/col-header'
|
|
@@ -17,12 +17,14 @@ import iconShare from '@/views/shop-mall/images/icon-share.svg'
|
|
import { state } from '@/state'
|
|
import { state } from '@/state'
|
|
import { browser } from '@/helpers/utils'
|
|
import { browser } from '@/helpers/utils'
|
|
import { tradeOrder } from '../trade/tradeOrder'
|
|
import { tradeOrder } from '../trade/tradeOrder'
|
|
-import { courseType } from '@/constant';
|
|
|
|
|
|
+import { courseType } from '@/constant'
|
|
|
|
+import GroupPlanStep from '@/business-components/group-plan-step'
|
|
interface IProps {
|
|
interface IProps {
|
|
courseTime: string
|
|
courseTime: string
|
|
coursePlan: string
|
|
coursePlan: string
|
|
- videoPosterUrl?: string
|
|
|
|
roomUid?: string
|
|
roomUid?: string
|
|
|
|
+ teacherName: string
|
|
|
|
+ subjectName: string
|
|
liveState?: number
|
|
liveState?: number
|
|
id?: number | string
|
|
id?: number | string
|
|
}
|
|
}
|
|
@@ -82,6 +84,7 @@ export default defineComponent({
|
|
},
|
|
},
|
|
courseInfo() {
|
|
courseInfo() {
|
|
const tempArr = [] as IProps[]
|
|
const tempArr = [] as IProps[]
|
|
|
|
+ const live = this.live
|
|
const coursePlanList = this.live.planList || []
|
|
const coursePlanList = this.live.planList || []
|
|
coursePlanList.forEach((item: any) => {
|
|
coursePlanList.forEach((item: any) => {
|
|
const startTime = item.startTime || new Date()
|
|
const startTime = item.startTime || new Date()
|
|
@@ -92,6 +95,8 @@ export default defineComponent({
|
|
).format('HH:mm')}~${dayjs(endTime).format('HH:mm')}`,
|
|
).format('HH:mm')}~${dayjs(endTime).format('HH:mm')}`,
|
|
coursePlan: item.plan,
|
|
coursePlan: item.plan,
|
|
roomUid: item.roomUid,
|
|
roomUid: item.roomUid,
|
|
|
|
+ teacherName: live.teacherName,
|
|
|
|
+ subjectName: live.subjectName,
|
|
liveState: item.liveState,
|
|
liveState: item.liveState,
|
|
id: item.courseId
|
|
id: item.courseId
|
|
})
|
|
})
|
|
@@ -122,9 +127,9 @@ export default defineComponent({
|
|
async mounted() {
|
|
async mounted() {
|
|
await this._init()
|
|
await this._init()
|
|
if (/(localhost|192)/g.test(location.origin)) {
|
|
if (/(localhost|192)/g.test(location.origin)) {
|
|
- this.shareUrl = `https://dev.colexiu.com/teacher/#/shareLive?recomUserId=${state.user.data?.userId}&groupId=${this.groupId}&userType=${state.platformType}&p=tenant`
|
|
|
|
|
|
+ this.shareUrl = `https://dev.colexiu.com/teacher/#/shareGroup?recomUserId=${state.user.data?.userId}&groupId=${this.groupId}&userType=${state.platformType}&p=tenant`
|
|
} else {
|
|
} else {
|
|
- this.shareUrl = `${location.origin}/teacher/#/shareLive?recomUserId=${state.user.data?.userId}&groupId=${this.groupId}&userType=${state.platformType}&p=tenant`
|
|
|
|
|
|
+ this.shareUrl = `${location.origin}/teacher/#/shareGroup?recomUserId=${state.user.data?.userId}&groupId=${this.groupId}&userType=${state.platformType}&p=tenant`
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
@@ -139,7 +144,7 @@ export default defineComponent({
|
|
}
|
|
}
|
|
)
|
|
)
|
|
this.live = res.data || {}
|
|
this.live = res.data || {}
|
|
- console.log(this.live, "list");
|
|
|
|
|
|
+ console.log(this.live, 'list')
|
|
} catch {}
|
|
} catch {}
|
|
},
|
|
},
|
|
async onJoinRoom() {
|
|
async onJoinRoom() {
|
|
@@ -180,7 +185,7 @@ export default defineComponent({
|
|
}
|
|
}
|
|
} catch {}
|
|
} catch {}
|
|
},
|
|
},
|
|
- initLive () {
|
|
|
|
|
|
+ initLive() {
|
|
const live = this.live
|
|
const live = this.live
|
|
orderStatus.orderObject.orderType = 'GROUP'
|
|
orderStatus.orderObject.orderType = 'GROUP'
|
|
orderStatus.orderObject.orderName = '小组课购买'
|
|
orderStatus.orderObject.orderName = '小组课购买'
|
|
@@ -306,7 +311,14 @@ export default defineComponent({
|
|
<p class={styles.introduction}>{this.userInfo.lessonDesc}</p>
|
|
<p class={styles.introduction}>{this.userInfo.lessonDesc}</p>
|
|
</SectionDetail>
|
|
</SectionDetail>
|
|
|
|
|
|
- <SectionDetail
|
|
|
|
|
|
+ {this.courseInfo.length > 0 && (
|
|
|
|
+ <GroupPlanStep
|
|
|
|
+ courseInfo={this.courseInfo}
|
|
|
|
+ courseId={Number(this.courseId) || 0}
|
|
|
|
+ />
|
|
|
|
+ )}
|
|
|
|
+
|
|
|
|
+ {/* <SectionDetail
|
|
title="课程列表"
|
|
title="课程列表"
|
|
icon="courseList"
|
|
icon="courseList"
|
|
border
|
|
border
|
|
@@ -318,7 +330,7 @@ export default defineComponent({
|
|
courseId={Number(this.courseId) || 0}
|
|
courseId={Number(this.courseId) || 0}
|
|
/>
|
|
/>
|
|
)}
|
|
)}
|
|
- </SectionDetail>
|
|
|
|
|
|
+ </SectionDetail> */}
|
|
|
|
|
|
{/* <div class={styles.tips}>
|
|
{/* <div class={styles.tips}>
|
|
<h3>
|
|
<h3>
|
|
@@ -335,21 +347,22 @@ export default defineComponent({
|
|
3、若您错过老师直播,可通过视频回放观看完整课程。
|
|
3、若您错过老师直播,可通过视频回放观看完整课程。
|
|
</p>
|
|
</p>
|
|
</div> */}
|
|
</div> */}
|
|
- {this.courseInfo.length > 0 && (this.live.existBuy !== 1 || this.live.existBuy !== 2) && (
|
|
|
|
- <ColSticky position="bottom" background="white">
|
|
|
|
- <div class={['btnGroup', styles.btnMore]}>
|
|
|
|
- <Button
|
|
|
|
- block
|
|
|
|
- round
|
|
|
|
- type="primary"
|
|
|
|
- onClick={this.onBuy}
|
|
|
|
- disabled={this.platformStatus}
|
|
|
|
- >
|
|
|
|
- {this.live.coursePrice <= 0 ? '免费领取' : `立即购买`}
|
|
|
|
- </Button>
|
|
|
|
- </div>
|
|
|
|
- </ColSticky>
|
|
|
|
- )}
|
|
|
|
|
|
+ {this.courseInfo.length > 0 &&
|
|
|
|
+ (this.live.existBuy !== 1 && this.live.existBuy !== 2) && (
|
|
|
|
+ <ColSticky position="bottom" background="white">
|
|
|
|
+ <div class={['btnGroup', styles.btnMore]}>
|
|
|
|
+ <Button
|
|
|
|
+ block
|
|
|
|
+ round
|
|
|
|
+ type="primary"
|
|
|
|
+ onClick={this.onBuy}
|
|
|
|
+ disabled={this.platformStatus}
|
|
|
|
+ >
|
|
|
|
+ {this.live.coursePrice <= 0 ? '免费领取' : `立即购买`}
|
|
|
|
+ </Button>
|
|
|
|
+ </div>
|
|
|
|
+ </ColSticky>
|
|
|
|
+ )}
|
|
|
|
|
|
{this.joinRoom == '1' && this.liveStatus.liveStatus !== 2 && (
|
|
{this.joinRoom == '1' && this.liveStatus.liveStatus !== 2 && (
|
|
<ColSticky position="bottom" background="white">
|
|
<ColSticky position="bottom" background="white">
|