Ver código fonte

Merge branch 'classchange' into dev

lex 3 anos atrás
pai
commit
2a552cf35a

+ 1 - 0
src/components/col-upload/index.tsx

@@ -168,6 +168,7 @@ export default defineComponent({
           onExceed={this.handleExceed}
           ref="uploadRef"
           class={this.uploadType === 'file' ? styles.fileUpload : ''}
+          style={{ lineHeight: '0' }}
         >
           <div
             ref="uploadDom"

+ 23 - 8
src/views/user-info/components/item/index.tsx

@@ -18,17 +18,32 @@ export default defineComponent({
         onClick={() => {
           console.log(item)
           if (item.type === 'video') {
-            this.$router.push({
-              path: '/videoDetail',
-              query: {
-                id: item.id
-              }
-            })
+            if (item.shelvesFlag === 0) {
+              this.$router.push({
+                path: '/userInfo/videoOperation',
+                query: {
+                  type: 'edit',
+                  groupId: item.id
+                }
+              })
+              return
+            } else {
+              this.$router.push({
+                path: '/videoDetail',
+                query: {
+                  id: item.id
+                }
+              })
+            }
           }
-          if (item.type === 'live' && item.status === "CANCEL"){ // 直播课
+          if (
+            item.type === 'live' &&
+            (item.status === 'CANCEL' || item.status === 'OUT_SALE')
+          ) {
+            // 直播课
             this.$router.push({
               path: '/userInfo/liveOperation',
-              query:{
+              query: {
                 type: 'edit',
                 groupId: item.courseGroupId
               }

+ 4 - 1
src/views/user-info/live-class/index.tsx

@@ -60,9 +60,12 @@ export default defineComponent({
           <ElTabPane label="已取消" name="CANCEL">
             {this.activeName === 'CANCEL' && <List groupStatus="CANCEL" />}
           </ElTabPane>
+          <ElTabPane label="已下架" name="OUT_SALE">
+            {this.activeName === 'OUT_SALE' && <List groupStatus="OUT_SALE" />}
+          </ElTabPane>
         </ElTabs>
         {/* 课程组状态 ING(进行中) NOT_SALE(未开售,未上架) APPLY(报名中,销售中)
-        COMPLETE(已完成) CANCEL(已取消) */}
+        COMPLETE(已完成) CANCEL(已取消) OUT_SALE(已下架) */}
       </div>
     )
   }

+ 10 - 0
src/views/user-info/music-class/index.tsx

@@ -84,6 +84,16 @@ export default defineComponent({
               />
             )}
           </ElTabPane>
+          <ElTabPane label="已下架" name="OUT_SALE">
+            {this.activeName === 'OUT_SALE' && (
+              <List
+                auditStatus="OUT_SALE"
+                onNumber={(data: any) => {
+                  this.num = data
+                }}
+              />
+            )}
+          </ElTabPane>
         </ElTabs>
       </div>
     )

+ 8 - 3
src/views/user-info/music-class/list.tsx

@@ -112,9 +112,15 @@ export default defineComponent({
                   <MusicItem
                     onClick={(item: any) => {
                       if (['PASS', 'DOING'].includes(this.auditStatus)) {
-                        this.$router.push({ path: '/muiscDetial', query: { id: item.id } })
+                        this.$router.push({
+                          path: '/muiscDetial',
+                          query: { id: item.id }
+                        })
                       }
-                      if (this.auditStatus === 'UNPASS') {
+                      if (
+                        this.auditStatus === 'UNPASS' ||
+                        this.auditStatus === 'OUT_SALE'
+                      ) {
                         console.log(item)
                         this.$router.push({
                           path: '/userInfo/musicOperation',
@@ -124,7 +130,6 @@ export default defineComponent({
                           }
                         })
                       }
-                      
                     }}
                     item={{
                       id: item.id,

+ 3 - 0
src/views/user-info/video-class/index.tsx

@@ -43,6 +43,9 @@ export default defineComponent({
           <ElTabPane label="审核失败" name="UNPASS">
             {this.activeName === 'UNPASS' && <List auditStatus="UNPASS" />}
           </ElTabPane>
+          <ElTabPane label="已下架" name="OUT_SALE">
+            {this.activeName === 'OUT_SALE' && <List auditStatus="OUT_SALE" />}
+          </ElTabPane>
         </ElTabs>
       </div>
     )

+ 2 - 1
src/views/user-info/video-class/list.tsx

@@ -144,7 +144,8 @@ export default defineComponent({
                         avatar: item.avatar,
                         teacherName: item.username,
                         coursePrice: item.lessonPrice,
-                        courseNum: item.lessonCount
+                        courseNum: item.lessonCount,
+                        shelvesFlag: item.shelvesFlag
                       }}
                     />
                   </div>

+ 2 - 0
src/views/user-info/video-operation/course-content/index.module.less

@@ -13,6 +13,8 @@
     }
     .el-dialog {
       --el-dialog-width: 375px !important;
+      border-radius: 10px;
+      overflow: hidden;
     }
 
     .el-dialog__body {