Browse Source

修改样式

lex-xin 3 months ago
parent
commit
9c6addf33e
31 changed files with 364 additions and 177 deletions
  1. BIN
      src/business-components/section-detail/images/icon_course_introduction.png
  2. BIN
      src/business-components/section-detail/images/icon_course_list.png
  3. BIN
      src/business-components/section-detail/images/icon_course_list_1.png
  4. 3 3
      src/business-components/section-detail/index.module.less
  5. 5 1
      src/business-components/section-detail/index.tsx
  6. BIN
      src/business-components/user-detail/images/icon-course.png
  7. 116 9
      src/business-components/user-detail/index.module.less
  8. 58 49
      src/business-components/user-detail/index.tsx
  9. BIN
      src/common/images/icon_timer4.png
  10. 4 0
      src/student/group-class/group-detail.module.less
  11. 10 10
      src/student/group-class/group-detail.tsx
  12. 5 1
      src/student/live-class/live-detail.module.less
  13. 11 25
      src/student/live-class/live-detail.tsx
  14. 5 1
      src/student/video-class/video-detail.module.less
  15. 4 3
      src/student/video-class/video-detail.tsx
  16. 1 1
      src/styles/index.less
  17. 15 0
      src/teacher/group-class/create-components/detail.module.less
  18. 7 5
      src/teacher/group-class/create-components/detail.tsx
  19. 2 0
      src/teacher/group-class/group-detail.tsx
  20. 10 2
      src/teacher/live-class/create-components/course.tsx
  21. 1 0
      src/teacher/live-class/create-components/createState.ts
  22. 15 0
      src/teacher/live-class/create-components/detail.module.less
  23. 5 6
      src/teacher/live-class/create-components/detail.tsx
  24. 4 2
      src/teacher/live-class/live-detail.tsx
  25. 13 1
      src/teacher/my-sheetMusic/index.tsx
  26. BIN
      src/views/award-activity/images/gift-bg.png
  27. BIN
      src/views/award-activity/images/gift-btn.png
  28. 20 0
      src/views/award-activity/index.module.less
  29. 41 55
      src/views/award-activity/index.tsx
  30. 7 1
      src/views/music/personal/collection.tsx
  31. 2 2
      vite.config.ts

BIN
src/business-components/section-detail/images/icon_course_introduction.png


BIN
src/business-components/section-detail/images/icon_course_list.png


BIN
src/business-components/section-detail/images/icon_course_list_1.png


+ 3 - 3
src/business-components/section-detail/index.module.less

@@ -6,15 +6,15 @@
   overflow: hidden;
 
   .name {
-    font-size: 16px;
-    color: #333333;
     font-weight: 500;
+    font-size: 15px;
+    color: #333333;
     padding-left: 8px;
   }
 
   :global {
     .van-cell {
-      padding: 10px 12px;
+      padding: 12px;
       font-size: 14px;
     }
   }

+ 5 - 1
src/business-components/section-detail/index.tsx

@@ -25,6 +25,10 @@ export default defineComponent({
       type: String,
       default: '课程介绍'
     },
+    groupBorder: {
+      type: Boolean,
+      default: false
+    },
     border: {
       type: Boolean,
       default: false
@@ -67,7 +71,7 @@ export default defineComponent({
   render() {
     return (
       <div class={styles['section-detail']}>
-        <CellGroup border={this.border}>
+        <CellGroup border={this.groupBorder}>
           {this.titleShow ? (
             <Cell
               center

BIN
src/business-components/user-detail/images/icon-course.png


+ 116 - 9
src/business-components/user-detail/index.module.less

@@ -1,14 +1,34 @@
 .userDetail {
+  position: relative;
   .banner {
     width: 100%;
     height: 212px;
     overflow: hidden;
     vertical-align: middle;
   }
+  .subjectName {
+    position: absolute;
+    top: 8px;
+    left: 8px;
+    background: rgba(0,0,0,0.4);
+    border-radius: 3px;
+    font-weight: 400;
+    font-size: 12px;
+    color: #FFFFFF;
+    line-height: 17px;
+    padding: 1px 6px;
+    z-index: 1;
+  }
 
   .userInfo {
     overflow: hidden;
 
+    :global {
+      .van-cell {
+        padding: 12px 14px;
+      }
+    }
+
     .avatar {
       width: 40px;
       height: 40px;
@@ -18,13 +38,35 @@
     }
 
     .name {
-      padding-left: 8px;
-      font-size: 16px;
-      font-weight: 500;
+      padding-left: 10px;
+      font-size: 15px;
+      font-weight: 400;
       color: #333333;
       line-height: 22px;
       display: flex;
       align-items: center;
+
+    }
+
+    .classInfo {
+      display: flex;
+      align-items: center;
+      font-weight: 400;
+      font-size: 12px;
+      color: #999999;
+      padding-left: 10px;
+      line-height: 1.5;
+      .iconCourse {
+        width: 12px;
+        height: 14px;
+        flex-shrink: 0;
+        margin-right: 6px;
+      }
+      span {
+        color: #333333;
+        font-weight: bold;
+        padding: 0 4px;
+      }
     }
 
     .username {
@@ -41,11 +83,47 @@
       }
     }
 
+    .timers {
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+      padding-top: 8px;
+      .timerSpan {
+        display: flex;
+        align-items: center;
+        font-size: 14px;
+        color: #666666;
+        font-weight: 400;
+      }
+    }
+
     .buyNum {
-      color: #ff802c;
+      color: #FF6827;
       font-size: 14px;
       text-align: right;
-      margin-top: 8px;
+    }
+
+    .buyNumVideo {
+      display: flex;
+      align-items: center;
+      flex-shrink: 0;
+      &::before {
+        content: '';
+        display: block;
+        width: 1px;
+        height: 11px;
+        background: #D3D3D3;
+        margin: 0 6px;
+      }
+    }
+    .buyNumOther {
+      font-weight: 400;
+      font-size: 12px;
+      line-height: 13px;
+      color: #FF6827;
+      background: rgba(255, 128, 44, 0.07);
+      border-radius: 2px;
+      padding: 3px 4px;
     }
 
     .buyNumInfo {
@@ -65,6 +143,26 @@
       line-height: 20px;
       color: #FF0000;
 
+      .prices {
+        font-family: DINAlternate, DINAlternate;
+        font-weight: bold;
+        font-size: 20px;
+        color: #F44541;
+        line-height: 24px;
+
+        .fix {
+          font-weight: bold;
+          font-size: 14px;
+          color: #F44541;
+        }
+      }
+
+      .classNum {
+        font-weight: 400;
+        font-size: 12px;
+        color: #999999;
+      }
+
       .infoPrice {
         font-size: 16px;
         font-weight: bold;
@@ -78,10 +176,18 @@
     }
 
     .userTitle {
-      font-size: 18px;
-      color: #1a1a1a;
-      font-weight: 500;
+      font-weight: 600;
+      font-size: 16px;
       display: block !important;
+      width: 100%;
+
+      >span {
+        display: block;
+        width: 100%;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+      }
     }
 
     :global {
@@ -103,6 +209,7 @@
 
       .van-cell__label {
         margin-top: 0;
+        overflow: hidden;
       }
     }
   }
@@ -128,4 +235,4 @@
   margin-right: 6px;
   width: 39px;
   height: 16px;
-}
+}

+ 58 - 49
src/business-components/user-detail/index.tsx

@@ -4,7 +4,8 @@ import styles from './index.module.less'
 
 // import iconUserNum from '@common/images/icon_user_num.png'
 import defaultIcon from '@common/images/icon_teacher.png'
-import iconTimer from '@common/images/icon_timer2.png'
+import iconTimer from '@common/images/icon_timer4.png'
+import iconCourse from './images/icon-course.png'
 // import IconXueli from '@common/images/icon-xueli.png'
 // import IconJiaozi from '@common/images/icon-jiaozi.png'
 // import item from '@/views/coupons/item'
@@ -16,12 +17,15 @@ import iconTimer from '@common/images/icon_timer2.png'
  * @param {type} buyNum 购买用户数
  * @param {type} payType 收费方式
  * @param {type} type 课程类型
+ * @param {type} subjectName 科目名称
  * @param {type} lessonPrice 价格
  * @param {type} lessonCoverUrl 视频封面
  * @param {type} lessonDesc 课程描述
  * @param {type} lessonNum 课程数
  * @param {type} lessonName 课程名称
  * @param {type} relationType 赠送类型
+ * @param {type} completeCourseNum 已上课时
+ * @param {type} isShowCourse 是否显示课程
  */
 interface UserType {
   headUrl: string
@@ -31,6 +35,7 @@ interface UserType {
   buyNum?: number
   payType?: string
   type?: string
+  subjectName?: string
   lessonPrice: number
   lessonNum?: number
   lessonDesc?: string
@@ -39,6 +44,8 @@ interface UserType {
   lessonName: string
   auditVersion: number
   relationType?: string
+  completeCourseNum?: number
+  isShowCourse?: boolean
 }
 
 export default defineComponent({
@@ -69,6 +76,7 @@ export default defineComponent({
   render() {
     return (
       <div class={styles.userDetail}>
+        {this.userInfo.subjectName ? <span class={styles.subjectName}>{this.userInfo.subjectName}</span> : ""}
         <Image
           class={[styles.banner]}
           src={this.userInfo.lessonCoverUrl}
@@ -78,24 +86,38 @@ export default defineComponent({
           <Cell
             title={this.userInfo.lessonName}
             titleClass={styles.userTitle}
+            labelClass={styles.userLabel}
             v-slots={{
               label: () =>
                 this.userInfo.startTime && (
                   <span
-                    style={{
-                      display: 'flex',
-                      alignItems: 'center',
-                      fontSize: '13px',
-                      paddingTop: 'var(--van-cell-label-margin-top)'
-                    }}
+                    class={styles.timers}
                   >
-                    <Icon
-                      name={iconTimer}
-                      size="16"
-                      style={{ marginRight: '5px' }}
-                    />
-                    开课时间:
-                    {this.userInfo.startTime}
+                    <div class={styles.timerSpan}>
+                      <Icon
+                        name={iconTimer}
+                        size="16"
+                        style={{ marginRight: '5px' }}
+                      />
+                      开课时间:
+                      {this.userInfo.startTime}
+                    </div>
+
+                    {this.showBuy && ['live', 'group'].includes(this.userInfo.type || '') && (
+                      <div class={[styles.buyNum, styles.buyNumOther]}>
+                        {this.userInfo.type === 'live' ? (
+                          <span>
+                            {this.userInfo.buyNum}人已
+                            {this.userInfo.lessonPrice <= 0 &&
+                            this.userInfo.auditVersion === 0
+                              ? '领取'
+                              : '购买'}
+                          </span>
+                        ) : this.userInfo.type === "group" ?
+                          ((this.userInfo.mixStudentNum || 0 > 0) ? <>剩余{this.userInfo.mixStudentNum}个名额</> : '')
+                        : ''}
+                      </div>
+                    )}
                   </span>
                 )
             }}
@@ -113,23 +135,27 @@ export default defineComponent({
                 />
               ),
               title: () => (
-                <div
-                  class={styles.name}
-                  onClick={() => {
-                    this.onUserDetail(this.userInfo)
-                  }}
-                >
-                  <div class={styles.username}>
-                    {this.userInfo.username || `游客${this.userInfo.id || ''}`}
-                    {/* <div>
-                      {(this.userInfo as any).isDegree && (
-                        <img class={styles.iconTeacher} src={IconXueli} />
-                      )}
-                      {(this.userInfo as any).isTeacher && (
-                        <img class={styles.iconTeacher} src={IconJiaozi} />
-                      )}
-                    </div> */}
+                <div>
+                  <div
+                    class={styles.name}
+                    onClick={() => {
+                      this.onUserDetail(this.userInfo)
+                    }}
+                  >
+                    <div class={styles.username}>
+                      {this.userInfo.username || `游客${this.userInfo.id || ''}`}
+                    </div>
+                    {this.showBuy && this.userInfo.type === 'video' && (
+                      <div class={[styles.buyNum, styles.buyNumVideo]}>
+                        {this.userInfo.buyNum}人学习
+                      </div>
+                    )}
                   </div>
+                  {this.userInfo.isShowCourse ? <div class={styles.classInfo}>
+                    <img src={iconCourse} class={styles.iconCourse} />
+                    已上课时<span>{this.userInfo.completeCourseNum || 0}</span>/总课时 <span>{this.userInfo.lessonNum || 0}</span>
+                  </div> : ''}
+                  
                 </div>
               ),
               value: () => (
@@ -140,7 +166,7 @@ export default defineComponent({
                   ) : (
                     <>
                       {this.userInfo.lessonPrice > 0 && (
-                        <>¥{this.userInfo.lessonPrice}</>
+                        <span class={styles.prices}><span class={styles.fix}>¥</span>{this.userInfo.lessonPrice}</span>
                       )}
                       {this.userInfo.lessonPrice <= 0 &&
                         this.userInfo.auditVersion !== 0 && <>¥{0}</>}
@@ -151,27 +177,10 @@ export default defineComponent({
                     </>
                   )}
                   <span
-                    style={{ color: '#999', fontSize: '14px', fontWeight: 400 }}
+                    class={styles.classNum}
                   >
                     /{this.userInfo.lessonNum}课时
                   </span>
-                  {this.showBuy && (
-                    <div class={styles.buyNum}>
-                      {this.userInfo.type === 'live' ? (
-                        <>
-                          {this.userInfo.buyNum}人已
-                          {this.userInfo.lessonPrice <= 0 &&
-                          this.userInfo.auditVersion === 0
-                            ? '领取'
-                            : '购买'}
-                        </>
-                      ) : this.userInfo.type === "group" ?
-                        ((this.userInfo.mixStudentNum || 0 > 0) ? <>剩余{this.userInfo.mixStudentNum}个名额</> : '')
-                       : (
-                        <>{this.userInfo.buyNum}人学习</>
-                      )}
-                    </div>
-                  )}
                 </div>
               )
             }}

BIN
src/common/images/icon_timer4.png


+ 4 - 0
src/student/group-class/group-detail.module.less

@@ -47,10 +47,14 @@
   .btnMore {
     display: flex;
     justify-content: space-around;
+    padding: 20px 28px 30px;
+    background: linear-gradient( 180deg, rgba(255,255,255,0) 0%, #FFFFFF 100%), #FFFDFD;
+    box-shadow: 0px 0px 2px 0px rgba(216,216,216,0.5);
 
     :global {
       .van-button {
         width: 100%;
+        font-size: 16px;
       }
     }
   }

+ 10 - 10
src/student/group-class/group-detail.tsx

@@ -19,6 +19,7 @@ import { browser } from '@/helpers/utils'
 import { tradeOrder } from '../trade/tradeOrder'
 import { courseType } from '@/constant'
 import GroupPlanStep from '@/business-components/group-plan-step'
+import TheSticky from '@/components/the-sticky'
 interface IProps {
   courseTime: string
   coursePlan: string
@@ -56,15 +57,14 @@ export default defineComponent({
         headUrl: live.avatar,
         username: live.userName || `游客${live.teacherId || ''}`,
         id: live.teacherId,
-        startTime:
-          `${dayjs(startTime).format('YYYY-MM-DD')} ${dayjs(startTime).format(
-            'HH:mm'
-          )}~${dayjs(endTime).format('HH:mm')}` || '',
+        startTime: `${dayjs(startTime).format('YYYY-MM-DD')} ${dayjs(startTime).format('HH:mm')}` || '',
         buyNum: live.studentCount,
         type: 'group',
         lessonId: live.courseGroupId,
         lessonPrice: live.coursePrice,
+        completeCourseNum: live.completeCourseNum,
         lessonNum: live.courseNum,
+        isShowCourse: live.status !== 'APPLY',
         mixStudentNum: studentNum > 0 ? studentNum : 0,
         lessonDesc: live.courseIntroduce,
         lessonCoverUrl: live.backgroundPic || live.backgroundPicTemplate,
@@ -349,8 +349,8 @@ export default defineComponent({
         </div> */}
         {this.courseInfo.length > 0 &&
           (this.live.existBuy !== 1 && this.live.existBuy !== 2) && (
-            <ColSticky position="bottom" background="white">
-              <div class={['btnGroup', styles.btnMore]}>
+            <TheSticky position="bottom">
+              <div class={["btnGroup", styles.btnMore]}>
                 <Button
                   block
                   round
@@ -361,17 +361,17 @@ export default defineComponent({
                   {this.live.coursePrice <= 0 ? '免费领取' : `立即购买`}
                 </Button>
               </div>
-            </ColSticky>
+            </TheSticky>
           )}
 
         {this.joinRoom == '1' && this.liveStatus.liveStatus !== 2 && (
-          <ColSticky position="bottom" background="white">
-            <div class={['btnGroup']} style={{ paddingTop: '12px' }}>
+          <TheSticky position="bottom">
+            <div class={["btnGroup", styles.btnMore]}>
               <Button block round type="primary" onClick={this.onJoinRoom}>
                 进入直播间
               </Button>
             </div>
-          </ColSticky>
+          </TheSticky>
         )}
 
         <Popup

+ 5 - 1
src/student/live-class/live-detail.module.less

@@ -47,10 +47,14 @@
   .btnMore {
     display: flex;
     justify-content: space-around;
+    padding: 20px 28px 30px;
+    background: linear-gradient( 180deg, rgba(255,255,255,0) 0%, #FFFFFF 100%), #FFFDFD;
+    box-shadow: 0px 0px 2px 0px rgba(216,216,216,0.5);
 
     :global {
       .van-button {
-        width: 60%;
+        width: 100%;
+        font-size: 16px;
       }
     }
   }

+ 11 - 25
src/student/live-class/live-detail.tsx

@@ -17,6 +17,7 @@ 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 TheSticky from '@/components/the-sticky'
 interface IProps {
   courseTime: string
   coursePlan: string
@@ -46,20 +47,19 @@ export default defineComponent({
       // console.log('live', live)
       const planList = live.planList || []
       const startTime = planList[0]?.startTime || new Date()
-      const endTime = planList[0]?.endTime || new Date()
+      // const endTime = planList[0]?.endTime || new Date()
       return {
         avatar: live.avatar,
         headUrl: live.avatar,
         username: live.userName || `游客${live.teacherId || ''}`,
         id: live.teacherId,
-        startTime:
-          `${dayjs(startTime).format('YYYY-MM-DD')} ${dayjs(startTime).format(
-            'HH:mm'
-          )}~${dayjs(endTime).format('HH:mm')}` || '',
+        startTime: `${dayjs(startTime).format('YYYY-MM-DD')} ${dayjs(startTime).format('HH:mm')}` || '',
         buyNum: live.studentCount,
         type: 'live',
         lessonId: live.courseGroupId,
         lessonPrice: live.coursePrice,
+        isShowCourse: live.status !== 'APPLY',
+        completeCourseNum: live.completeCourseNum,
         lessonNum: live.courseNum,
         lessonDesc: live.courseIntroduce,
         lessonCoverUrl: live.backgroundPic || live.backgroundPicTemplate,
@@ -331,15 +331,8 @@ export default defineComponent({
           </p>
         </div>
         {this.courseInfo.length > 0 && this.live.existBuy !== 1 && (
-          // <Sticky offsetBottom={0} position="bottom">
-          //   <div class={['btnGroup', styles.btnMore]}>
-          //     <Button block round type="primary" onClick={this.onBuy}>
-          //       {this.live.coursePrice <= 0 ? '免费领取' : `立即购买`}
-          //     </Button>
-          //   </div>
-          // </Sticky>
-          <ColSticky position="bottom" background="white">
-            <div class={['btnGroup', styles.btnMore]}>
+          <TheSticky position="bottom">
+            <div class={["btnGroup", styles.btnMore]}>
               <Button
                 block
                 round
@@ -350,24 +343,17 @@ export default defineComponent({
                 {this.live.coursePrice <= 0 ? '免费领取' : `立即购买`}
               </Button>
             </div>
-          </ColSticky>
+          </TheSticky>
         )}
 
         {this.joinRoom == '1' && this.liveStatus.liveStatus !== 2 && (
-          // <Sticky offsetBottom={0} position="bottom">
-          //   <div class={['btnGroup']} style={{ paddingTop: '12px' }}>
-          //     <Button block round type="primary" onClick={this.onJoinRoom}>
-          //       进入直播间
-          //     </Button>
-          //   </div>
-          // </Sticky>
-          <ColSticky position="bottom" background="white">
-            <div class={['btnGroup']} style={{ paddingTop: '12px' }}>
+          <TheSticky position="bottom">
+            <div class={["btnGroup", styles.btnMore]}>
               <Button block round type="primary" onClick={this.onJoinRoom}>
                 进入直播间
               </Button>
             </div>
-          </ColSticky>
+          </TheSticky>
         )}
 
         <Popup

+ 5 - 1
src/student/video-class/video-detail.module.less

@@ -17,10 +17,14 @@
   .btnMore {
     display: flex;
     justify-content: space-around;
+    padding: 20px 28px 30px;
+    background: linear-gradient( 180deg, rgba(255,255,255,0) 0%, #FFFFFF 100%), #FFFDFD;
+    box-shadow: 0px 0px 2px 0px rgba(216,216,216,0.5);
 
     :global {
       .van-button {
-        width: 55%;
+        width: 100%;
+        font-size: 16px;
       }
     }
   }

+ 4 - 3
src/student/video-class/video-detail.tsx

@@ -16,6 +16,7 @@ import LiveItem from '@/views/live-class/live-item'
 import { setLogin, state } from '@/state'
 import { browser } from '@/helpers/utils'
 import { usePageVisibility } from '@vant/use'
+import TheSticky from '@/components/the-sticky'
 export default defineComponent({
   name: 'VideoDetail',
   data() {
@@ -64,7 +65,6 @@ export default defineComponent({
         )
         const result = res.data || {}
         const lessonGroup = result.lessonGroup || {}
-        // const teachertTag = result.teachertTag || ''
         const userInfo = state.user.data as any
         const alreadyBuy =
           lessonGroup.payType === 'VIP'
@@ -84,6 +84,7 @@ export default defineComponent({
           lessonName: lessonGroup.lessonName,
           payType: lessonGroup.payType,
           type: 'video',
+          subjectName: lessonGroup.lessonSubjectName,
           lessonDesc: lessonGroup.lessonDesc,
           lessonPrice: lessonGroup.lessonPrice,
           relationType: lessonGroup.relationType,
@@ -327,7 +328,7 @@ export default defineComponent({
           //     </Button>
           //   </div>
           // </Sticky>
-          <ColSticky position="bottom" background="white">
+          <TheSticky position="bottom">
             <div class={['btnGroup', styles.btnMore]}>
               <Button
                 block
@@ -343,7 +344,7 @@ export default defineComponent({
                   : `立即购买`}
               </Button>
             </div>
-          </ColSticky>
+          </TheSticky>
         )}
 
         <Popup

+ 1 - 1
src/styles/index.less

@@ -102,7 +102,7 @@
 }
 
 #app {
-  font-family: Avenir, Helvetica, Arial, sans-serif;
+  font-family: Helvetica, Arial, sans-serif, Avenir;
   -webkit-font-smoothing: antialiased;
   -moz-osx-font-smoothing: grayscale;
   color: #2c3e50;

+ 15 - 0
src/teacher/group-class/create-components/detail.module.less

@@ -1,2 +1,17 @@
 .detail {
+    .btnMore {
+        display: flex;
+        align-items: center;
+        padding: 20px 28px 30px;
+        background: linear-gradient( 180deg, rgba(255,255,255,0) 0%, #FFFFFF 100%), #FFFDFD;
+        box-shadow: 0px 0px 2px 0px rgba(216,216,216,0.5);
+        :global {
+            .van-button {
+                font-size: 16px;
+                & + .van-button {
+                    margin-left: 10px;
+                }
+            }
+        }
+    }
 }

+ 7 - 5
src/teacher/group-class/create-components/detail.tsx

@@ -10,6 +10,7 @@ import styles from './detail.module.less'
 import dayjs from 'dayjs'
 import { postMessage } from '@/helpers/native-message'
 import GroupPlanStep from '@/business-components/group-plan-step'
+import TheSticky from '@/components/the-sticky'
 interface IProps {
   courseTime: string
   coursePlan: string
@@ -24,7 +25,7 @@ export default defineComponent({
   computed: {
     userInfo() {
       const startTime = createState.live.coursePlanList[0].startTime
-      const endTime = createState.live.coursePlanList[0].endTime
+      // const endTime = createState.live.coursePlanList[0].endTime
       return {
         headUrl: state.user.data?.heardUrl,
         username:
@@ -32,13 +33,14 @@ export default defineComponent({
         startTime:
           `${dayjs(startTime).format('YYYY-MM-DD')} ${dayjs(startTime).format(
             'HH:mm'
-          )}~${dayjs(endTime).format('HH:mm')}` || '',
+          )}` || '',
         buyNum: 0,
         type: 'group',
         mixStudentNum: createState.live.mixStudentNum,
         lessonPrice: createState.live.coursePrice,
         lessonNum: createState.live.courseNum,
         lessonDesc: createState.live.courseIntroduce,
+        subjectName: createState.live.subjectName,
         lessonCoverUrl:
           createState.live.backgroundPic ||
           createState.live.backgroundPicTemplate,
@@ -160,8 +162,8 @@ export default defineComponent({
           <CoursePlanStep courseInfo={this.courseInfo} />
         </SectionDetail> */}
 
-        <Sticky offsetBottom={0} position="bottom">
-          <div class={['btnGroup', 'btnMore']} style={{ paddingTop: '12px' }}>
+        <TheSticky position="bottom">
+          <div class={['btnGroup', styles.btnMore]}>
             <Button
               block
               round
@@ -184,7 +186,7 @@ export default defineComponent({
             )}
             
           </div>
-        </Sticky>
+        </TheSticky>
       </div>
     )
   }

+ 2 - 0
src/teacher/group-class/group-detail.tsx

@@ -61,6 +61,8 @@ export default defineComponent({
         type: 'group',
         mixStudentNum: studentNum > 0 ? studentNum : 0,
         lessonId: live.courseGroupId,
+        completeCourseNum: live.completeCourseNum,
+        isShowCourse: live.status !== 'APPLY',
         lessonNum: live.courseNum || 0, // 课时数
         lessonDesc: live.courseIntroduce,
         lessonCoverUrl: live.backgroundPic || live.backgroundPicTemplate,

+ 10 - 2
src/teacher/live-class/create-components/course.tsx

@@ -13,6 +13,7 @@ import {
 import request from '@/helpers/request'
 import { state } from '@/state'
 import ColHeader from '@/components/col-header'
+import TheSticky from '@/components/the-sticky'
 
 // 校验函数返回 true 表示校验通过,false 表示不通过
 export const validator = val => {
@@ -92,6 +93,13 @@ export default defineComponent({
   methods: {
     onChoice(id: number) {
       createState.live.subjectId = id
+      let tempStr = ''
+      this.subjectList.forEach((item: any) => {
+        if (id == item.id) {
+          tempStr = item.name
+        }
+      })
+      createState.live.subjectName = tempStr
       this.subjectStatus = false
     },
     onFormatter(val: any) {
@@ -230,13 +238,13 @@ export default defineComponent({
           </div>
         )}
 
-        <Sticky offsetBottom={0} position="bottom">
+        <TheSticky position="bottom">
           <div class={'btnGroup'}>
             <Button block round type="primary" native-type="submit">
               下一步
             </Button>
           </div>
-        </Sticky>
+        </TheSticky>
 
         <ColPopup v-model={this.subjectStatus}>
           <ColHeader title="选择声部" />

+ 1 - 0
src/teacher/live-class/create-components/createState.ts

@@ -26,6 +26,7 @@ export const createState = reactive({
     courseGroupId: '',
     name: '',
     subjectId: null as any,
+    subjectName: '',
     courseIntroduce: '',
     courseNum: null as any,
     singleCourseMinutes: 0,

+ 15 - 0
src/teacher/live-class/create-components/detail.module.less

@@ -1,2 +1,17 @@
 .detail {
+    .btnMore {
+        display: flex;
+        align-items: center;
+        padding: 20px 28px 30px;
+        background: linear-gradient( 180deg, rgba(255,255,255,0) 0%, #FFFFFF 100%), #FFFDFD;
+        box-shadow: 0px 0px 2px 0px rgba(216,216,216,0.5);
+        :global {
+            .van-button {
+                font-size: 16px;
+                & + .van-button {
+                    margin-left: 10px;
+                }
+            }
+        }
+    }
 }

+ 5 - 6
src/teacher/live-class/create-components/detail.tsx

@@ -9,6 +9,7 @@ import { createState } from './createState'
 import styles from './detail.module.less'
 import dayjs from 'dayjs'
 import { postMessage } from '@/helpers/native-message'
+import TheSticky from '@/components/the-sticky'
 interface IProps {
   courseTime: string
   coursePlan: string
@@ -22,7 +23,6 @@ export default defineComponent({
   computed: {
     userInfo() {
       const startTime = createState.live.coursePlanList[0].startTime
-      const endTime = createState.live.coursePlanList[0].endTime
       return {
         headUrl: state.user.data?.heardUrl,
         username:
@@ -30,7 +30,7 @@ export default defineComponent({
         startTime:
           `${dayjs(startTime).format('YYYY-MM-DD')} ${dayjs(startTime).format(
             'HH:mm'
-          )}~${dayjs(endTime).format('HH:mm')}` || '',
+          )}` || '',
         buyNum: 0,
         lessonPrice: createState.live.coursePrice,
         lessonNum: createState.live.courseNum,
@@ -153,8 +153,8 @@ export default defineComponent({
           <CoursePlanStep courseInfo={this.courseInfo} />
         </SectionDetail>
 
-        <Sticky offsetBottom={0} position="bottom">
-          <div class={['btnGroup', 'btnMore']}>
+        <TheSticky position="bottom">
+          <div class={['btnGroup', styles.btnMore]}>
             <Button
               block
               round
@@ -175,9 +175,8 @@ export default defineComponent({
                 创建成功
               </Button>
             )}
-            
           </div>
-        </Sticky>
+        </TheSticky>
       </div>
     )
   }

+ 4 - 2
src/teacher/live-class/live-detail.tsx

@@ -42,7 +42,7 @@ export default defineComponent({
       const live = this.live as any
       const planList = live.planList || []
       const startTime = planList[0]?.startTime || new Date()
-      const endTime = planList[0]?.endTime || new Date()
+      // const endTime = planList[0]?.endTime || new Date()
       return {
         headUrl: live.avatar,
         avatar: live.avatar,
@@ -51,11 +51,13 @@ export default defineComponent({
         startTime:
           `${dayjs(startTime).format('YYYY-MM-DD')} ${dayjs(startTime).format(
             'HH:mm'
-          )}~${dayjs(endTime).format('HH:mm')}` || '',
+          )}` || '',
         lessonPrice: live.coursePrice,
         buyNum: live.studentCount || 0,
         type: 'live',
         lessonId: live.courseGroupId,
+        completeCourseNum: live.completeCourseNum, // 已上课时
+        isShowCourse: live.status !== 'APPLY', // 是否显示课程
         lessonNum: live.courseNum || 0, // 课时数
         lessonDesc: live.courseIntroduce,
         lessonCoverUrl: live.backgroundPic || live.backgroundPicTemplate,

+ 13 - 1
src/teacher/my-sheetMusic/index.tsx

@@ -17,6 +17,7 @@ export default defineComponent({
     const activeTab = ref('personal')
     const personal = ref()
     const collection = ref()
+    const collection2 = ref()
     const practice = ref()
     const height = ref<any>('auto')
     onMounted(() => {
@@ -63,7 +64,18 @@ export default defineComponent({
                 <Collection
                   ref={collection}
                   onFavorite={() => {
-                    practice.value?.reload?.()
+                    collection.value?.reload?.()
+                  }}
+                />
+              </div>
+            </Tab>
+            <Tab title="收藏机构单曲" name="collection">
+              <div class={styles.container}>
+                <Collection
+                  type="TENANT"
+                  ref={collection2}
+                  onFavorite={() => {
+                    collection2.value?.reload?.()
                   }}
                 />
               </div>

BIN
src/views/award-activity/images/gift-bg.png


BIN
src/views/award-activity/images/gift-btn.png


+ 20 - 0
src/views/award-activity/index.module.less

@@ -92,3 +92,23 @@
     }
   }
 }
+
+.popupGift {
+  background: transparent;
+}
+.popupContainerGift {
+  position: relative;
+  .giftBg {
+    width: 279px;
+    height: 308px;
+  }
+
+  .giftBtn {
+    position: absolute;
+    bottom: 51px;
+    left: 50%;
+    transform: translateX(-50%);
+    width: 133px;
+    z-index: 1;
+  }
+}

+ 41 - 55
src/views/award-activity/index.tsx

@@ -1,7 +1,9 @@
 import { CellGroup, Cell, Image, Button, Popup, List } from 'vant'
 import { defineComponent } from 'vue'
 import styles from './index.module.less'
-import award from './images/award.png'
+// import award from './images/award.png'
+import giftBg from './images/gift-bg.png'
+import giftBtn from './images/gift-btn.png'
 import cert from './images/cert.png'
 import request from '@/helpers/request'
 import ColResult from '@/components/col-result'
@@ -16,7 +18,7 @@ export default defineComponent({
   data() {
     return {
       status: false,
-      type: 'auth',
+      statusGift: false,
       list: [],
       dataShow: true, // 判断是否有数据
       loading: false,
@@ -68,8 +70,7 @@ export default defineComponent({
         await request.post(
           `${state.platformApi}/activity/receiveReward/${this.receiveRewardId}`
         )
-        this.status = true
-        this.type = 'success'
+        this.statusGift = true
         this.receiveRewardId = null
       } catch {
         //
@@ -167,58 +168,43 @@ export default defineComponent({
 
         <Popup v-model:show={this.status} class={styles.popup}>
           <div class={styles.popupContainer}>
-            {this.type === 'auth' && (
-              <>
-                <Image src={cert} class={styles.cert} />
-                <h3>您还没有实名认证</h3>
-                <p>完成实名认证后即可领取奖品</p>
-                <div class={[styles.btnGroup, styles.btnMore]}>
-                  <Button
-                    type="primary"
-                    block
-                    class={styles.lastBtn}
-                    onClick={() => {
-                      this.status = false
-                    }}
-                  >
-                    以后再说
-                  </Button>
-                  <Button
-                    type="primary"
-                    block
-                    color="linear-gradient(180deg, #59E5D5 0%, #2DC7AA 100%)"
-                    onClick={() => {
-                      this.popupShow = true
-                    }}
-                  >
-                    立即认证
-                  </Button>
-                </div>
-              </>
-            )}
+            <Image src={cert} class={styles.cert} />
+            <h3>您还没有实名认证</h3>
+            <p>完成实名认证后即可领取奖品</p>
+            <div class={[styles.btnGroup, styles.btnMore]}>
+              <Button
+                type="primary"
+                block
+                class={styles.lastBtn}
+                onClick={() => {
+                  this.status = false
+                }}
+              >
+                以后再说
+              </Button>
+              <Button
+                type="primary"
+                block
+                color="linear-gradient(180deg, #59E5D5 0%, #2DC7AA 100%)"
+                onClick={() => {
+                  this.popupShow = true
+                }}
+              >
+                立即认证
+              </Button>
+            </div>
+          </div>
+        </Popup>
 
-            {this.type === 'success' && (
-              <>
-                <Image src={award} class={styles.award} />
-                <h3>奖品领取成功!</h3>
-                <p>请耐心等待,活动奖品将会到达~</p>
-                <div class={[styles.btnGroup]}>
-                  <Button
-                    type="primary"
-                    block
-                    color="linear-gradient(180deg, #59E5D5 0%, #2DC7AA 100%)"
-                    onClick={() => {
-                      this.status = false
-                      this.list = []
-                      this.params.page = 1
-                      this.getList()
-                    }}
-                  >
-                    我知道了
-                  </Button>
-                </div>
-              </>
-            )}
+        <Popup v-model:show={this.statusGift} class={styles.popupGift}>
+          <div class={styles.popupContainerGift}>
+            <Image src={giftBg} class={styles.giftBg} />
+            <img src={giftBtn} class={styles.giftBtn} onClick={() => {
+                  this.statusGift = false
+                  this.list = []
+                  this.params.page = 1
+                  this.getList()
+                }} />
           </div>
         </Popup>
 

+ 7 - 1
src/views/music/personal/collection.tsx

@@ -9,6 +9,12 @@ import Song from '../component/song'
 
 export default defineComponent({
   name: 'MusicList',
+  props: {
+    type: {
+      type: String,
+      default: ''
+    }
+  },
   emits: ['favorite'],
   setup(props, { expose, emit }) {
     const route = useRoute()
@@ -95,7 +101,7 @@ export default defineComponent({
         ) : (
           !loading.value && (
             <ColResult
-              tips="暂无收藏单曲"
+              tips={props.type === 'TENANT' ? '暂无收藏机构单曲' : '暂无收藏单曲'}
               classImgSize="SMALL"
               btnStatus={false}
             />

+ 2 - 2
vite.config.ts

@@ -12,7 +12,7 @@ function resolve(dir: string) {
 // https://vitejs.dev/config/
 // https://github.com/vitejs/vite/issues/1930 .env
 // const proxyUrl = 'https://online.colexiu.com/'
-const proxyUrl = 'https://dev.colexiu.com/'
+const proxyUrl = 'https://test.colexiu.com/'
 // const proxyUrl = 'http://192.168.3.14:8000/'
 export default defineConfig({
   base: './',
@@ -67,7 +67,7 @@ export default defineConfig({
   server: {
     host: '0.0.0.0',
     port: 5000,
-    strictPort: true,
+    // strictPort: true,
     cors: true,
     proxy: {
       '/api-auth': {