|
@@ -5,7 +5,7 @@ import request from '@/helpers/request'
|
|
|
import dayjs from 'dayjs'
|
|
|
import { Icon, Sticky, Button, Dialog, Toast, Popup } from 'vant'
|
|
|
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 { onSubmitZero, orderStatus } from '@/views/order-detail/orderStatus'
|
|
|
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 { browser } from '@/helpers/utils'
|
|
|
import { tradeOrder } from '../trade/tradeOrder'
|
|
|
-import { courseType } from '@/constant';
|
|
|
+import { courseType } from '@/constant'
|
|
|
+import GroupPlanStep from '@/business-components/group-plan-step'
|
|
|
interface IProps {
|
|
|
courseTime: string
|
|
|
coursePlan: string
|
|
|
- videoPosterUrl?: string
|
|
|
roomUid?: string
|
|
|
+ teacherName: string
|
|
|
+ subjectName: string
|
|
|
liveState?: number
|
|
|
id?: number | string
|
|
|
}
|
|
@@ -82,6 +84,7 @@ export default defineComponent({
|
|
|
},
|
|
|
courseInfo() {
|
|
|
const tempArr = [] as IProps[]
|
|
|
+ const live = this.live
|
|
|
const coursePlanList = this.live.planList || []
|
|
|
coursePlanList.forEach((item: any) => {
|
|
|
const startTime = item.startTime || new Date()
|
|
@@ -92,6 +95,8 @@ export default defineComponent({
|
|
|
).format('HH:mm')}~${dayjs(endTime).format('HH:mm')}`,
|
|
|
coursePlan: item.plan,
|
|
|
roomUid: item.roomUid,
|
|
|
+ teacherName: live.teacherName,
|
|
|
+ subjectName: live.subjectName,
|
|
|
liveState: item.liveState,
|
|
|
id: item.courseId
|
|
|
})
|
|
@@ -122,9 +127,9 @@ export default defineComponent({
|
|
|
async mounted() {
|
|
|
await this._init()
|
|
|
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 {
|
|
|
- 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: {
|
|
@@ -139,7 +144,7 @@ export default defineComponent({
|
|
|
}
|
|
|
)
|
|
|
this.live = res.data || {}
|
|
|
- console.log(this.live, "list");
|
|
|
+ console.log(this.live, 'list')
|
|
|
} catch {}
|
|
|
},
|
|
|
async onJoinRoom() {
|
|
@@ -180,7 +185,7 @@ export default defineComponent({
|
|
|
}
|
|
|
} catch {}
|
|
|
},
|
|
|
- initLive () {
|
|
|
+ initLive() {
|
|
|
const live = this.live
|
|
|
orderStatus.orderObject.orderType = 'GROUP'
|
|
|
orderStatus.orderObject.orderName = '小组课购买'
|
|
@@ -306,7 +311,14 @@ export default defineComponent({
|
|
|
<p class={styles.introduction}>{this.userInfo.lessonDesc}</p>
|
|
|
</SectionDetail>
|
|
|
|
|
|
- <SectionDetail
|
|
|
+ {this.courseInfo.length > 0 && (
|
|
|
+ <GroupPlanStep
|
|
|
+ courseInfo={this.courseInfo}
|
|
|
+ courseId={Number(this.courseId) || 0}
|
|
|
+ />
|
|
|
+ )}
|
|
|
+
|
|
|
+ {/* <SectionDetail
|
|
|
title="课程列表"
|
|
|
icon="courseList"
|
|
|
border
|
|
@@ -318,7 +330,7 @@ export default defineComponent({
|
|
|
courseId={Number(this.courseId) || 0}
|
|
|
/>
|
|
|
)}
|
|
|
- </SectionDetail>
|
|
|
+ </SectionDetail> */}
|
|
|
|
|
|
{/* <div class={styles.tips}>
|
|
|
<h3>
|
|
@@ -335,21 +347,22 @@ export default defineComponent({
|
|
|
3、若您错过老师直播,可通过视频回放观看完整课程。
|
|
|
</p>
|
|
|
</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 && (
|
|
|
<ColSticky position="bottom" background="white">
|