|
@@ -7,6 +7,7 @@ import ColShare from '@/components/col-share'
|
|
|
import ColSticky from '@/components/col-sticky'
|
|
|
import { postMessage } from '@/helpers/native-message'
|
|
|
import request from '@/helpers/request'
|
|
|
+import LiveItem from '@/views/live-class/live-item'
|
|
|
import dayjs from 'dayjs'
|
|
|
import { Button, Popup, Sticky, Tab, Tabs, Toast } from 'vant'
|
|
|
import { defineComponent } from 'vue'
|
|
@@ -29,7 +30,8 @@ export default defineComponent({
|
|
|
groupId: query.groupId,
|
|
|
courseId: query.classId,
|
|
|
live: {} as any,
|
|
|
- shareStatus: false
|
|
|
+ shareStatus: false,
|
|
|
+ shareUrl: ''
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -40,6 +42,7 @@ export default defineComponent({
|
|
|
const endTime = planList[0]?.endTime || new Date()
|
|
|
return {
|
|
|
headUrl: live.avatar,
|
|
|
+ avatar: live.avatar,
|
|
|
username: live.userName,
|
|
|
id: live.teacherId,
|
|
|
startTime:
|
|
@@ -48,10 +51,13 @@ export default defineComponent({
|
|
|
)}~${dayjs(endTime).format('HH:mm')}` || '',
|
|
|
lessonPrice: live.coursePrice,
|
|
|
buyNum: live.studentCount || 0,
|
|
|
+ lessonId: live.courseGroupId,
|
|
|
lessonNum: live.courseNum || 0, // 课时数
|
|
|
lessonDesc: live.courseIntroduce,
|
|
|
lessonCoverUrl: live.backgroundPic || live.backgroundPicTemplate,
|
|
|
- lessonName: live.courseGroupName
|
|
|
+ lessonName: live.courseGroupName,
|
|
|
+ subjectName: live.subjectName,
|
|
|
+ courseStartTime: live.courseStartTime
|
|
|
}
|
|
|
},
|
|
|
courseInfo() {
|
|
@@ -114,10 +120,10 @@ export default defineComponent({
|
|
|
}
|
|
|
}
|
|
|
)
|
|
|
- console.log(res)
|
|
|
this.live = res.data || {}
|
|
|
|
|
|
- console.log(this.live)
|
|
|
+ this.shareUrl = `${location.origin}/teacher/#/shareLive?recomUserId=${this.live.teacherId}&groupId=${this.groupId}`
|
|
|
+ // console.log(this.live)
|
|
|
} catch {
|
|
|
//
|
|
|
}
|
|
@@ -182,7 +188,7 @@ export default defineComponent({
|
|
|
return (
|
|
|
<div class={[styles['live-detail'], 'mb12']}>
|
|
|
<UserDetail userInfo={this.userInfo} />
|
|
|
- <SectionDetail>
|
|
|
+ <SectionDetail border>
|
|
|
<p class={styles.introduction}>{this.userInfo.lessonDesc}</p>
|
|
|
</SectionDetail>
|
|
|
|
|
@@ -268,7 +274,25 @@ export default defineComponent({
|
|
|
v-model:show={this.shareStatus}
|
|
|
style={{ background: 'transparent' }}
|
|
|
>
|
|
|
- <ColShare teacherId={this.userInfo.id} />
|
|
|
+ <ColShare teacherId={this.userInfo.id} shareUrl={this.shareUrl}>
|
|
|
+ <LiveItem
|
|
|
+ class={styles.shareCourse}
|
|
|
+ liveInfo={{
|
|
|
+ backgroundPic: this.userInfo.lessonCoverUrl,
|
|
|
+ courseGroupId: this.userInfo.lessonId,
|
|
|
+ courseGroupName: this.userInfo.lessonName,
|
|
|
+ courseNum: this.userInfo.lessonNum,
|
|
|
+ coursePrice: this.userInfo.lessonPrice,
|
|
|
+ teacherName: this.userInfo.username,
|
|
|
+ teacherId: this.userInfo.id,
|
|
|
+ avatar: this.userInfo.avatar,
|
|
|
+ studentCount: this.userInfo.buyNum,
|
|
|
+ courseStartTime: this.userInfo.courseStartTime,
|
|
|
+ existBuy: 0,
|
|
|
+ subjectName: this.userInfo.subjectName
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ </ColShare>
|
|
|
</Popup>
|
|
|
</div>
|
|
|
)
|