فهرست منبع

添加禁止录屏配置

lex 1 سال پیش
والد
کامیت
f9aa7dc143
3فایلهای تغییر یافته به همراه525 افزوده شده و 474 حذف شده
  1. 43 20
      src/components/col-video/index.tsx
  2. 431 431
      src/student/video-class/video-class-detail.tsx
  3. 51 23
      src/tenant/music/coursewarePlay/index.tsx

+ 43 - 20
src/components/col-video/index.tsx

@@ -11,6 +11,7 @@ import iconVideoPlay from '@/common/images/icon_video_play.png'
 import { browser } from '@/helpers/utils'
 import { state } from '@/state'
 import { listenerMessage, postMessage } from '@/helpers/native-message'
+import request from '@/helpers/request'
 export default defineComponent({
   name: 'col-video',
   props: {
@@ -74,6 +75,7 @@ export default defineComponent({
   },
   data() {
     return {
+      disableScreenRecordingFlag: '0', // disable recording
       videoID: 'video' + Date.now() + Math.floor(Math.random() * 100),
       player: null as any,
       // playTime: 0,
@@ -88,7 +90,8 @@ export default defineComponent({
       this._init()
     }
   },
-  mounted() {
+  async mounted() {
+    await this.sysParamConfig()
     const Button = TCPlayer.getComponent('Button')
     const BigPlayButton = TCPlayer.getComponent('BigPlayButton')
     BigPlayButton.prototype.createEl = function () {
@@ -143,6 +146,24 @@ export default defineComponent({
     }
   },
   methods: {
+    // 获取支付渠道
+    async sysParamConfig() {
+      try {
+        const apiSuffix =
+          state.platformType === 'STUDENT' ? '/api-student' : '/api-teacher'
+        const { data } = await request.get(
+          apiSuffix + '/sysConfig/queryByParamName',
+          {
+            params: {
+              paramName: 'disable_screen_recording_flag'
+            }
+          }
+        )
+        this.disableScreenRecordingFlag = data.paramValue || ''
+      } catch {
+        //
+      }
+    },
     _init() {
       // const controls = [
       //   'play-large',
@@ -259,27 +280,29 @@ export default defineComponent({
           })
         })
         this.player.on('play', () => {
-          postMessage(
-            {
-              api: 'getDeviceStatus',
-              content: {
-                type: 'video'
+          if (this.disableScreenRecordingFlag === '1') {
+            postMessage(
+              {
+                api: 'getDeviceStatus',
+                content: {
+                  type: 'video'
+                }
+              },
+              (res: any) => {
+                // 判断是否在录屏中, 如果在录屏则不允许播放
+                if (res.content.status == '1') {
+                  Toast('为了保证数据安全,请不要录屏')
+                  this.player.pause()
+                }
               }
-            },
-            (res: any) => {
-              // 判断是否在录屏中, 如果在录屏则不允许播放
-              if (res.content.status == '1') {
-                Toast('为了保证数据安全,请不要录屏')
-                this.player.pause()
+            )
+            postMessage({
+              api: 'limitScreenRecord',
+              content: {
+                type: 1
               }
-            }
-          )
-          postMessage({
-            api: 'limitScreenRecord',
-            content: {
-              type: 1
-            }
-          })
+            })
+          }
           this.onPlay && this.onPlay()
         })
 

+ 431 - 431
src/student/video-class/video-class-detail.tsx

@@ -1,431 +1,431 @@
-import CourseVideoItem from '@/business-components/course-video-item'
-import SectionDetail from '@/business-components/section-detail'
-import ColHeader from '@/components/col-header'
-import ColVideo from '@/components/col-video'
-import request from '@/helpers/request'
-import {
-  Cell,
-  Icon,
-  Rate,
-  Tab,
-  Tabs,
-  Image,
-  Button,
-  Sticky,
-  Field,
-  List,
-  Toast,
-  Dialog
-} from 'vant'
-import { defineComponent } from 'vue'
-import styles from './video-class-detail.module.less'
-import { state } from '@/state'
-
-import iconTeacher from '@common/images/icon_teacher.png'
-import ColResult from '@/components/col-result'
-import dayjs from 'dayjs'
-import { onSubmitZero, orderStatus } from '@/views/order-detail/orderStatus'
-
-export default defineComponent({
-  name: 'VideoClassDetail',
-  data() {
-    const query = this.$route.query
-    return {
-      groupId: query.groupId,
-      classId: query.classId,
-      tabIndex: 1,
-      title: '',
-      lessonPrice: 0,
-      useRelationType: '',
-      alreadyBuy: false,
-      videoDetail: {} as any,
-      detailList: [],
-      posterUrl: '',
-      srcUrl: '',
-      message: '',
-      navHeight: 0 as any,
-      currentClassIndex: 1,
-      reload: false,
-      videoContent: '',
-      list: [],
-      dataShow: true, // 判断是否有数据
-      loading: false,
-      finished: false,
-      params: {
-        page: 1,
-        rows: 20
-      },
-      freeRate: 0, // 试看百分比
-      trySee: false, // 是否试看
-      videoHeight: '212px'
-    }
-  },
-  computed: {
-    users() {
-      return state.user.data
-    },
-    offsetTop() {
-      const navHeight: number = this.navHeight
-      const top = Number(navHeight) + 44
-      return top + 'px'
-    }
-  },
-  async mounted() {
-    // 处理视频显示
-    const width = document.body.clientWidth || document.body.offsetWidth
-    this.videoHeight = (width / 16) * 9 + 'px'
-    this.navHeight = sessionStorage.getItem('navHeight') || 0
-    try {
-      //
-      await this.__init()
-
-      const config = await request.get(
-        '/api-student/sysConfig/queryByParamNameList',
-        {
-          params: {
-            paramNames: 'video_lesson_free_rate'
-          }
-        }
-      )
-      this.freeRate = config.data[0]?.paramValue || 0
-    } catch {}
-
-    this.getList()
-  },
-  methods: {
-    async __init() {
-      try {
-        this.reload = true
-        const res = await request.get(
-          '/api-student/videoLesson/selectVideoLesson',
-          {
-            params: {
-              groupId: this.groupId
-            }
-          }
-        )
-        const result = res.data || {}
-        this.videoDetail = result.lessonGroup
-        this.title = result.lessonGroup.lessonName
-        this.lessonPrice = result.lessonGroup.lessonPrice
-        this.useRelationType = result.lessonGroup.relationType
-        this.alreadyBuy = result.alreadyBuy
-        this.detailList = result.detailList || []
-        this.trySee = !result.alreadyBuy
-        this.detailList.forEach((item: any, index: number) => {
-          if (item.id === Number(this.classId)) {
-            this.posterUrl = item.coverUrl
-            this.srcUrl = item.videoUrl
-            this.title = item.videoTitle
-            this.currentClassIndex = index + 1
-            this.videoContent = item.videoContent
-          }
-        })
-        this.reload = false
-      } catch {
-        //
-      }
-    },
-    onSearch() {
-      this.params.page = 1
-      this.list = []
-      this.dataShow = true // 判断是否有数据
-      this.loading = false
-      this.finished = false
-      this.getList()
-    },
-    async getList() {
-      try {
-        const params = this.params
-        const res = await request.post('/api-student/videoLesson/page', {
-          data: {
-            ...params,
-            videoId: this.classId
-          }
-        })
-        this.loading = false
-        const result = res.data || {}
-        // 处理重复请求数据
-        if (this.list.length > 0 && result.pageNo === 1) {
-          return
-        }
-        this.list = this.list.concat(result.rows || [])
-        this.finished = result.pageNo >= result.totalPage
-        this.params.page = result.pageNo + 1
-        this.dataShow = this.list.length > 0
-      } catch {
-        this.dataShow = false
-        this.finished = true
-      }
-    },
-    onPlay(item: any) {
-      // 判断是否点击的是当前播放的视频
-      if (item.id === Number(this.classId)) {
-        return
-      }
-      this.reload = true
-      this.posterUrl = item.imgUrl
-      this.srcUrl = item.videoUrl
-      this.title = item.title
-      this.currentClassIndex = item.index
-      this.videoContent = item.content
-      this.classId = item.id
-      this.onSearch()
-      setTimeout(() => {
-        this.reload = false
-      }, 0)
-    },
-    async onSubmit() {
-      try {
-        await request.post('/api-student/videoLesson/evaluate', {
-          data: {
-            isTeacher: 0,
-            videoId: this.classId,
-            content: this.message,
-            studentId: state.user.data.userId
-          }
-        })
-        Toast('评论成功')
-        this.message = ''
-        setTimeout(() => {
-          this.onSearch()
-        }, 500)
-      } catch {}
-    }
-  },
-  render() {
-    return (
-      <div class={styles['video-class-detail']}>
-        {/* <Sticky offsetTop={0} position="top"> */}
-        <ColHeader
-          v-slots={{
-            default: () =>
-              !this.reload && (
-                <ColVideo
-                  freeRate={Number(this.freeRate)}
-                  freeTitleStatus={this.lessonPrice > 0 ? true : false}
-                  trySee={this.trySee}
-                  src={this.srcUrl}
-                  poster={this.posterUrl}
-                  height={this.videoHeight}
-                  isBuy
-                  onBuyEmit={async () => {
-                    if (this.lessonPrice > 0) {
-                      this.$router.back()
-                      return
-                    }
-                    try {
-                      const userInfo = this.videoDetail
-                      orderStatus.orderObject.orderType = 'VIDEO'
-                      orderStatus.orderObject.orderName = '视频课购买'
-                      orderStatus.orderObject.orderDesc = '视频课购买'
-                      orderStatus.orderObject.actualPrice = userInfo.lessonPrice
-                      orderStatus.orderObject.recomUserId = ''
-                      orderStatus.orderObject.orderNo = ''
-                      orderStatus.orderObject.orderList = [
-                        {
-                          orderType: 'VIDEO',
-                          goodsName: '视频课购买',
-                          courseGroupId: userInfo.id,
-                          courseGroupName: userInfo.lessonName,
-                          coursePrice: userInfo.lessonPrice,
-                          teacherName:
-                            userInfo.username ||
-                            `游客${userInfo.teacherId || ''}`,
-                          teacherId: userInfo.teacherId,
-                          avatar: userInfo.headUrl,
-                          relationType: userInfo.relationType,
-                          courseInfo: this.detailList,
-                          recomUserId: ''
-                        }
-                      ]
-                      await onSubmitZero(() => {
-                        Dialog.alert({
-                          message: '领取成功',
-                          confirmButtonText: '确定',
-                          confirmButtonColor: '#2dc7aa'
-                        }).then(() => {
-                          this.__init()
-                        })
-                      })
-                    } catch {
-                      //
-                    }
-                  }}
-                />
-              )
-          }}
-        />
-        {/* </Sticky> */}
-        <Cell
-          border={false}
-          class={styles.cell}
-          title={this.title}
-          titleClass={[styles.titleInfo, 'van-ellipsis']}
-          v-slots={{
-            icon: () => (
-              <Icon
-                name="video"
-                size={18}
-                color="var(--van-primary)"
-                style={{ display: 'flex', alignItems: 'center' }}
-              />
-            ),
-            value: () => (
-              <div class={styles.label}>
-                <span>{this.currentClassIndex}</span>/{this.detailList.length}
-                课时
-              </div>
-            )
-          }}
-        ></Cell>
-        <div class={styles.videoDesc}>{this.videoContent}</div>
-
-        <Tabs
-          v-model:active={this.tabIndex}
-          class={styles.infoField}
-          color="var(--van-primary)"
-          sticky
-          offsetTop={this.offsetTop}
-          lineWidth={20}
-        >
-          <Tab title="目录" name={1}>
-            <div
-              style={{
-                // height: `calc(100vh - 320px - ${this.navHeight}px)`,
-                overflowY: 'auto'
-              }}
-            >
-              <SectionDetail title="课程列表" icon="courseList" border>
-                {this.detailList.map((item: any, index: number) => {
-                  const musicAlbumInfos = item.musicAlbumInfos || []
-                  const temp = musicAlbumInfos.map((info: any) => {
-                    return {
-                      relationMusicAlbum: info.relationType,
-                      musicAlbumName: info.name,
-                      musicAlbumId: info.musicAlbumId,
-                      status: info.status,
-                      useRelationType: this.useRelationType
-                    }
-                  })
-                  return (
-                    <CourseVideoItem
-                      musicAlbumInfos={temp}
-                      playId={Number(this.classId)}
-                      detail={{
-                        id: item.id,
-                        title: item.videoTitle,
-                        content: item.videoContent,
-                        imgUrl: item.coverUrl,
-                        videoUrl: item.videoUrl,
-                        index: index + 1
-                      }}
-                      onPlay={this.onPlay}
-                      onMusicAlbumDetail={(item: any) => {
-                        if (!this.alreadyBuy && !item.status) {
-                          Toast('数据正在更新,请稍后再试')
-                          return
-                        }
-                        if (item.relationMusicAlbum === 'MUSIC') {
-                          this.$router.push({
-                            path: '/music-detail',
-                            query: {
-                              id: item.musicAlbumId
-                            }
-                          })
-                        } else if (item.relationMusicAlbum === 'ALBUM') {
-                          this.$router.push({
-                            path: '/music-album-detail/' + item.musicAlbumId
-                          })
-                        }
-                      }}
-                    />
-                  )
-                })}
-              </SectionDetail>
-            </div>
-          </Tab>
-          <Tab title="讨论" name={3}>
-            <div
-              style={{
-                // height: `calc(100vh - 380px - ${this.navHeight}px)`,
-                overflowY: 'auto',
-                marginBottom:
-                  'calc(var(--van-cell-vertical-padding) * 2 + var( --van-cell-line-height))'
-              }}
-            >
-              {this.dataShow ? (
-                <List
-                  v-model:loading={this.loading}
-                  finished={this.finished}
-                  finishedText=" "
-                  immediateCheck={false}
-                  onLoad={this.getList}
-                >
-                  {this.list.map((item: any) => (
-                    <Cell
-                      class={[
-                        styles['message-list'],
-                        item.isTeacher === 1 && styles['message-active']
-                      ]}
-                      valueClass={styles['message-time']}
-                      v-slots={{
-                        icon: () => (
-                          <Image
-                            class={styles.userLogo}
-                            src={item.avatar || iconTeacher}
-                            fit="cover"
-                          />
-                        ),
-                        title: () => (
-                          <div class={styles.title}>
-                            <div class={styles['message-name']}>
-                              {item.userName}
-                            </div>
-                            <div class={styles['message-time']}>
-                              {dayjs(item.evaluateTime).format(
-                                'YYYY年MM月DD日'
-                              )}
-                            </div>
-                          </div>
-                        ),
-                        label: () => (
-                          <div class={styles.label}>{item.content}</div>
-                        )
-                      }}
-                    />
-                  ))}
-                </List>
-              ) : (
-                <ColResult btnStatus={false} tips="暂无讨论" />
-              )}
-            </div>
-
-            {/* <Sticky offsetBottom={0} position="bottom"> */}
-            <div class={styles.messageContainer}>
-              <Field
-                placeholder="快来讨论吧~"
-                v-model={this.message}
-                v-slots={{
-                  button: () => (
-                    <Button
-                      type="primary"
-                      disabled={!this.message}
-                      style={{ padding: '0 20px' }}
-                      size="small"
-                      round
-                      onClick={this.onSubmit}
-                    >
-                      发布
-                    </Button>
-                  )
-                }}
-              />
-            </div>
-            {/* </Sticky> */}
-          </Tab>
-        </Tabs>
-      </div>
-    )
-  }
-})
+import CourseVideoItem from '@/business-components/course-video-item'
+import SectionDetail from '@/business-components/section-detail'
+import ColHeader from '@/components/col-header'
+import ColVideo from '@/components/col-video'
+import request from '@/helpers/request'
+import {
+  Cell,
+  Icon,
+  Rate,
+  Tab,
+  Tabs,
+  Image,
+  Button,
+  Sticky,
+  Field,
+  List,
+  Toast,
+  Dialog
+} from 'vant'
+import { defineComponent } from 'vue'
+import styles from './video-class-detail.module.less'
+import { state } from '@/state'
+
+import iconTeacher from '@common/images/icon_teacher.png'
+import ColResult from '@/components/col-result'
+import dayjs from 'dayjs'
+import { onSubmitZero, orderStatus } from '@/views/order-detail/orderStatus'
+
+export default defineComponent({
+  name: 'VideoClassDetail',
+  data() {
+    const query = this.$route.query
+    return {
+      groupId: query.groupId,
+      classId: query.classId,
+      tabIndex: 1,
+      title: '',
+      lessonPrice: 0,
+      useRelationType: '',
+      alreadyBuy: false,
+      videoDetail: {} as any,
+      detailList: [],
+      posterUrl: '',
+      srcUrl: '',
+      message: '',
+      navHeight: 0 as any,
+      currentClassIndex: 1,
+      reload: false,
+      videoContent: '',
+      list: [],
+      dataShow: true, // 判断是否有数据
+      loading: false,
+      finished: false,
+      params: {
+        page: 1,
+        rows: 20
+      },
+      freeRate: 0, // 试看百分比
+      trySee: false, // 是否试看
+      videoHeight: '212px'
+    }
+  },
+  computed: {
+    users() {
+      return state.user.data
+    },
+    offsetTop() {
+      const navHeight: number = this.navHeight
+      const top = Number(navHeight) + 44
+      return top + 'px'
+    }
+  },
+  async mounted() {
+    // 处理视频显示
+    const width = document.body.clientWidth || document.body.offsetWidth
+    this.videoHeight = (width / 16) * 9 + 'px'
+    this.navHeight = sessionStorage.getItem('navHeight') || 0
+    try {
+      //
+      await this.__init()
+
+      const config = await request.get(
+        '/api-student/sysConfig/queryByParamNameList',
+        {
+          params: {
+            paramNames: 'video_lesson_free_rate'
+          }
+        }
+      )
+      this.freeRate = config.data[0]?.paramValue || 0
+    } catch {}
+
+    this.getList()
+  },
+  methods: {
+    async __init() {
+      this.reload = true
+      try {
+        const res = await request.get(
+          '/api-student/videoLesson/selectVideoLesson',
+          {
+            params: {
+              groupId: this.groupId
+            }
+          }
+        )
+        const result = res.data || {}
+        this.videoDetail = result.lessonGroup
+        this.title = result.lessonGroup.lessonName
+        this.lessonPrice = result.lessonGroup.lessonPrice
+        this.useRelationType = result.lessonGroup.relationType
+        this.alreadyBuy = result.alreadyBuy
+        this.detailList = result.detailList || []
+        this.trySee = !result.alreadyBuy
+        this.detailList.forEach((item: any, index: number) => {
+          if (item.id === Number(this.classId)) {
+            this.posterUrl = item.coverUrl
+            this.srcUrl = item.videoUrl
+            this.title = item.videoTitle
+            this.currentClassIndex = index + 1
+            this.videoContent = item.videoContent
+          }
+        })
+      } catch {
+        //
+      }
+      this.reload = false
+    },
+    onSearch() {
+      this.params.page = 1
+      this.list = []
+      this.dataShow = true // 判断是否有数据
+      this.loading = false
+      this.finished = false
+      this.getList()
+    },
+    async getList() {
+      try {
+        const params = this.params
+        const res = await request.post('/api-student/videoLesson/page', {
+          data: {
+            ...params,
+            videoId: this.classId
+          }
+        })
+        this.loading = false
+        const result = res.data || {}
+        // 处理重复请求数据
+        if (this.list.length > 0 && result.pageNo === 1) {
+          return
+        }
+        this.list = this.list.concat(result.rows || [])
+        this.finished = result.pageNo >= result.totalPage
+        this.params.page = result.pageNo + 1
+        this.dataShow = this.list.length > 0
+      } catch {
+        this.dataShow = false
+        this.finished = true
+      }
+    },
+    onPlay(item: any) {
+      // 判断是否点击的是当前播放的视频
+      if (item.id === Number(this.classId)) {
+        return
+      }
+      this.reload = true
+      this.posterUrl = item.imgUrl
+      this.srcUrl = item.videoUrl
+      this.title = item.title
+      this.currentClassIndex = item.index
+      this.videoContent = item.content
+      this.classId = item.id
+      this.onSearch()
+      setTimeout(() => {
+        this.reload = false
+      }, 0)
+    },
+    async onSubmit() {
+      try {
+        await request.post('/api-student/videoLesson/evaluate', {
+          data: {
+            isTeacher: 0,
+            videoId: this.classId,
+            content: this.message,
+            studentId: state.user.data.userId
+          }
+        })
+        Toast('评论成功')
+        this.message = ''
+        setTimeout(() => {
+          this.onSearch()
+        }, 500)
+      } catch {}
+    }
+  },
+  render() {
+    return (
+      <div class={styles['video-class-detail']}>
+        {/* <Sticky offsetTop={0} position="top"> */}
+        <ColHeader
+          v-slots={{
+            default: () =>
+              !this.reload && (
+                <ColVideo
+                  freeRate={Number(this.freeRate)}
+                  freeTitleStatus={this.lessonPrice > 0 ? true : false}
+                  trySee={this.trySee}
+                  src={this.srcUrl}
+                  poster={this.posterUrl}
+                  height={this.videoHeight}
+                  isBuy
+                  onBuyEmit={async () => {
+                    if (this.lessonPrice > 0) {
+                      this.$router.back()
+                      return
+                    }
+                    try {
+                      const userInfo = this.videoDetail
+                      orderStatus.orderObject.orderType = 'VIDEO'
+                      orderStatus.orderObject.orderName = '视频课购买'
+                      orderStatus.orderObject.orderDesc = '视频课购买'
+                      orderStatus.orderObject.actualPrice = userInfo.lessonPrice
+                      orderStatus.orderObject.recomUserId = ''
+                      orderStatus.orderObject.orderNo = ''
+                      orderStatus.orderObject.orderList = [
+                        {
+                          orderType: 'VIDEO',
+                          goodsName: '视频课购买',
+                          courseGroupId: userInfo.id,
+                          courseGroupName: userInfo.lessonName,
+                          coursePrice: userInfo.lessonPrice,
+                          teacherName:
+                            userInfo.username ||
+                            `游客${userInfo.teacherId || ''}`,
+                          teacherId: userInfo.teacherId,
+                          avatar: userInfo.headUrl,
+                          relationType: userInfo.relationType,
+                          courseInfo: this.detailList,
+                          recomUserId: ''
+                        }
+                      ]
+                      await onSubmitZero(() => {
+                        Dialog.alert({
+                          message: '领取成功',
+                          confirmButtonText: '确定',
+                          confirmButtonColor: '#2dc7aa'
+                        }).then(() => {
+                          this.__init()
+                        })
+                      })
+                    } catch {
+                      //
+                    }
+                  }}
+                />
+              )
+          }}
+        />
+        {/* </Sticky> */}
+        <Cell
+          border={false}
+          class={styles.cell}
+          title={this.title}
+          titleClass={[styles.titleInfo, 'van-ellipsis']}
+          v-slots={{
+            icon: () => (
+              <Icon
+                name="video"
+                size={18}
+                color="var(--van-primary)"
+                style={{ display: 'flex', alignItems: 'center' }}
+              />
+            ),
+            value: () => (
+              <div class={styles.label}>
+                <span>{this.currentClassIndex}</span>/{this.detailList.length}
+                课时
+              </div>
+            )
+          }}
+        ></Cell>
+        <div class={styles.videoDesc}>{this.videoContent}</div>
+
+        <Tabs
+          v-model:active={this.tabIndex}
+          class={styles.infoField}
+          color="var(--van-primary)"
+          sticky
+          offsetTop={this.offsetTop}
+          lineWidth={20}
+        >
+          <Tab title="目录" name={1}>
+            <div
+              style={{
+                // height: `calc(100vh - 320px - ${this.navHeight}px)`,
+                overflowY: 'auto'
+              }}
+            >
+              <SectionDetail title="课程列表" icon="courseList" border>
+                {this.detailList.map((item: any, index: number) => {
+                  const musicAlbumInfos = item.musicAlbumInfos || []
+                  const temp = musicAlbumInfos.map((info: any) => {
+                    return {
+                      relationMusicAlbum: info.relationType,
+                      musicAlbumName: info.name,
+                      musicAlbumId: info.musicAlbumId,
+                      status: info.status,
+                      useRelationType: this.useRelationType
+                    }
+                  })
+                  return (
+                    <CourseVideoItem
+                      musicAlbumInfos={temp}
+                      playId={Number(this.classId)}
+                      detail={{
+                        id: item.id,
+                        title: item.videoTitle,
+                        content: item.videoContent,
+                        imgUrl: item.coverUrl,
+                        videoUrl: item.videoUrl,
+                        index: index + 1
+                      }}
+                      onPlay={this.onPlay}
+                      onMusicAlbumDetail={(item: any) => {
+                        if (!this.alreadyBuy && !item.status) {
+                          Toast('数据正在更新,请稍后再试')
+                          return
+                        }
+                        if (item.relationMusicAlbum === 'MUSIC') {
+                          this.$router.push({
+                            path: '/music-detail',
+                            query: {
+                              id: item.musicAlbumId
+                            }
+                          })
+                        } else if (item.relationMusicAlbum === 'ALBUM') {
+                          this.$router.push({
+                            path: '/music-album-detail/' + item.musicAlbumId
+                          })
+                        }
+                      }}
+                    />
+                  )
+                })}
+              </SectionDetail>
+            </div>
+          </Tab>
+          <Tab title="讨论" name={3}>
+            <div
+              style={{
+                // height: `calc(100vh - 380px - ${this.navHeight}px)`,
+                overflowY: 'auto',
+                marginBottom:
+                  'calc(var(--van-cell-vertical-padding) * 2 + var( --van-cell-line-height))'
+              }}
+            >
+              {this.dataShow ? (
+                <List
+                  v-model:loading={this.loading}
+                  finished={this.finished}
+                  finishedText=" "
+                  immediateCheck={false}
+                  onLoad={this.getList}
+                >
+                  {this.list.map((item: any) => (
+                    <Cell
+                      class={[
+                        styles['message-list'],
+                        item.isTeacher === 1 && styles['message-active']
+                      ]}
+                      valueClass={styles['message-time']}
+                      v-slots={{
+                        icon: () => (
+                          <Image
+                            class={styles.userLogo}
+                            src={item.avatar || iconTeacher}
+                            fit="cover"
+                          />
+                        ),
+                        title: () => (
+                          <div class={styles.title}>
+                            <div class={styles['message-name']}>
+                              {item.userName}
+                            </div>
+                            <div class={styles['message-time']}>
+                              {dayjs(item.evaluateTime).format(
+                                'YYYY年MM月DD日'
+                              )}
+                            </div>
+                          </div>
+                        ),
+                        label: () => (
+                          <div class={styles.label}>{item.content}</div>
+                        )
+                      }}
+                    />
+                  ))}
+                </List>
+              ) : (
+                <ColResult btnStatus={false} tips="暂无讨论" />
+              )}
+            </div>
+
+            {/* <Sticky offsetBottom={0} position="bottom"> */}
+            <div class={styles.messageContainer}>
+              <Field
+                placeholder="快来讨论吧~"
+                v-model={this.message}
+                v-slots={{
+                  button: () => (
+                    <Button
+                      type="primary"
+                      disabled={!this.message}
+                      style={{ padding: '0 20px' }}
+                      size="small"
+                      round
+                      onClick={this.onSubmit}
+                    >
+                      发布
+                    </Button>
+                  )
+                }}
+              />
+            </div>
+            {/* </Sticky> */}
+          </Tab>
+        </Tabs>
+      </div>
+    )
+  }
+})

+ 51 - 23
src/tenant/music/coursewarePlay/index.tsx

@@ -133,7 +133,8 @@ export default defineComponent({
 
       videoState: 'init' as 'init' | 'play',
       videoItemRef: null as any,
-      animationState: 'start' as 'start' | 'end'
+      animationState: 'start' as 'start' | 'end',
+      disableScreenRecordingFlag: '0' // disable recording
     })
     const activeData = reactive({
       isAutoPlay: true, // 是否自动播放
@@ -267,8 +268,11 @@ export default defineComponent({
             type: 'fullscreen'
           }
         })
-        //检测是否录屏
-        // handleLimitScreenRecord()
+        if (data.disableScreenRecordingFlag === '1') {
+          // 检测是否录屏
+          // handleLimitScreenRecord()
+        }
+
         setTimeout(() => {
           data.animationState = 'end'
         }, 500)
@@ -412,7 +416,26 @@ export default defineComponent({
         clearInterval(timers)
       }, 3000)
     }
+
+    // 获取支付渠道
+    const sysParamConfig = async () => {
+      try {
+        const { data } = await request.get(
+          apiSuffix.value + '/sysConfig/queryByParamName',
+          {
+            params: {
+              paramName: 'disable_screen_recording_flag'
+            }
+          }
+        )
+        data.disableScreenRecordingFlag = data.paramValue || ''
+      } catch {
+        //
+      }
+    }
+
     onMounted(async () => {
+      await sysParamConfig()
       await getDetail()
       // const hasFree = String(data.detail?.accessScope) === '0'
       // if (!hasFree) {
@@ -434,28 +457,33 @@ export default defineComponent({
       // }
       // getCourseSchedule();
       window.addEventListener('message', iframeHandle)
-      // 禁止录屏 ios
-      // listenerMessage('setVideoPlayer', result => {
-      //   if (result?.content?.status == 'pause') {
-      //     handleLimitScreenRecord()
-      //   }
-      // })
-      // // 禁止录屏 安卓
-      // postMessage({
-      //   api: 'limitScreenRecord',
-      //   content: {
-      //     type: 1
-      //   }
-      // })
+
+      if (data.disableScreenRecordingFlag === '1') {
+        // 禁止录屏 ios
+        listenerMessage('setVideoPlayer', result => {
+          if (result?.content?.status == 'pause') {
+            handleLimitScreenRecord()
+          }
+        })
+        // 禁止录屏 安卓
+        postMessage({
+          api: 'limitScreenRecord',
+          content: {
+            type: 1
+          }
+        })
+      }
     })
     onBeforeUnmount(() => {
-      // 取消 禁止录屏
-      // postMessage({
-      //   api: 'limitScreenRecord',
-      //   content: {
-      //     type: 0
-      //   }
-      // })
+      if (data.disableScreenRecordingFlag === '1') {
+        // 取消 禁止录屏
+        postMessage({
+          api: 'limitScreenRecord',
+          content: {
+            type: 0
+          }
+        })
+      }
     })
     const playRef = ref()
     // 返回