Browse Source

Merge branch 'iteration-20240624' into jenkins

lex 1 year ago
parent
commit
6f71cec5e5

+ 131 - 123
src/business-components/user-detail/index.module.less

@@ -1,123 +1,131 @@
-.userDetail {
-  .banner {
-    width: 100%;
-    height: 212px;
-    overflow: hidden;
-    vertical-align: middle;
-  }
-
-  .userInfo {
-    overflow: hidden;
-
-    .avatar {
-      width: 40px;
-      height: 40px;
-      border-radius: 50%;
-      overflow: hidden;
-      flex-shrink: 0;
-    }
-
-    .name {
-      padding-left: 8px;
-      font-size: 16px;
-      font-weight: 500;
-      color: #333333;
-      line-height: 22px;
-      display: flex;
-      align-items: center;
-    }
-    .username {
-      max-width: 100px;
-      white-space: nowrap;
-      text-overflow: ellipsis;
-      overflow: hidden;
-      .userHonor {
-        width: 39px;
-        height: 16px;
-        margin-top: 4px;
-        margin-right: 6px;
-      }
-    }
-
-    .buyNum {
-      color: #ff802c;
-      font-size: 14px;
-      text-align: right;
-      margin-top: 8px;
-    }
-
-    .buyNumInfo {
-      font-size: 14px;
-      line-height: 20px;
-      color: #ff802c;
-      .iconBuy {
-        margin-right: 5px;
-      }
-    }
-
-    .info {
-      font-size: 16px;
-      font-weight: 600;
-      color: var(--van-primary);
-      line-height: 20px;
-      color: #fa6400;
-      .infoPrice {
-        font-size: 16px;
-        font-weight: bold;
-      }
-      .infoNum {
-        font-size: 14px;
-        color: #999;
-        font-weight: 400;
-      }
-    }
-
-    .userTitle {
-      font-size: 18px;
-      color: #1a1a1a;
-      font-weight: 500;
-      display: block !important;
-    }
-    :global {
-      .van-cell {
-        padding: 12px 14px;
-        align-items: center;
-      }
-      .van-cell__title {
-        display: flex;
-        align-items: center;
-      }
-
-      .van-cell__value {
-        display: flex;
-        flex-direction: column;
-        justify-content: space-between;
-      }
-
-      .van-cell__label {
-        margin-top: 0;
-      }
-    }
-  }
-
-  .buyTips {
-    font-size: 12px;
-    color: #ff8900;
-    padding: 3px 10px !important;
-    background: #ffefe0;
-    border-radius: 6px;
-    margin: 0 14px 12px;
-    width: auto;
-    span {
-      line-height: 21px;
-      color: #ff8900;
-    }
-  }
-}
-
-.iconTeacher {
-  margin-top: 3px;
-  margin-right: 6px;
-  width: 39px;
-  height: 16px;
-}
+.userDetail {
+  .banner {
+    width: 100%;
+    height: 212px;
+    overflow: hidden;
+    vertical-align: middle;
+  }
+
+  .userInfo {
+    overflow: hidden;
+
+    .avatar {
+      width: 40px;
+      height: 40px;
+      border-radius: 50%;
+      overflow: hidden;
+      flex-shrink: 0;
+    }
+
+    .name {
+      padding-left: 8px;
+      font-size: 16px;
+      font-weight: 500;
+      color: #333333;
+      line-height: 22px;
+      display: flex;
+      align-items: center;
+    }
+
+    .username {
+      max-width: 100px;
+      white-space: nowrap;
+      text-overflow: ellipsis;
+      overflow: hidden;
+
+      .userHonor {
+        width: 39px;
+        height: 16px;
+        margin-top: 4px;
+        margin-right: 6px;
+      }
+    }
+
+    .buyNum {
+      color: #ff802c;
+      font-size: 14px;
+      text-align: right;
+      margin-top: 8px;
+    }
+
+    .buyNumInfo {
+      font-size: 14px;
+      line-height: 20px;
+      color: #ff802c;
+
+      .iconBuy {
+        margin-right: 5px;
+      }
+    }
+
+    .info {
+      font-size: 16px;
+      font-weight: 600;
+      color: var(--van-primary);
+      line-height: 20px;
+      color: #FF0000;
+
+      .infoPrice {
+        font-size: 16px;
+        font-weight: bold;
+      }
+
+      .infoNum {
+        font-size: 14px;
+        color: #999;
+        font-weight: 400;
+      }
+    }
+
+    .userTitle {
+      font-size: 18px;
+      color: #1a1a1a;
+      font-weight: 500;
+      display: block !important;
+    }
+
+    :global {
+      .van-cell {
+        padding: 12px 14px;
+        align-items: center;
+      }
+
+      .van-cell__title {
+        display: flex;
+        align-items: center;
+      }
+
+      .van-cell__value {
+        display: flex;
+        flex-direction: column;
+        justify-content: space-between;
+      }
+
+      .van-cell__label {
+        margin-top: 0;
+      }
+    }
+  }
+
+  .buyTips {
+    font-size: 12px;
+    color: #ff8900;
+    padding: 3px 10px !important;
+    background: #ffefe0;
+    border-radius: 6px;
+    margin: 0 14px 12px;
+    width: auto;
+
+    span {
+      line-height: 21px;
+      color: #ff8900;
+    }
+  }
+}
+
+.iconTeacher {
+  margin-top: 3px;
+  margin-right: 6px;
+  width: 39px;
+  height: 16px;
+}

+ 14 - 1
src/business-components/user-detail/index.tsx

@@ -7,6 +7,7 @@ import defaultIcon from '@common/images/icon_teacher.png'
 import iconTimer from '@common/images/icon_timer2.png'
 import IconXueli from '@common/images/icon-xueli.png'
 import IconJiaozi from '@common/images/icon-jiaozi.png'
+import item from '@/views/coupons/item'
 /**
  * @description: 视频详情
  * @param {type} headUrl 头像
@@ -14,6 +15,7 @@ import IconJiaozi from '@common/images/icon-jiaozi.png'
  * @param {type} startTime 开始时间
  * @param {type} buyNum 购买用户数
  * @param {type} payType 收费方式
+ * @param {type} type 课程类型
  * @param {type} lessonPrice 价格
  * @param {type} lessonCoverUrl 视频封面
  * @param {type} lessonDesc 课程描述
@@ -28,6 +30,7 @@ interface UserType {
   id?: number
   buyNum?: number
   payType?: string
+  type?: string
   lessonPrice: number
   lessonNum?: number
   lessonDesc?: string
@@ -153,7 +156,17 @@ export default defineComponent({
                   </span>
                   {this.showBuy && (
                     <div class={styles.buyNum}>
-                      {this.userInfo.buyNum}人学习
+                      {this.userInfo.type === 'live' ? (
+                        <>
+                          {this.userInfo.buyNum}人已
+                          {this.userInfo.lessonPrice <= 0 &&
+                          this.userInfo.auditVersion === 0
+                            ? '领取'
+                            : '购买'}
+                        </>
+                      ) : (
+                        <>{this.userInfo.buyNum}人学习</>
+                      )}
                     </div>
                   )}
                 </div>

+ 1 - 0
src/student/live-class/live-detail.tsx

@@ -56,6 +56,7 @@ export default defineComponent({
             'HH:mm'
           )}~${dayjs(endTime).format('HH:mm')}` || '',
         buyNum: live.studentCount,
+        type: 'live',
         lessonId: live.courseGroupId,
         lessonPrice: live.coursePrice,
         lessonNum: live.courseNum,

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

@@ -83,6 +83,7 @@ export default defineComponent({
           lessonNum: lessonGroup.lessonCount,
           lessonName: lessonGroup.lessonName,
           payType: lessonGroup.payType,
+          type: 'video',
           lessonDesc: lessonGroup.lessonDesc,
           lessonPrice: lessonGroup.lessonPrice,
           relationType: lessonGroup.relationType,

+ 1 - 0
src/teacher/live-class/live-detail.tsx

@@ -54,6 +54,7 @@ export default defineComponent({
           )}~${dayjs(endTime).format('HH:mm')}` || '',
         lessonPrice: live.coursePrice,
         buyNum: live.studentCount || 0,
+        type: 'live',
         lessonId: live.courseGroupId,
         lessonNum: live.courseNum || 0, // 课时数
         lessonDesc: live.courseIntroduce,

+ 1 - 0
src/teacher/share-page/share-live/index.tsx

@@ -53,6 +53,7 @@ export default defineComponent({
           `${dayjs(startTime).format('YYYY-MM-DD')} ${dayjs(startTime).format(
             'HH:mm'
           )}~${dayjs(endTime).format('HH:mm')}` || '',
+        type: 'live',
         lessonPrice: live.coursePrice,
         buyNum: live.studentCount || 0,
         lessonNum: live.courseNum || 0, // 课时数

+ 1 - 0
src/teacher/share-page/share-video/index.tsx

@@ -97,6 +97,7 @@ export default defineComponent({
         buyNum: lessonGroup.countStudent,
         lessonNum: lessonGroup.lessonCount,
         payType: lessonGroup.payType,
+        type: 'video',
         lessonName: lessonGroup.lessonName,
         lessonDesc: lessonGroup.lessonDesc,
         lessonPrice: lessonGroup.lessonPrice,

+ 1 - 0
src/teacher/video-class/create-submit.tsx

@@ -22,6 +22,7 @@ export default defineComponent({
         lessonName: videoDetail.lessonName,
         buyNum: 0,
         payType: videoDetail.payType,
+        type: 'video',
         lessonDesc: videoDetail.lessonDesc,
         lessonPrice: videoDetail.lessonPrice,
         lessonCoverUrl:

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

@@ -59,6 +59,7 @@ export default defineComponent({
         lessonId: result.lessonGroup.id,
         lessonNum: result.lessonGroup.lessonCount,
         payType: result.lessonGroup.payType,
+        type: 'video',
         lessonName: result.lessonGroup.lessonName,
         lessonDesc: result.lessonGroup.lessonDesc,
         lessonPrice: result.lessonGroup.lessonPrice,

+ 1 - 1
vite.config.ts

@@ -13,7 +13,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: './',