Просмотр исходного кода

Merge branch 'share-member' into jenkins

lex 2 лет назад
Родитель
Сommit
0de071a537

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
dist/assets/index-legacy.82045dfd.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
dist/assets/index.f97b1fce.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
dist/assets/polyfills-legacy.cb5a1590.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 1
dist/assets/teacher-home-legacy.bf8431ea.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
dist/assets/teacher-home.45757138.js


+ 3 - 3
dist/index.html

@@ -35,7 +35,7 @@
     <meta name="msapplication-tap-highlight" content="no" />
     <title>酷乐秀</title>
     <script src="./flexible.js" charset="UTF-8"></script>
-    <script type="module" crossorigin src="./assets/index.9003d12a.js"></script>
+    <script type="module" crossorigin src="./assets/index.f97b1fce.js"></script>
     <link rel="modulepreload" href="./assets/vendor.ff5bdeff.js">
     <link rel="modulepreload" href="./assets/index.5e69971c.js">
     <link rel="stylesheet" href="./assets/vendor.68261ebd.css">
@@ -49,7 +49,7 @@
     
     <!-- <script type="module" src="/src/teacher/main.ts"></script> -->
     <script nomodule>!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",(function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()}),!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script>
-    <script nomodule id="vite-legacy-polyfill" src="./assets/polyfills-legacy.86ab0615.js"></script>
-    <script nomodule id="vite-legacy-entry" data-src="./assets/index-legacy.9ec77fbd.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
+    <script nomodule id="vite-legacy-polyfill" src="./assets/polyfills-legacy.cb5a1590.js"></script>
+    <script nomodule id="vite-legacy-entry" data-src="./assets/index-legacy.82045dfd.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
   </body>
 </html>

+ 1 - 1
dist/teacher.html

@@ -48,7 +48,7 @@
     <div id="app"></div>
     
     <script nomodule>!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",(function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()}),!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script>
-    <script nomodule id="vite-legacy-polyfill" src="./assets/polyfills-legacy.86ab0615.js"></script>
+    <script nomodule id="vite-legacy-polyfill" src="./assets/polyfills-legacy.cb5a1590.js"></script>
     <script nomodule id="vite-legacy-entry" data-src="./assets/teacher-legacy.8a1884d2.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
   </body>
 </html>

+ 2 - 2
src/student/teacher-dependent/model/teacher-header.tsx

@@ -189,8 +189,8 @@ export default defineComponent({
                       api: 'joinChatGroup',
                       content: {
                         type: 'single', // single 单人 multi 多人
-                        // id: this.userInfo.imUserId
-                        id: this.teacherId
+                        id: this.userInfo.imUserId
+                        // id: this.teacherId
                       }
                     })
                   }}

+ 7 - 0
src/student/video-class/video-class-detail.tsx

@@ -35,6 +35,7 @@ export default defineComponent({
       title: '',
       lessonPrice: 0,
       useRelationType: '',
+      alreadyBuy: false,
       detailList: [],
       posterUrl: '',
       srcUrl: '',
@@ -86,6 +87,7 @@ export default defineComponent({
       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) => {
@@ -247,6 +249,7 @@ export default defineComponent({
                       relationMusicAlbum: info.relationType,
                       musicAlbumName: info.name,
                       musicAlbumId: info.musicAlbumId,
+                      status: info.status,
                       useRelationType: this.useRelationType
                     }
                   })
@@ -264,6 +267,10 @@ export default defineComponent({
                       }}
                       onPlay={this.onPlay}
                       onMusicAlbumDetail={(item: any) => {
+                        if (!this.alreadyBuy && !item.status) {
+                          Toast('数据正在维护中,请稍后在试')
+                          return
+                        }
                         if (item.relationMusicAlbum === 'MUSIC') {
                           this.$router.push({
                             path: '/music-detail',

+ 6 - 1
src/student/video-class/video-detail.tsx

@@ -1,7 +1,7 @@
 import CourseVideoItem from '@/business-components/course-video-item'
 import SectionDetail from '@/business-components/section-detail'
 import UserDetail from '@/business-components/user-detail'
-import { Sticky, Button, Dialog, Popup } from 'vant'
+import { Sticky, Button, Dialog, Popup, Toast } from 'vant'
 import { defineComponent } from 'vue'
 import styles from './video-detail.module.less'
 import request from '@/helpers/request'
@@ -214,6 +214,7 @@ export default defineComponent({
                 relationMusicAlbum: info.relationType,
                 musicAlbumName: info.name,
                 musicAlbumId: info.musicAlbumId,
+                status: info.status, // 是否上架
                 useRelationType: this.userInfo.relationType
               }
             })
@@ -229,6 +230,10 @@ export default defineComponent({
                 }}
                 onPlay={this.onPlay}
                 onMusicAlbumDetail={(item: any) => {
+                  if (!this.userInfo.alreadyBuy && !item.status) {
+                    Toast('数据正在维护中,请稍后在试')
+                    return
+                  }
                   if (item.relationMusicAlbum === 'MUSIC') {
                     this.$router.push({
                       path: '/music-detail',

+ 7 - 0
src/teacher/video-class/video-class-detail.tsx

@@ -35,6 +35,7 @@ export default defineComponent({
       title: '',
       lessonPrice: 0,
       useRelationType: '',
+      alreadyBuy: false,
       currentClassIndex: 1,
       detailList: [],
       posterUrl: '',
@@ -81,6 +82,7 @@ export default defineComponent({
       this.title = result.lessonGroup.lessonName
       this.useRelationType = result.lessonGroup.relationType
       this.lessonPrice = result.lessonGroup.lessonPrice
+      this.alreadyBuy = result.alreadyBuy
       this.detailList = result.detailList || []
 
       if (state.user.data?.userId !== result.lessonGroup.teacherId) {
@@ -246,6 +248,7 @@ export default defineComponent({
                       relationMusicAlbum: info.relationType,
                       musicAlbumName: info.name,
                       musicAlbumId: info.musicAlbumId,
+                      status: info.status,
                       useRelationType: this.useRelationType
                     }
                   })
@@ -263,6 +266,10 @@ export default defineComponent({
                       }}
                       onPlay={this.onPlay}
                       onMusicAlbumDetail={(item: any) => {
+                        if (!this.alreadyBuy && !item.status) {
+                          Toast('数据正在维护中,请稍后在试')
+                          return
+                        }
                         if (item.relationMusicAlbum === 'MUSIC') {
                           this.$router.push({
                             path: '/music-detail',

+ 12 - 1
src/teacher/video-class/video-detail.tsx

@@ -65,7 +65,8 @@ export default defineComponent({
         lessonSubjectName: result.lessonGroup.lessonSubjectName,
         auditVersion: result.lessonGroup.auditVersion,
         isDegree: result.degreeFlag ? true : false,
-        isTeacher: result.teacherFlag ? true : false
+        isTeacher: result.teacherFlag ? true : false,
+        alreadyBuy: result.alreadyBuy
       }
 
       this.shelvesFlag = result.lessonGroup.shelvesFlag
@@ -154,6 +155,7 @@ export default defineComponent({
                   relationMusicAlbum: info.relationType,
                   musicAlbumName: info.name,
                   musicAlbumId: info.musicAlbumId,
+                  status: info.status,
                   useRelationType: this.userInfo.relationType
                 }
               })
@@ -168,6 +170,10 @@ export default defineComponent({
                   }}
                   onPlay={this.onPlay}
                   onMusicAlbumDetail={(item: any) => {
+                    if (!this.userInfo.alreadyBuy && !item.status) {
+                      Toast('数据正在维护中,请稍后在试')
+                      return
+                    }
                     if (item.relationMusicAlbum === 'MUSIC') {
                       this.$router.push({
                         path: '/music-detail',
@@ -201,6 +207,7 @@ export default defineComponent({
                       relationMusicAlbum: info.relationType,
                       musicAlbumName: info.name,
                       musicAlbumId: info.musicAlbumId,
+                      status: info.status,
                       useRelationType: this.userInfo.relationType
                     }
                   })
@@ -215,6 +222,10 @@ export default defineComponent({
                       }}
                       onPlay={this.onPlay}
                       onMusicAlbumDetail={(item: any) => {
+                        if (!this.userInfo.alreadyBuy && !item.status) {
+                          Toast('数据正在维护中,请稍后在试')
+                          return
+                        }
                         if (item.relationMusicAlbum === 'MUSIC') {
                           this.$router.push({
                             path: '/music-detail',

+ 13 - 3
src/views/order-detail/order-video/index.tsx

@@ -22,10 +22,15 @@ export default defineComponent({
       courseInfo.map((course: any) => {
         course.musicAlbumInfos &&
           course.musicAlbumInfos.map((info: any) => {
-            info.relationType === 'ALBUM' && albumList.push(info)
+            if (info.relationType === 'ALBUM') {
+              const index = albumList.findIndex(
+                (album: any) => album.musicAlbumId === info.musicAlbumId
+              )
+              index === -1 && albumList.push(info)
+            }
           })
       })
-      console.log(this.item)
+
       return this.item.relationType === 'GIFT' ? [...albumList] : []
     },
     music() {
@@ -34,7 +39,12 @@ export default defineComponent({
       courseInfo.map((course: any) => {
         course.musicAlbumInfos &&
           course.musicAlbumInfos.map((info: any) => {
-            info.relationType === 'MUSIC' && albumList.push(info)
+            if (info.relationType === 'MUSIC') {
+              const index = albumList.findIndex(
+                (album: any) => album.musicAlbumId === info.musicAlbumId
+              )
+              index === -1 && albumList.push(info)
+            }
           })
       })
       return this.item.relationType === 'GIFT' ? [...albumList] : []

Некоторые файлы не были показаны из-за большого количества измененных файлов