Kaynağa Gözat

Merge branch 'iteration-20240715' into ponline

lex 8 ay önce
ebeveyn
işleme
8db99e0ee2
97 değiştirilmiş dosya ile 4640 ekleme ve 2215 silme
  1. BIN
      src/common/images/icon_member.png
  2. BIN
      src/common/images/icon_member_svip.png
  3. BIN
      src/components/col-share/images/vip1.png
  4. 7 3
      src/components/col-share/index.module.less
  5. 1 0
      src/components/col-share/index.tsx
  6. 1 1
      src/components/col-share/share-item.tsx
  7. 21 0
      src/components/the-noticeBar/index.module.less
  8. 105 0
      src/components/the-noticeBar/index.tsx
  9. 12 2
      src/constant/index.ts
  10. 1 1
      src/helpers/request.ts
  11. BIN
      src/student/teacher-dependent/images/svip_active.png
  12. BIN
      src/student/teacher-dependent/images/vip_active.png
  13. 398 355
      src/student/teacher-dependent/model/teacher-header.module.less
  14. 331 313
      src/student/teacher-dependent/model/teacher-header.tsx
  15. 36 18
      src/student/teacher-dependent/teacher-follow.tsx
  16. 8 1
      src/student/teacher-dependent/teacher-home.tsx
  17. 6 1
      src/student/trade/list/index.tsx
  18. 12 9
      src/student/trade/tradeOrder.ts
  19. 1 1
      src/student/video-class/video-class-detail.tsx
  20. 1 1
      src/student/video-class/video-detail.tsx
  21. 6 1
      src/styles/index.less
  22. 35 20
      src/teacher/piano-room/class-arrangement/create-class/index.tsx
  23. 2 0
      src/teacher/piano-room/tradeOrder.ts
  24. 12 4
      src/teacher/share-page/share-music-sheet/index.module.less
  25. BIN
      src/teacher/share-page/share-vip/images/icon-equity-bg.png
  26. BIN
      src/teacher/share-page/share-vip/images/icon-title-3.png
  27. 56 8
      src/teacher/share-page/share-vip/index.module.less
  28. 33 29
      src/teacher/share-page/share-vip/index.tsx
  29. 1 1
      src/teacher/share-page/share.ts
  30. BIN
      src/teacher/teacher-dependent/images/svip_active.png
  31. BIN
      src/teacher/teacher-dependent/images/vip_active.png
  32. 398 355
      src/teacher/teacher-dependent/model/teacher-header.module.less
  33. 266 256
      src/teacher/teacher-dependent/model/teacher-header.tsx
  34. 88 88
      src/teacher/teacher-dependent/teacher-home.tsx
  35. 1 0
      src/tenant/music/music-detail/new-index.tsx
  36. 7 1
      src/views/adapay/payment/index.tsx
  37. BIN
      src/views/creation/images/icon-svip.png
  38. BIN
      src/views/creation/images/icon-vip.png
  39. 22 5
      src/views/creation/index-share.tsx
  40. 38 2
      src/views/creation/index.module.less
  41. 21 4
      src/views/creation/index.tsx
  42. 37 0
      src/views/member-center/components/member-interes/index.module.less
  43. 65 0
      src/views/member-center/components/member-interes/index.tsx
  44. 419 0
      src/views/member-center/index copy.tsx
  45. 437 0
      src/views/member-center/index.module copy.less
  46. 635 312
      src/views/member-center/index.module.less
  47. 685 328
      src/views/member-center/index.tsx
  48. BIN
      src/views/member-center/new-images/btn-svip-review.png
  49. BIN
      src/views/member-center/new-images/btn-svip.png
  50. BIN
      src/views/member-center/new-images/btn-vip-review.png
  51. BIN
      src/views/member-center/new-images/btn-vip.png
  52. BIN
      src/views/member-center/new-images/icon-banner-brid.png
  53. BIN
      src/views/member-center/new-images/icon-banner.png
  54. BIN
      src/views/member-center/new-images/icon-discount-bg.png
  55. BIN
      src/views/member-center/new-images/icon-discount-gift.png
  56. BIN
      src/views/member-center/new-images/icon-equity-bg.png
  57. BIN
      src/views/member-center/new-images/icon-permanent.png
  58. BIN
      src/views/member-center/new-images/icon-permanent1.png
  59. BIN
      src/views/member-center/new-images/icon-share.png
  60. BIN
      src/views/member-center/new-images/icon-svip-big-icon.png
  61. BIN
      src/views/member-center/new-images/icon-svip-bottom-line.png
  62. BIN
      src/views/member-center/new-images/icon-svip-disabled.png
  63. BIN
      src/views/member-center/new-images/icon-svip-text.png
  64. BIN
      src/views/member-center/new-images/icon-svip.png
  65. BIN
      src/views/member-center/new-images/icon-title-1.png
  66. BIN
      src/views/member-center/new-images/icon-title-2.png
  67. BIN
      src/views/member-center/new-images/icon-title-3.png
  68. BIN
      src/views/member-center/new-images/icon-vip-big-icon.png
  69. BIN
      src/views/member-center/new-images/icon-vip-bottom-line.png
  70. BIN
      src/views/member-center/new-images/icon-vip-disabled.png
  71. BIN
      src/views/member-center/new-images/icon-vip-text.png
  72. BIN
      src/views/member-center/new-images/icon-vip.png
  73. BIN
      src/views/member-center/new-images/icon_discount-round.png
  74. BIN
      src/views/member-center/new-images/icon_discount-text.png
  75. BIN
      src/views/member-center/new-images/icon_discount.png
  76. BIN
      src/views/member-center/new-images/icon_discount2.png
  77. BIN
      src/views/member-center/new-images/svip-bottom-tip.png
  78. BIN
      src/views/member-center/new-images/svip-fun-1.png
  79. BIN
      src/views/member-center/new-images/svip-fun-2.png
  80. BIN
      src/views/member-center/new-images/svip-fun-3.png
  81. BIN
      src/views/member-center/new-images/svip-fun-4.png
  82. BIN
      src/views/member-center/new-images/svip-question-bg.png
  83. BIN
      src/views/member-center/new-images/vip-bottom-tip.png
  84. BIN
      src/views/member-center/new-images/vip-fun-1.png
  85. BIN
      src/views/member-center/new-images/vip-fun-2.png
  86. BIN
      src/views/member-center/new-images/vip-fun-3.png
  87. BIN
      src/views/member-center/new-images/vip-question-bg.png
  88. 27 24
      src/views/music/album-detail/index.tsx
  89. 44 1
      src/views/order-detail/index.module.less
  90. 111 25
      src/views/order-detail/index.tsx
  91. 2 0
      src/views/order-detail/order-music/index.module.less
  92. 59 9
      src/views/order-detail/order-vip/index.module.less
  93. 139 32
      src/views/order-detail/order-vip/index.tsx
  94. 43 2
      src/views/order-detail/orderStatus.ts
  95. 8 1
      src/views/order-detail/payment/index.tsx
  96. 1 0
      src/views/order-detail/use-coupons/index.tsx
  97. 1 1
      vite.config.ts

BIN
src/common/images/icon_member.png


BIN
src/common/images/icon_member_svip.png


BIN
src/components/col-share/images/vip1.png


+ 7 - 3
src/components/col-share/index.module.less

@@ -86,10 +86,10 @@
 
 .shareTeacher {
   margin-top: 15px;
-  padding: 12px;
-  background: linear-gradient(270deg, #baffe7 0%, #c0dcff 100%);
+  padding: 12px !important;
+  background: linear-gradient(270deg, #baffe7 0%, #c0dcff 100%) !important;
   border-radius: 9px;
-  color: #333;
+  color: #333 !important;
 
   .teacherImg {
     margin-right: 12px;
@@ -274,6 +274,10 @@
     padding: 8px 46px;
   }
 
+  .savePictureBtn {
+    border-color: #fff;
+  }
+
   &.shareGroupTenantBtn {
     :global {
       .van-button--primary {

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

@@ -268,6 +268,7 @@ export default defineComponent({
               <Button
                 type="primary"
                 plain
+                class={styles.savePictureBtn}
                 round
                 loading={this.saveLoading}
                 loadingText="保存中"

+ 1 - 1
src/components/col-share/share-item.tsx

@@ -53,7 +53,7 @@ export default defineComponent({
       } else if (this.shareType === 'mall') {
         return '这件商品挺不错!推荐给你~'
       } else if (this.shareType === 'vip') {
-        return '小酷Ai智能陪练VIP!推荐给你~'
+        return '小酷Ai智能陪练!推荐给你~'
       } else if (this.shareType === 'album') {
         return '更多曲目扫码下载酷乐秀查看'
       } else {

+ 21 - 0
src/components/the-noticeBar/index.module.less

@@ -0,0 +1,21 @@
+.wrap{
+    max-width: 100%;
+    overflow: hidden;
+    display: flex;
+    align-items: center;
+    &.isAnitaion, &:hover{
+        .notice{
+            width: auto;
+            overflow: initial;
+        }
+    }
+}
+.notice{
+    transition-timing-function: linear;
+    transition-duration: 5s;
+    width: 100%;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+    transition-timing-function: linear;
+}

+ 105 - 0
src/components/the-noticeBar/index.tsx

@@ -0,0 +1,105 @@
+import { defineComponent, reactive, ref, watch, onMounted } from 'vue'
+import styles from './index.module.less'
+
+const refAnimation = (callback: any) => {
+  requestAnimationFrame(() => {
+    requestAnimationFrame(() => {
+      callback()
+    })
+  })
+}
+
+export default defineComponent({
+  name: 'TheNoticeBar',
+  props: {
+    text: {
+      type: String,
+      default: ''
+    },
+    isAnimation: {
+      type: Boolean,
+      default: false
+    }
+  },
+  setup(props, { slots }) {
+    const wrapRef = ref()
+    const contentRef = ref()
+    const notiData = reactive({
+      isActive: false,
+      wrapWidth: 0,
+      contentWidth: 0,
+      contentStyle: {
+        transitionDuration: '0s',
+        transform: 'translateX(0px)'
+      },
+      time: null as any
+    })
+    const init = () => {
+      if (notiData.isActive || !contentRef.value || !wrapRef.value) return
+      notiData.isActive = true
+
+      notiData.contentWidth = contentRef.value.getBoundingClientRect().width
+      notiData.wrapWidth = wrapRef.value.getBoundingClientRect().width
+      console.log('进来加载动画', notiData.contentWidth - notiData.wrapWidth)
+
+      if (notiData.contentWidth - notiData.wrapWidth > 0) {
+        startAnimate()
+      }
+    }
+
+    onMounted(() => {
+      init()
+      // startAnimate();
+    })
+    const startAnimate = () => {
+      if (notiData.contentWidth <= notiData.wrapWidth || !notiData.isActive) {
+        notiData.contentStyle.transitionDuration = '0s'
+        notiData.contentStyle.transform = 'translateX(0px)'
+        return
+      }
+
+      notiData.contentStyle.transitionDuration = '5s'
+      notiData.contentStyle.transform = 'translateX(-100%)'
+
+      notiData.time = setTimeout(() => {
+        notiData.contentStyle.transitionDuration = '0s'
+        notiData.contentStyle.transform = `translateX(${notiData.wrapWidth}px)`
+        refAnimation(startAnimate)
+      }, 5 * 1000)
+    }
+    const stopAnimate = () => {
+      clearTimeout(notiData.time)
+      notiData.isActive = false
+      notiData.contentStyle.transitionDuration = '0s'
+      notiData.contentStyle.transform = 'translateX(0px)'
+      notiData.time = null
+    }
+    watch(
+      () => props.isAnimation,
+      val => {
+        if (val) {
+          refAnimation(init)
+        } else {
+          refAnimation(stopAnimate)
+        }
+      }
+    )
+    //    onMouseenter={() => !props.isAnimation && init()}
+    // onMouseleave={() => !props.isAnimation && stopAnimate()}
+    return () => (
+      <div
+        ref={wrapRef}
+        class={[styles.wrap, props.isAnimation ? styles.isAnitaion : '']}
+      >
+        <div
+          ref={contentRef}
+          style={notiData.contentStyle}
+          class={styles.notice}
+        >
+          {props.text}
+          {slots.default && slots.default()}
+        </div>
+      </div>
+    )
+  }
+})

+ 12 - 2
src/constant/index.ts

@@ -2,7 +2,8 @@ export const goodsType = {
   LIVE: '直播课',
   PRACTICE: '陪练课',
   VIDEO: '视频课',
-  VIP: '开通会员',
+  VIP: '开通VIP会员',
+  SVIP: '开通SVIP会员',
   MUSIC: '单曲点播',
   ALBUM: '专辑购买',
   PIANO_ROOM: '琴房时长充值',
@@ -34,7 +35,16 @@ export const memberType = {
   MONTH: '月度会员',
   QUARTERLY: '季度会员',
   YEAR_HALF: '半年会员',
-  YEAR: '年度会员'
+  YEAR: '年度会员',
+  PERPETUAL: '永久会员'
+}
+
+export const memberSimpleType = {
+  MONTH: '月度',
+  QUARTERLY: '季度',
+  YEAR_HALF: '半年',
+  YEAR: '年度',
+  PERPETUAL: '永久'
 }
 
 export const courseType = {

+ 1 - 1
src/helpers/request.ts

@@ -88,7 +88,7 @@ request.interceptors.response.use(
       throw new Error(msg)
     }
     const data = await res.clone().json()
-    const otherCode = [200, 0, 999, 5004]
+    const otherCode = [200, 0, 999, 5004, 998]
     if (!otherCode.includes(data.code)) {
       let msg = data.msg || data.message || '处理失败,请重试'
       if (initRequest) {

BIN
src/student/teacher-dependent/images/svip_active.png


BIN
src/student/teacher-dependent/images/vip_active.png


+ 398 - 355
src/student/teacher-dependent/model/teacher-header.module.less

@@ -1,355 +1,398 @@
-.headerContent {
-  padding-top: 40px;
-  padding-bottom: 20px;
-  min-height: 100px;
-  position: relative;
-}
-.teacherContent {
-  display: flex;
-  justify-content: space-between;
-  flex-shrink: 0;
-}
-.teacherIcon {
-  position: relative;
-  margin-top: -38px;
-  line-height: 0;
-  .avatar {
-    position: relative;
-    width: 78px;
-    height: 78px;
-    box-sizing: border-box;
-    border: 2px solid #fff;
-    background-color: #fff;
-  }
-  .avatarActive {
-    border-color: #ffe0b9;
-    background-color: #ffe0b9;
-  }
-  .teacherIconVip {
-    position: absolute;
-    bottom: 0;
-    right: -30px;
-    width: 46px;
-    height: 20px;
-  }
-}
-.teacherInfo {
-  display: flex;
-  align-items: center;
-  padding: 14px 0;
-  .teacherInfoName {
-    font-size: 20px;
-    font-weight: 500;
-    color: #1a1a1a;
-    // line-height: 22px;
-    max-width: 150px;
-    overflow: hidden;
-    white-space: nowrap;
-    text-overflow: ellipsis;
-  }
-  & > img {
-    margin-left: 10px;
-    width: 39px;
-    height: 16px;
-  }
-}
-.teacherHonor {
-  display: flex;
-  align-items: center;
-  font-size: 12px;
-  line-height: 16px;
-  color: #666;
-  font-weight: 500;
-  padding-bottom: 12px;
-  padding-top: 10px;
-  .score {
-    margin-left: 25px;
-  }
-}
-
-.headerCount {
-  width: calc(100% - 28px);
-  padding: 12px;
-  margin: 0 auto;
-  background-color: #fff;
-  border-radius: 10px;
-  box-sizing: border-box;
-}
-
-.teacherOperation {
-  :global {
-    .van-button {
-      height: 28px;
-    }
-  }
-
-  .btn {
-    padding: 3px 12px 1px;
-    min-width: 62px;
-  }
-  .btnStar {
-    color: #f18400;
-    border-color: #f18400;
-  }
-}
-
-.subjectSection {
-  margin-right: 10px;
-  // height: 18px;
-  max-width: 68px;
-  box-sizing: content-box;
-}
-
-.teacher-bottom {
-  padding: 30px 0 0 0;
-  display: flex;
-  align-items: center;
-  justify-content: space-between;
-}
-.followFans {
-  padding-top: 10px !important;
-}
-
-.teacher-data {
-  display: flex;
-  align-items: center;
-  justify-content: space-between;
-
-  .teacher-data_item {
-    font-size: 14px;
-    color: #333333;
-    position: relative;
-    span {
-      font-weight: 500;
-      color: #000000;
-      font-size: 20px;
-      margin-left: 5px;
-    }
-    &::after {
-      content: ' ';
-      display: inline-block;
-      position: absolute;
-      right: 0px;
-      top: 2px;
-      width: 1px;
-      height: 16px;
-      background: #ebebeb;
-    }
-    &:first-child {
-      padding-right: 15px;
-      margin-right: 15px;
-    }
-    &:last-child {
-      &::after {
-        display: none;
-      }
-    }
-  }
-}
-
-.iconVip {
-  width: 34px !important;
-  margin-right: 5px;
-}
-
-.iconOther {
-  margin-left: 6px;
-  width: 18px;
-  height: 18px;
-}
-
-.teacher-info {
-  margin-left: 8px;
-  .teacher-name {
-    font-size: 18px;
-    font-weight: 500;
-    color: #1a1a1a;
-    padding-bottom: 6px;
-    display: flex;
-    justify-content: space-between;
-    .teacherCert {
-      display: flex;
-      align-items: center;
-    }
-
-    .teacherLast {
-      display: inline-block;
-      max-width: 120px;
-      overflow: hidden;
-      text-overflow: ellipsis;
-      white-space: nowrap;
-    }
-  }
-}
-
-.subjectList::-webkit-scrollbar {
-  display: none; /* Chrome Safari */
-}
-.subjectList {
-  overflow: auto;
-  width: 255px;
-  // height: 18px;
-  display: flex;
-  flex-wrap: nowrap;
-}
-
-.piNameSubject {
-  display: flex;
-  align-items: center;
-
-  .subject {
-    display: flex;
-    align-items: center;
-    margin-left: 4px;
-    background: #effbf9;
-    border-radius: 8px;
-    font-size: 12px;
-    line-height: 16px;
-    color: #2dc7aa;
-    padding: 0 5px;
-    white-space: nowrap;
-    &:first-child {
-      margin-left: 0;
-    }
-  }
-}
-
-.rTitle {
-  display: flex;
-  align-items: center;
-  &::before {
-    margin-right: 8px;
-    content: ' ';
-    display: inline-block;
-    width: 4px;
-    height: 14px;
-    background: #2dc7aa;
-    border-radius: 3px;
-  }
-}
-
-.liveTag {
-  position: absolute;
-  bottom: 0;
-  left: 50%;
-  transform: translateX(-50%);
-  line-height: 16px;
-  background: #ff6363;
-  border-radius: 20px;
-  text-align: center;
-  color: #fff;
-  font-size: 10px;
-  font-weight: 500;
-  padding: 2px 0;
-  width: 60%;
-  z-index: 10;
-}
-
-.teacherName {
-  display: inline-block;
-  flex: 1;
-  white-space: nowrap;
-  overflow: hidden;
-  text-overflow: ellipsis;
-  max-width: 100px;
-}
-
-.teacherIcons {
-  display: flex;
-  align-items: center;
-}
-.teaherPopup {
-  background: transparent;
-  width: 276px;
-  overflow: initial;
-}
-.teacherIconWrap {
-  padding: 50px 22px 22px 22px;
-  background-color: #fff;
-  border-radius: 0 0 10px 10px;
-  margin-top: -25px;
-}
-.teacherIconItem {
-  margin-bottom: 16px;
-  .teacherIconItemTop {
-    display: flex;
-    align-items: center;
-    margin-bottom: 10px;
-  }
-  :global {
-    .van-image {
-      margin-right: 8px;
-      width: 24px;
-      height: 24px;
-    }
-  }
-  .teacherIconTitle {
-    font-size: 16px;
-    font-weight: bold;
-    color: #333;
-  }
-  .teacherIconDes {
-    font-size: 12px;
-    line-height: 16px;
-    font-weight: 400;
-    padding-left: 3px;
-    color: #666;
-  }
-}
-.closeIcon {
-  position: absolute;
-  bottom: -54px;
-  left: 50%;
-  transform: translateX(-50%);
-  width: 0.96rem;
-  height: 0.96rem;
-}
-.liveList {
-  padding: 12px 0;
-  .headerFollow {
-    margin-bottom: 12px;
-    .teacherIcon {
-      margin: 0 10px 0 0;
-    }
-    .score {
-      margin-left: 10px;
-    }
-    .teacherIconVip {
-      left: 50%;
-      right: initial;
-      transform: translateX(-50%);
-      bottom: -6px;
-    }
-    .liveTag {
-      // bottom: -30px;
-      width: 80%;
-    }
-    .avatar {
-      width: 60px;
-      height: 60px;
-    }
-    .piNameSubject {
-      align-items: flex-start;
-    }
-    .subjectList {
-      flex-wrap: wrap;
-    }
-    .subject {
-      margin: 2px 5px 3px 0;
-    }
-    .teacher-bottom {
-      padding-top: 24px;
-    }
-    .unlinkeBtn {
-      font-size: 12px;
-      color: #ff6363;
-      border: 1px solid #ff6363;
-      padding: 5px 10px;
-      border-radius: 20px;
-    }
-  }
-}
-.followContainer {
-  display: flex;
-  align-items: flex-start;
-}
+.headerContent {
+  padding-top: 40px;
+  padding-bottom: 20px;
+  min-height: 100px;
+  position: relative;
+}
+
+.teacherContent {
+  display: flex;
+  justify-content: space-between;
+  flex-shrink: 0;
+}
+
+.teacherIcon {
+  position: relative;
+  margin-top: -38px;
+  line-height: 0;
+
+  .avatar {
+    position: relative;
+    width: 78px;
+    height: 78px;
+    box-sizing: border-box;
+    border: 2px solid #fff;
+    background-color: #fff;
+  }
+
+  .avatarActive {
+    border-color: #F0AF88;
+    background-color: #F0AF88;
+  }
+
+  .teacherIconVip {
+    position: absolute;
+    bottom: 0;
+    right: -12px;
+    width: 39px;
+    height: 18px;
+  }
+}
+
+.teacherInfo {
+  display: flex;
+  align-items: center;
+  padding: 14px 0;
+
+  .teacherInfoName {
+    font-size: 20px;
+    font-weight: 500;
+    color: #1a1a1a;
+    // line-height: 22px;
+    max-width: 150px;
+    overflow: hidden;
+    white-space: nowrap;
+    text-overflow: ellipsis;
+  }
+
+  &>img {
+    margin-left: 10px;
+    width: 39px;
+    height: 16px;
+  }
+}
+
+.teacherHonor {
+  display: flex;
+  align-items: center;
+  font-size: 12px;
+  line-height: 16px;
+  color: #666;
+  font-weight: 500;
+  padding-bottom: 12px;
+  padding-top: 10px;
+
+  .score {
+    margin-left: 25px;
+  }
+}
+
+.headerCount {
+  width: calc(100% - 28px);
+  padding: 12px;
+  margin: 0 auto;
+  background-color: #fff;
+  border-radius: 10px;
+  box-sizing: border-box;
+}
+
+.teacherOperation {
+  :global {
+    .van-button {
+      height: 28px;
+    }
+  }
+
+  .btn {
+    padding: 3px 12px 1px;
+    min-width: 62px;
+  }
+
+  .btnStar {
+    color: #f18400;
+    border-color: #f18400;
+  }
+}
+
+.subjectSection {
+  margin-right: 10px;
+  // height: 18px;
+  max-width: 68px;
+  box-sizing: content-box;
+}
+
+.teacher-bottom {
+  padding: 30px 0 0 0;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+}
+
+.followFans {
+  padding-top: 10px !important;
+}
+
+.teacher-data {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+
+  .teacher-data_item {
+    font-size: 14px;
+    color: #333333;
+    position: relative;
+
+    span {
+      font-weight: 500;
+      color: #000000;
+      font-size: 20px;
+      margin-left: 5px;
+    }
+
+    &::after {
+      content: ' ';
+      display: inline-block;
+      position: absolute;
+      right: 0px;
+      top: 2px;
+      width: 1px;
+      height: 16px;
+      background: #ebebeb;
+    }
+
+    &:first-child {
+      padding-right: 15px;
+      margin-right: 15px;
+    }
+
+    &:last-child {
+      &::after {
+        display: none;
+      }
+    }
+  }
+}
+
+.iconVip {
+  width: 34px !important;
+  margin-right: 5px;
+}
+
+.iconOther {
+  margin-left: 6px;
+  width: 18px;
+  height: 18px;
+}
+
+.teacher-info {
+  margin-left: 8px;
+
+  .teacher-name {
+    font-size: 18px;
+    font-weight: 500;
+    color: #1a1a1a;
+    padding-bottom: 6px;
+    display: flex;
+    justify-content: space-between;
+
+    .teacherCert {
+      display: flex;
+      align-items: center;
+    }
+
+    .teacherLast {
+      display: inline-block;
+      max-width: 120px;
+      overflow: hidden;
+      text-overflow: ellipsis;
+      white-space: nowrap;
+    }
+  }
+}
+
+.subjectList::-webkit-scrollbar {
+  display: none;
+  /* Chrome Safari */
+}
+
+.subjectList {
+  overflow: auto;
+  width: 255px;
+  // height: 18px;
+  display: flex;
+  flex-wrap: nowrap;
+}
+
+.piNameSubject {
+  display: flex;
+  align-items: center;
+
+  .subject {
+    display: flex;
+    align-items: center;
+    margin-left: 4px;
+    background: #effbf9;
+    border-radius: 8px;
+    font-size: 12px;
+    line-height: 16px;
+    color: #2dc7aa;
+    padding: 0 5px;
+    white-space: nowrap;
+
+    &:first-child {
+      margin-left: 0;
+    }
+  }
+}
+
+.rTitle {
+  display: flex;
+  align-items: center;
+
+  &::before {
+    margin-right: 8px;
+    content: ' ';
+    display: inline-block;
+    width: 4px;
+    height: 14px;
+    background: #2dc7aa;
+    border-radius: 3px;
+  }
+}
+
+.liveTag {
+  position: absolute;
+  bottom: 0;
+  left: 50%;
+  transform: translateX(-50%);
+  line-height: 16px;
+  background: #ff6363;
+  border-radius: 20px;
+  text-align: center;
+  color: #fff;
+  font-size: 10px;
+  font-weight: 500;
+  padding: 2px 0;
+  width: 60%;
+  z-index: 10;
+}
+
+.teacherName {
+  display: inline-block;
+  flex: 1;
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  max-width: 100px;
+}
+
+.teacherIcons {
+  display: flex;
+  align-items: center;
+}
+
+.teaherPopup {
+  background: transparent;
+  width: 276px;
+  overflow: initial;
+}
+
+.teacherIconWrap {
+  padding: 50px 22px 22px 22px;
+  background-color: #fff;
+  border-radius: 0 0 10px 10px;
+  margin-top: -25px;
+}
+
+.teacherIconItem {
+  margin-bottom: 16px;
+
+  .teacherIconItemTop {
+    display: flex;
+    align-items: center;
+    margin-bottom: 10px;
+  }
+
+  :global {
+    .van-image {
+      margin-right: 8px;
+      width: 24px;
+      height: 24px;
+    }
+  }
+
+  .teacherIconTitle {
+    font-size: 16px;
+    font-weight: bold;
+    color: #333;
+  }
+
+  .teacherIconDes {
+    font-size: 12px;
+    line-height: 16px;
+    font-weight: 400;
+    padding-left: 3px;
+    color: #666;
+  }
+}
+
+.closeIcon {
+  position: absolute;
+  bottom: -54px;
+  left: 50%;
+  transform: translateX(-50%);
+  width: 0.96rem;
+  height: 0.96rem;
+}
+
+.liveList {
+  padding: 12px 0;
+
+  .headerFollow {
+    margin-bottom: 12px;
+
+    .teacherIcon {
+      margin: 0 10px 0 0;
+    }
+
+    .score {
+      margin-left: 10px;
+    }
+
+    .teacherIconVip {
+      left: 50%;
+      right: initial;
+      transform: translateX(-50%);
+      bottom: -6px;
+    }
+
+    .liveTag {
+      // bottom: -30px;
+      width: 80%;
+    }
+
+    .avatar {
+      width: 60px;
+      height: 60px;
+    }
+
+    .piNameSubject {
+      align-items: flex-start;
+    }
+
+    .subjectList {
+      flex-wrap: wrap;
+    }
+
+    .subject {
+      margin: 2px 5px 3px 0;
+    }
+
+    .teacher-bottom {
+      padding-top: 24px;
+    }
+
+    .unlinkeBtn {
+      font-size: 12px;
+      color: #ff6363;
+      border: 1px solid #ff6363;
+      padding: 5px 10px;
+      border-radius: 20px;
+    }
+  }
+}
+
+.followContainer {
+  display: flex;
+  align-items: flex-start;
+}

+ 331 - 313
src/student/teacher-dependent/model/teacher-header.tsx

@@ -1,313 +1,331 @@
-import { Button, Cell, Icon, Image, Popup, Rate, Toast } from 'vant'
-import { defineComponent } from 'vue'
-import styles from './teacher-header.module.less'
-import { postMessage } from '@/helpers/native-message'
-import iconTeacher from '@common/images/icon_teacher.png'
-import request from '@/helpers/request'
-import IconXueli from '@common/images/icon-xueli.png'
-import IconJiaozi from '@common/images/icon-jiaozi.png'
-import IconChat from '../images/icon-chat.png'
-
-export const getAssetsHomeFile = (fileName: string) => {
-  const path = `../images/${fileName}`
-  const modules = import.meta.globEager('../images/*')
-  return modules[path].default
-}
-
-export default defineComponent({
-  name: 'teacher-header',
-  props: {
-    userInfo: {
-      type: Object,
-      default: {}
-    },
-    teacherId: {
-      type: String || Number,
-      default: ''
-    }
-  },
-  data() {
-    return {
-      iconShow: false
-    }
-  },
-  computed: {
-    subjectNameList() {
-      const userInfo: any = this.userInfo
-      const subjectName = userInfo.subjectName
-      return subjectName ? subjectName.split(',') : []
-    },
-    starGrade() {
-      const { starGrade } = this.userInfo as any
-      return Number(starGrade) || 0
-    }
-  },
-  methods: {
-    async onStart() {
-      // 关注与取消关注
-      try {
-        const star = this.userInfo.isStar ? 0 : 1
-        await request.get('/api-student/teacher/starOrUnStar', {
-          params: {
-            userId: this.teacherId,
-            starStatus: star
-          }
-        })
-        // const str = star ? '关注成功' : '已取消关注'
-        this.userInfo.isStar = star
-        let count = star ? this.userInfo.fansNum + 1 : this.userInfo.fansNum - 1
-        this.userInfo.fansNum = count <= 0 ? 0 : count
-        // Toast(str)
-      } catch {
-        //
-      }
-    },
-    // 检验是否有对应徽章
-    checkBadge(type: string) {
-      // tag : 老师点亮图标
-      // STYLE:个人风采
-      // VIDEO:视频课
-      // LIVE:直播课,
-      // MUSIC:曲目 逗号隔开
-      let status = false
-      const { userInfo } = this
-      switch (type) {
-        case 'STYLE':
-        case 'VIDEO':
-        case 'LIVE':
-        case 'MUSIC':
-          if (userInfo.tag) {
-            status = userInfo.tag.indexOf(type) > -1
-          }
-          break
-        case 'VIP':
-          status = userInfo.isVip > 0
-          break
-        default:
-          status = false
-          break
-      }
-      return status
-    },
-
-    openTeacherIcon() {
-      this.iconShow = true
-    }
-  },
-  render() {
-    const iconList = [
-      {
-        icon: 'cert_active.png',
-        title: '演奏Mlog达人',
-        des: '个人风采中上传老师风采视频并通过审核'
-      },
-      {
-        icon: 'video_active.png',
-        title: '教学视频达人',
-        des: '发布您制作的教学视频课程并通过审核'
-      },
-      {
-        icon: 'live_active.png',
-        title: '直播up达人',
-        des: '达到开通直播权限标准并开通直播功能'
-      },
-      {
-        icon: 'music_active.png',
-        title: '乐谱歌单达人',
-        des: '上传您制作的乐谱并通过审核'
-      }
-    ]
-    return (
-      <>
-        <div class={styles.headerContent}>
-          <div class={styles.headerCount}>
-            <div class={styles.teacherContent}>
-              <div
-                class={styles.teacherIcon}
-                onClick={() => {
-                  // 判断是否在直播中
-                  if (this.userInfo.liveing === 1) {
-                    postMessage({
-                      api: 'joinLiveRoom',
-                      content: {
-                        roomId: this.userInfo.roomUid,
-                        teacherId: this.userInfo.userId
-                      }
-                    })
-                  }
-                }}
-              >
-                {/* iy */}
-                <Image
-                  class={[
-                    styles.avatar,
-                    this.checkBadge('VIP') && styles.avatarActive
-                  ]}
-                  round
-                  src={this.userInfo.heardUrl || iconTeacher}
-                  fit="cover"
-                />
-
-                {this.userInfo.liveing === 1 && (
-                  <p class={styles.liveTag}>直播中</p>
-                )}
-
-                <Image
-                  class={styles.teacherIconVip}
-                  src={
-                    this.checkBadge('VIP')
-                      ? getAssetsHomeFile('vip_active.png')
-                      : getAssetsHomeFile('vip_default.png')
-                  }
-                />
-              </div>
-              <div class={styles.teacherOperation}>
-                <Button
-                  type="primary"
-                  size="small"
-                  plain
-                  round
-                  class={[
-                    styles.btn,
-                    this.userInfo.isStar ? styles.btnStar : ''
-                  ]}
-                  onClick={this.onStart}
-                >
-                  {/* {!this.userInfo.isStar && <Icon name="plus" />} */}
-
-                  {this.userInfo.isStar ? '已关注' : '关注'}
-                </Button>
-                <Button
-                  type="primary"
-                  size="small"
-                  round
-                  style={{ marginLeft: '5px' }}
-                  class={styles.btn}
-                  icon={IconChat}
-                  onClick={() => {
-                    postMessage({
-                      api: 'joinChatGroup',
-                      content: {
-                        type: 'single', // single 单人 multi 多人
-                        id: this.userInfo.imUserId
-                        // id: this.teacherId
-                      }
-                    })
-                  }}
-                >
-                  {/* <Icon name={} size="16" style={{ marginRight: '3px' }} /> */}
-                  聊天
-                </Button>
-              </div>
-            </div>
-            <div class={styles.teacherInfo}>
-              <div class={styles.teacherInfoName}>
-                {this.userInfo.username || `游客${this.userInfo.userId || ''}`}
-              </div>
-              {this.userInfo.degreeFlag ? <img src={IconXueli} /> : null}
-              {this.userInfo.teacherFlag ? <img src={IconJiaozi} /> : null}
-            </div>
-            <div class={styles.teacherHonor}>
-              <div>勋章:</div>
-              <div class={styles.teacherIcons} onClick={this.openTeacherIcon}>
-                <Image
-                  class={styles.iconOther}
-                  src={
-                    this.checkBadge('STYLE')
-                      ? getAssetsHomeFile('cert_active.png')
-                      : getAssetsHomeFile('cert_default.png')
-                  }
-                />
-                <Image
-                  class={styles.iconOther}
-                  src={
-                    this.checkBadge('VIDEO')
-                      ? getAssetsHomeFile('video_active.png')
-                      : getAssetsHomeFile('video_default.png')
-                  }
-                />
-                <Image
-                  class={styles.iconOther}
-                  src={
-                    this.checkBadge('LIVE')
-                      ? getAssetsHomeFile('live_active.png')
-                      : getAssetsHomeFile('live_default.png')
-                  }
-                />
-                <Image
-                  class={styles.iconOther}
-                  src={
-                    this.checkBadge('MUSIC')
-                      ? getAssetsHomeFile('music_active.png')
-                      : getAssetsHomeFile('music_default.png')
-                  }
-                />
-              </div>
-              <div class={styles.score}>评分:</div>
-              <div class={styles.level}>
-                {this.starGrade ? (
-                  <Rate
-                    readonly
-                    modelValue={this.starGrade}
-                    iconPrefix="iconfont"
-                    color="#FFC459"
-                    void-icon="star_default"
-                    icon="star_active"
-                    size={15}
-                  />
-                ) : (
-                  <span style={{ fontSize: '12px', color: '#999999' }}>
-                    暂无评分
-                  </span>
-                )}
-              </div>
-            </div>
-            <div class={styles.piNameSubject}>
-              <Image
-                class={styles.subjectSection}
-                src={getAssetsHomeFile('icon_subject.png')}
-                fit="contain"
-              />
-              <div class={styles.subjectList}>
-                {this.subjectNameList.map((item: any) => (
-                  <span class={styles.subject}>{item}</span>
-                ))}
-              </div>
-            </div>
-            <div class={styles['teacher-bottom']}>
-              <div class={styles['teacher-data']}>
-                <div class={styles['teacher-data_item']}>
-                  粉丝 <span>{this.userInfo.fansNum || 0}</span>
-                </div>
-                <div class={styles['teacher-data_item']}>
-                  已上课时 <span>{this.userInfo.expTime || 0}</span>
-                </div>
-              </div>
-            </div>
-          </div>
-        </div>
-        <Popup class={styles['teaherPopup']} v-model:show={this.iconShow}>
-          <Image src={getAssetsHomeFile('teacher-icon.png')} />
-          <div class={styles.teacherIconWrap}>
-            {iconList.map(n => {
-              return (
-                <div class={styles.teacherIconItem}>
-                  <div class={styles.teacherIconItemTop}>
-                    <Image src={getAssetsHomeFile(n.icon)} />
-                    <div class={styles.teacherIconTitle}>{n.title}</div>
-                  </div>
-                  <div class={styles.teacherIconDes}>{n.des}</div>
-                </div>
-              )
-            })}
-          </div>
-          <Image
-            onClick={() => (this.iconShow = false)}
-            class={styles.closeIcon}
-            src={getAssetsHomeFile('icon-close.png')}
-          />
-        </Popup>
-      </>
-    )
-  }
-})
+import { Button, Cell, Icon, Image, Popup, Rate, Toast } from 'vant'
+import { defineComponent } from 'vue'
+import styles from './teacher-header.module.less'
+import { postMessage } from '@/helpers/native-message'
+import iconTeacher from '@common/images/icon_teacher.png'
+import request from '@/helpers/request'
+import IconXueli from '@common/images/icon-xueli.png'
+import IconJiaozi from '@common/images/icon-jiaozi.png'
+import IconChat from '../images/icon-chat.png'
+
+export const getAssetsHomeFile = (fileName: string) => {
+  const path = `../images/${fileName}`
+  const modules = import.meta.globEager('../images/*')
+  return modules[path].default
+}
+
+export default defineComponent({
+  name: 'teacher-header',
+  props: {
+    userInfo: {
+      type: Object,
+      default: () => ({})
+    },
+    teacherId: {
+      type: String || Number,
+      default: ''
+    }
+  },
+  emits: ['star'],
+  data() {
+    return {
+      iconShow: false
+    }
+  },
+  computed: {
+    subjectNameList() {
+      const userInfo: any = this.userInfo
+      const subjectName = userInfo.subjectName
+      return subjectName ? subjectName.split(',') : []
+    },
+    starGrade() {
+      const { starGrade } = this.userInfo as any
+      return Number(starGrade) || 0
+    }
+  },
+  methods: {
+    async onStart() {
+      // 关注与取消关注
+      try {
+        const star = this.userInfo.isStar ? 0 : 1
+        await request.get('/api-student/teacher/starOrUnStar', {
+          params: {
+            userId: this.teacherId,
+            starStatus: star
+          }
+        })
+        // const str = star ? '关注成功' : '已取消关注'
+        // this.userInfo.isStar = star
+        const count = star
+          ? this.userInfo.fansNum + 1
+          : this.userInfo.fansNum - 1
+        // this.userInfo.fansNum = count <= 0 ? 0 : count
+        this.$emit('star', {
+          isStar: star,
+          fansNum: count <= 0 ? 0 : count
+        })
+
+        // Toast(str)
+      } catch {
+        //
+      }
+    },
+    // 检验是否有对应徽章
+    checkBadge(type: string) {
+      // tag : 老师点亮图标
+      // STYLE:个人风采
+      // VIDEO:视频课
+      // LIVE:直播课,
+      // MUSIC:曲目 逗号隔开
+      let status = false
+      const { userInfo } = this
+      switch (type) {
+        case 'STYLE':
+        case 'VIDEO':
+        case 'LIVE':
+        case 'MUSIC':
+          if (userInfo.tag) {
+            status = userInfo.tag.indexOf(type) > -1
+          }
+          break
+        case 'VIP':
+          status = userInfo.userVip?.vipType === 'VIP'
+          break
+        case 'SVIP':
+          status =
+            userInfo.userVip?.vipType === 'SVIP' ||
+            userInfo.userVip?.vipType === 'PERMANENT_SVIP'
+          break
+        default:
+          status = false
+          break
+      }
+      return status
+    },
+
+    openTeacherIcon() {
+      this.iconShow = true
+    }
+  },
+  render() {
+    const iconList = [
+      {
+        icon: 'cert_active.png',
+        title: '演奏Mlog达人',
+        des: '个人风采中上传老师风采视频并通过审核'
+      },
+      {
+        icon: 'video_active.png',
+        title: '教学视频达人',
+        des: '发布您制作的教学视频课程并通过审核'
+      },
+      {
+        icon: 'live_active.png',
+        title: '直播up达人',
+        des: '达到开通直播权限标准并开通直播功能'
+      },
+      {
+        icon: 'music_active.png',
+        title: '乐谱歌单达人',
+        des: '上传您制作的乐谱并通过审核'
+      }
+    ]
+    return (
+      <>
+        <div class={styles.headerContent}>
+          <div class={styles.headerCount}>
+            <div class={styles.teacherContent}>
+              <div
+                class={styles.teacherIcon}
+                onClick={() => {
+                  // 判断是否在直播中
+                  if (this.userInfo.liveing === 1) {
+                    postMessage({
+                      api: 'joinLiveRoom',
+                      content: {
+                        roomId: this.userInfo.roomUid,
+                        teacherId: this.userInfo.userId
+                      }
+                    })
+                  }
+                }}
+              >
+                {/* iy */}
+                <Image
+                  class={[
+                    styles.avatar,
+                    (this.checkBadge('SVIP') || this.checkBadge('VIP')) &&
+                      styles.avatarActive
+                  ]}
+                  round
+                  src={this.userInfo.heardUrl || iconTeacher}
+                  fit="cover"
+                />
+
+                {this.userInfo.liveing === 1 && (
+                  <p class={styles.liveTag}>直播中</p>
+                )}
+
+                {(this.checkBadge('SVIP') || this.checkBadge('VIP')) && (
+                  <Image
+                    class={styles.teacherIconVip}
+                    src={
+                      this.checkBadge('SVIP')
+                        ? getAssetsHomeFile('svip_active.png')
+                        : this.checkBadge('VIP')
+                        ? getAssetsHomeFile('vip_active.png')
+                        : ''
+                    }
+                  />
+                )}
+              </div>
+              <div class={styles.teacherOperation}>
+                <Button
+                  type="primary"
+                  size="small"
+                  plain
+                  round
+                  class={[
+                    styles.btn,
+                    this.userInfo.isStar ? styles.btnStar : ''
+                  ]}
+                  onClick={this.onStart}
+                >
+                  {/* {!this.userInfo.isStar && <Icon name="plus" />} */}
+
+                  {this.userInfo.isStar ? '已关注' : '关注'}
+                </Button>
+                <Button
+                  type="primary"
+                  size="small"
+                  round
+                  style={{ marginLeft: '5px' }}
+                  class={styles.btn}
+                  icon={IconChat}
+                  onClick={() => {
+                    postMessage({
+                      api: 'joinChatGroup',
+                      content: {
+                        type: 'single', // single 单人 multi 多人
+                        id: this.userInfo.imUserId
+                        // id: this.teacherId
+                      }
+                    })
+                  }}
+                >
+                  {/* <Icon name={} size="16" style={{ marginRight: '3px' }} /> */}
+                  聊天
+                </Button>
+              </div>
+            </div>
+            <div class={styles.teacherInfo}>
+              <div class={styles.teacherInfoName}>
+                {this.userInfo.username || `游客${this.userInfo.userId || ''}`}
+              </div>
+              {this.userInfo.degreeFlag ? <img src={IconXueli} /> : null}
+              {this.userInfo.teacherFlag ? <img src={IconJiaozi} /> : null}
+            </div>
+            <div class={styles.teacherHonor}>
+              <div>勋章:</div>
+              <div class={styles.teacherIcons} onClick={this.openTeacherIcon}>
+                <Image
+                  class={styles.iconOther}
+                  src={
+                    this.checkBadge('STYLE')
+                      ? getAssetsHomeFile('cert_active.png')
+                      : getAssetsHomeFile('cert_default.png')
+                  }
+                />
+                <Image
+                  class={styles.iconOther}
+                  src={
+                    this.checkBadge('VIDEO')
+                      ? getAssetsHomeFile('video_active.png')
+                      : getAssetsHomeFile('video_default.png')
+                  }
+                />
+                <Image
+                  class={styles.iconOther}
+                  src={
+                    this.checkBadge('LIVE')
+                      ? getAssetsHomeFile('live_active.png')
+                      : getAssetsHomeFile('live_default.png')
+                  }
+                />
+                <Image
+                  class={styles.iconOther}
+                  src={
+                    this.checkBadge('MUSIC')
+                      ? getAssetsHomeFile('music_active.png')
+                      : getAssetsHomeFile('music_default.png')
+                  }
+                />
+              </div>
+              <div class={styles.score}>评分:</div>
+              <div class={styles.level}>
+                {this.starGrade ? (
+                  <Rate
+                    readonly
+                    modelValue={this.starGrade}
+                    iconPrefix="iconfont"
+                    color="#FFC459"
+                    void-icon="star_default"
+                    icon="star_active"
+                    size={15}
+                  />
+                ) : (
+                  <span style={{ fontSize: '12px', color: '#999999' }}>
+                    暂无评分
+                  </span>
+                )}
+              </div>
+            </div>
+            <div class={styles.piNameSubject}>
+              <Image
+                class={styles.subjectSection}
+                src={getAssetsHomeFile('icon_subject.png')}
+                fit="contain"
+              />
+              <div class={styles.subjectList}>
+                {this.subjectNameList.map((item: any) => (
+                  <span class={styles.subject}>{item}</span>
+                ))}
+              </div>
+            </div>
+            <div class={styles['teacher-bottom']}>
+              <div class={styles['teacher-data']}>
+                <div class={styles['teacher-data_item']}>
+                  粉丝 <span>{this.userInfo.fansNum || 0}</span>
+                </div>
+                <div class={styles['teacher-data_item']}>
+                  已上课时 <span>{this.userInfo.expTime || 0}</span>
+                </div>
+              </div>
+            </div>
+          </div>
+        </div>
+        <Popup class={styles['teaherPopup']} v-model:show={this.iconShow}>
+          <Image src={getAssetsHomeFile('teacher-icon.png')} />
+          <div class={styles.teacherIconWrap}>
+            {iconList.map(n => {
+              return (
+                <div class={styles.teacherIconItem}>
+                  <div class={styles.teacherIconItemTop}>
+                    <Image src={getAssetsHomeFile(n.icon)} />
+                    <div class={styles.teacherIconTitle}>{n.title}</div>
+                  </div>
+                  <div class={styles.teacherIconDes}>{n.des}</div>
+                </div>
+              )
+            })}
+          </div>
+          <Image
+            onClick={() => (this.iconShow = false)}
+            class={styles.closeIcon}
+            src={getAssetsHomeFile('icon-close.png')}
+          />
+        </Popup>
+      </>
+    )
+  }
+})

+ 36 - 18
src/student/teacher-dependent/teacher-follow.tsx

@@ -99,7 +99,7 @@ export default defineComponent({
       })
     },
     // 检验是否有对应徽章
-    checkBadge(type: string, item: any) {
+    checkBadge(type: string, item: any, vipType?: string) {
       // tag : 老师点亮图标
       // STYLE:个人风采
       // VIDEO:视频课
@@ -116,14 +116,10 @@ export default defineComponent({
           }
           break
         case 'VIP':
-          if (item.membershipStartTime && item.membershipEndTime) {
-            const startTime = dayjs(item.membershipStartTime).valueOf()
-            const endTime = dayjs(item.membershipEndTime).valueOf()
-            const nowTime = dayjs().valueOf()
-            status = nowTime >= startTime && nowTime <= endTime
-          } else {
-            status = false
-          }
+          status = vipType === 'VIP'
+          break
+        case 'SVIP':
+          status = vipType === 'SVIP' || vipType === 'PERMANENT_SVIP'
           break
         case 'DEGREE':
           status = item.degreeFlag ? true : false
@@ -189,7 +185,12 @@ export default defineComponent({
                       <Image
                         class={[
                           styles.avatar,
-                          this.checkBadge('VIP', item.teacher) &&
+                          (this.checkBadge('VIP', item.teacher, item.vipType) ||
+                            this.checkBadge(
+                              'SVIP',
+                              item.teacher,
+                              item.vipType
+                            )) &&
                             styles.avatarActive
                         ]}
                         round
@@ -202,14 +203,31 @@ export default defineComponent({
                           直播中
                         </p>
                       ) : (
-                        <Image
-                          class={styles.teacherIconVip}
-                          src={
-                            this.checkBadge('VIP', item.teacher)
-                              ? getAssetsHomeFile('vip_active.png')
-                              : getAssetsHomeFile('vip_default.png')
-                          }
-                        />
+                        (this.checkBadge('SVIP', item.teacher, item.vipType) ||
+                          this.checkBadge(
+                            'VIP',
+                            item.teacher,
+                            item.vipType
+                          )) && (
+                          <Image
+                            class={styles.teacherIconVip}
+                            src={
+                              this.checkBadge(
+                                'SVIP',
+                                item.teacher,
+                                item.vipType
+                              )
+                                ? getAssetsHomeFile('svip_active.png')
+                                : this.checkBadge(
+                                    'VIP',
+                                    item.teacher,
+                                    item.vipType
+                                  )
+                                ? getAssetsHomeFile('vip_active.png')
+                                : getAssetsHomeFile('vip_default.png')
+                            }
+                          />
+                        )
                       )}
                     </div>
                   </div>

+ 8 - 1
src/student/teacher-dependent/teacher-home.tsx

@@ -93,7 +93,14 @@ export default defineComponent({
         <img class={styles.bgImg} src={this.userInfo.heardUrl} />
         <div class={styles.bg}></div>
         <div class={styles.teacherHeader}>
-          <TeacherHeader userInfo={this.userInfo} teacherId={this.teacherId} />
+          <TeacherHeader
+            userInfo={this.userInfo}
+            teacherId={this.teacherId}
+            onStar={(val: any) => {
+              this.userInfo.isStar = val.isStar
+              this.userInfo.fansNum = val.fansNum
+            }}
+          />
         </div>
         <Tabs
           color="var(--van-primary)"

+ 6 - 1
src/student/trade/list/index.tsx

@@ -23,6 +23,7 @@ import dayjs from 'dayjs'
 import ColResult from '@/components/col-result'
 import { orderStatus } from '@/views/order-detail/orderStatus'
 import { tradeOrder } from '../tradeOrder'
+import { state } from '@/state'
 
 export default defineComponent({
   name: 'list',
@@ -152,6 +153,11 @@ export default defineComponent({
           `/api-student/userOrder/detailByOrderNo/${item.orderNo}`
         )
         const result = res.data
+        const orderDetailList = result.orderDetailList || []
+        orderDetailList.forEach((item: any) => {
+          item.vipEndDays = state.user.data?.userVip?.vipEndDays || 0 // 会员剩余天数
+        })
+
         tradeOrder(result, () => {
           this.$router.push({
             path: '/orderDetail',
@@ -164,7 +170,6 @@ export default defineComponent({
     }
   },
   render() {
-    console.log(this.height, 'height')
     return (
       <div class={styles.tradeList}>
         <Sticky position="top" offsetTop={this.height}>

+ 12 - 9
src/student/trade/tradeOrder.ts

@@ -84,24 +84,27 @@ export const formatOrderDetail = async (item: any, amount?: IAmount) => {
       break
     }
     case 'VIP':
+    case 'SVIP':
       {
         try {
           const res = await getVipDetail(item.id)
+
+          // couponAmount 总的优惠金额
+          // discountPrice 优惠券金额
+          let tempPrice = res.salePrice || item.actualPrice
+          if (amount?.couponAmount) {
+            tempPrice = Number(((res.salePrice - (amount.couponAmount -
+              amount.discountPrice) / res.times)).toFixed(2))
+          }
           tempList = {
             orderType: item.goodType,
             goodName: item.goodName,
+            num: item.goodNum,
             id: item.id,
             title: memberType[res.period] || '',
+            vipEndDays: item.vipEndDays,
             // 判断是否有优惠金额
-            price: amount?.couponAmount
-              ? Number(
-                  (
-                    res.salePrice -
-                    amount.couponAmount +
-                    amount.discountPrice
-                  ).toFixed(2)
-                )
-              : res.salePrice || item.actualPrice,
+            price: tempPrice,
             startTime: dayjs(res.startTime).format('YYYY-MM-DD'),
             endTime: dayjs(res.endTime).format('YYYY-MM-DD')
           }

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

@@ -116,7 +116,7 @@ export default defineComponent({
         const userInfo = state.user.data as any
         const alreadyBuy =
           result.lessonGroup.payType === 'VIP'
-            ? result.alreadyBuy || userInfo.isVip
+            ? result.alreadyBuy || userInfo.userVip?.vipType !== 'NOT_VIP'
               ? true
               : false
             : result.alreadyBuy

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

@@ -68,7 +68,7 @@ export default defineComponent({
         const userInfo = state.user.data as any
         const alreadyBuy =
           lessonGroup.payType === 'VIP'
-            ? result.alreadyBuy || userInfo.isVip
+            ? result.alreadyBuy || userInfo.userVip?.vipType !== 'NOT_VIP'
               ? true
               : false
             : result.alreadyBuy

+ 6 - 1
src/styles/index.less

@@ -186,4 +186,9 @@ body {
   --music-list-item-free-color: #ff4700;
   --music-list-item-charge-bg: #e1f0ff;
   --music-list-item-charge-color: #0086ff;
-}
+}
+
+.van-toast {
+  --van-animation-duration-fast: 0.1s !important;
+  transition: none !important;
+}

+ 35 - 20
src/teacher/piano-room/class-arrangement/create-class/index.tsx

@@ -28,7 +28,7 @@ export default defineComponent({
     },
     onBack: {
       type: Function,
-      default: () => () => {}
+      default: () => () => ({})
     }
   },
   setup(props) {
@@ -48,13 +48,13 @@ export default defineComponent({
     })
     const getList = async (date?: Date) => {
       const tempDate = date || dayjs().add(1, 'day').toDate()
-      let params = {
+      const params = {
         day: dayjs(tempDate).format('DD'),
         month: dayjs(tempDate).format('MM'),
         year: dayjs(tempDate).format('YYYY')
       }
       try {
-        let res = await request.post(
+        const res = await request.post(
           '/api-teacher/courseSchedule/createLiveCourseCalendar',
           {
             data: {
@@ -66,12 +66,14 @@ export default defineComponent({
           }
         )
         const result = res.data || []
-        let tempObj = {}
+        const tempObj = {}
         result.forEach((item: any) => {
           tempObj[item.date] = item
         })
         data.calendarList = tempObj
-      } catch {}
+      } catch {
+        //
+      }
     }
 
     const onSelectDay = (res: any) => {
@@ -85,7 +87,7 @@ export default defineComponent({
     }
     const showSelectList = computed(() => {
       // 显示时间
-      let list = [...data.selectList]
+      const list = [...data.selectList]
       list.forEach((item: any) => {
         item.title =
           dayjs(item.startTime).format('YYYY-MM-DD') +
@@ -133,7 +135,7 @@ export default defineComponent({
     }
     const onComfirm = async () => {
       if (selectType.value === 'noEnough') {
-        let times = [] as any
+        const times = [] as any
         data.selectList.forEach((item: any) => {
           times.push({
             startTime: item.startTime,
@@ -175,7 +177,7 @@ export default defineComponent({
       const timeList = data.selectList
       const n = classInfo.studentIds.length
       try {
-        let { code, data } = await request.post(
+        const { code, data } = await request.post(
           '/api-teacher/courseSchedule/arrangeCourse',
           {
             data: {
@@ -193,19 +195,32 @@ export default defineComponent({
         )
         if (code === 200) {
           confirmShow.value = false
-
-          setTimeout(() => {
-            Toast({
-              icon: 'success',
-              message: '排课成功',
-              duration: 1500,
-              onClose: () => {
-                router.back()
-              }
-            })
-          }, 100)
+          if (data) {
+            setTimeout(() => {
+              Toast({
+                message: data,
+                duration: 1500,
+                onClose: () => {
+                  router.back()
+                }
+              })
+            }, 100)
+          } else {
+            setTimeout(() => {
+              Toast({
+                icon: 'success',
+                message: '排课成功',
+                duration: 1500,
+                onClose: () => {
+                  router.back()
+                }
+              })
+            }, 100)
+          }
         }
-      } catch (error) {}
+      } catch (error) {
+        //
+      }
     }
     return () => {
       return (

+ 2 - 0
src/teacher/piano-room/tradeOrder.ts

@@ -31,11 +31,13 @@ export const formatOrderDetail = async (item: any, amount?: IAmount) => {
       }
       break
     case 'VIP':
+    case 'SVIP':
       try {
         const res = await getVipDetail(item.id)
         tempList = {
           orderType: item.goodType,
           goodName: item.goodName,
+          num: item.goodNum,
           id: item.id,
           title: memberType[res.period] || '',
           // price: res.salePrice || item.actualPrice,

+ 12 - 4
src/teacher/share-page/share-music-sheet/index.module.less

@@ -14,6 +14,7 @@
       color: #333333;
       line-height: 42px;
     }
+
     p {
       padding-top: 10px;
       font-size: 15px;
@@ -44,11 +45,13 @@
     padding: 22px;
     display: flex;
     align-items: center;
+
     img {
       width: 102px;
       height: 80px;
       margin-right: 22px;
     }
+
     h2 {
       font-size: 14px;
       font-weight: 600;
@@ -56,10 +59,12 @@
       line-height: 20px;
       padding-bottom: 6px;
     }
+
     p {
       color: #6a6a6a;
       line-height: 17px;
     }
+
     .discount {
       height: 18px;
       width: auto;
@@ -71,22 +76,25 @@
 .shareTeacher {
   margin: 10px 14px 18px;
   width: auto;
-  padding: 12px;
-  background: linear-gradient(270deg, #baffe7 0%, #c0dcff 100%);
+  padding: 12px !important;
+  background: linear-gradient(270deg, #baffe7 0%, #c0dcff 100%) !important;
   border-radius: 9px;
-  color: #333;
+  color: #333 !important;
+
   .teacherImg {
     margin-right: 12px;
     position: relative;
     width: 40px;
     text-align: center;
   }
+
   .recommend {
     position: absolute;
     height: 14px;
     left: 0;
     bottom: 3px;
   }
+
   .img {
     width: 33px;
     height: 33px;
@@ -103,4 +111,4 @@
     font-size: 12px;
     line-height: 18px;
   }
-}
+}

BIN
src/teacher/share-page/share-vip/images/icon-equity-bg.png


BIN
src/teacher/share-page/share-vip/images/icon-title-3.png


+ 56 - 8
src/teacher/share-page/share-vip/index.module.less

@@ -3,12 +3,14 @@
   position: relative;
   background-color: #fff;
 
+
   .intro {
     background: url('../images/share-vip-tips.png') no-repeat center;
     background-size: contain;
     height: 142px;
     font-size: 14px;
     color: #bb6e3a;
+
     p {
       padding: 45px 25px 0;
       text-align: justify;
@@ -18,20 +20,37 @@
 
   .shareBanner {
     width: 100%;
+    font-size: 0;
   }
 
   .memberContainer {
     position: relative;
-    margin-top: 15px;
-    padding: 0 14px 25px;
+    // margin-top: 15px;
+    // padding: 0 14px 25px;
     z-index: 99;
+    overflow: hidden;
+  }
+
+  .iconTitle {
+    width: 258px;
+    height: 28px;
+    margin: 18px auto 17px;
+    display: block;
   }
+
+  .iconEquity {
+    margin: 0 16px;
+    width: calc(100% - 32px);
+  }
+
   .memberItem {
     padding-top: 20px;
+
     .title {
       font-size: 16px;
       color: #333333;
       font-weight: 500;
+
       span {
         color: #f7b500;
       }
@@ -42,9 +61,11 @@
     display: flex;
     justify-content: space-between;
     flex-wrap: wrap;
+
     .function_item__content {
       height: 100%;
     }
+
     .function_item {
       width: 80px;
       padding: 12px 0;
@@ -54,15 +75,19 @@
       background-color: #faefe3;
       text-align: center;
     }
+
     .function_text {
       font-size: 12px;
       color: #814014;
       line-height: 16px;
     }
   }
+
   .system-list::-webkit-scrollbar {
-    display: none; /* Chrome Safari */
+    display: none;
+    /* Chrome Safari */
   }
+
   .system-list {
     width: 100%;
     overflow-x: auto;
@@ -75,6 +100,7 @@
     padding-bottom: 10px;
     margin-bottom: 10px;
   }
+
   .system-item {
     display: flex;
     flex-direction: column;
@@ -88,42 +114,48 @@
     border-radius: 12px;
     border: 1px solid #e5e5e5;
     margin-right: 10px;
+
     .title {
       font-size: 14px;
       font-weight: 500;
       color: #333333;
       line-height: 20px;
     }
+
     .price {
       color: #dc9362;
       font-size: 25px;
       line-height: 1.5;
+
       span {
         font-size: 16px;
       }
     }
+
     .originalPrice {
       color: #937059;
       font-size: 13px;
     }
 
     &.active {
-      background: linear-gradient(
-        215deg,
-        #ffe7c4 0%,
-        rgba(250, 211, 156, 0.21) 100%
-      );
+      background: linear-gradient(215deg,
+          #ffe7c4 0%,
+          rgba(250, 211, 156, 0.21) 100%);
       border: 1px solid #b1652e;
       position: relative;
+
       .title {
         color: #814014;
       }
+
       .price {
         color: #b1652e;
       }
+
       .originalPrice {
         color: #937059;
       }
+
       &::before {
         content: '\e728';
         font: 14px/1 'vant-icon';
@@ -164,9 +196,25 @@
     left: 0;
     background: rgba(0, 0, 0, 0.5);
     z-index: 9999;
+
     img {
       width: 88%;
       margin: 0 6%;
     }
   }
 }
+
+.btnGroup {
+  // paddingTop: '12px', position: 'relative'
+  padding-top: 12px;
+  position: relative;
+  background-color: #fff;
+  font-weight: bold;
+
+  :global {
+    .van-button {
+      font-weight: bold;
+      font-size: 15px;
+    }
+  }
+}

+ 33 - 29
src/teacher/share-page/share-vip/index.tsx

@@ -10,6 +10,9 @@ import { shareCall, initJumpNativePage } from '../share'
 import { browser } from '@/helpers/utils'
 import { postMessage } from '@/helpers/native-message'
 import qs from 'query-string'
+import iconTitle from './images/icon-title-3.png'
+import equityBg from './images/icon-equity-bg.png'
+import ColSticky from '@/components/col-sticky'
 
 export const getAssetsHomeFile = (fileName: string) => {
   const path = `../../../views/member-center/images/${fileName}`
@@ -54,16 +57,16 @@ export default defineComponent({
   },
   async mounted() {
     try {
-      const res = await request.post(
-        `/api-teacher/open/memberPriceSettings/vipPermissions`
-      )
-      const result = res.data || []
-      this.functionList = result.map((item: any) => {
-        return {
-          title: item.paramName,
-          icon: getAssetsHomeFile(`${item.paramValue}.png`)
-        }
-      })
+      // const res = await request.post(
+      //   `/api-teacher/open/memberPriceSettings/vipPermissions`
+      // )
+      // const result = res.data || []
+      // this.functionList = result.map((item: any) => {
+      //   return {
+      //     title: item.paramName,
+      //     icon: getAssetsHomeFile(`${item.paramValue}.png`)
+      //   }
+      // })
 
       if (this.activityId) {
         const active = await request.post(
@@ -94,7 +97,7 @@ export default defineComponent({
       <div class={styles['member-center']}>
         <Image src={shareBanner} class={styles.shareBanner} />
         <div class={styles.memberContainer}>
-          <div class={[styles.intro]}>
+          {/* <div class={[styles.intro]}>
             <p>
               酷乐秀会员可使用包括平台提供的所有训练乐谱,并专享“
               <b>小酷Ai</b>
@@ -114,25 +117,26 @@ export default defineComponent({
                 ))}
               </div>
             </div>
-          )}
-        </div>
-        <div
-          class={['btnGroup']}
-          style={{ paddingTop: '12px', position: 'relative' }}
-        >
-          {this.discount === 1 && (
-            <div class={styles.tagDiscount}>专属优惠</div>
-          )}
-          <Button
-            block
-            round
-            type="primary"
-            onClick={this.onShare}
-            color="linear-gradient(220deg, #DFA164 0%, #FAC87E 100%)"
-          >
-            下载小酷Ai开始练习吧!
-          </Button>
+          )} */}
+          <img src={iconTitle} class={styles.iconTitle} />
+          <img src={equityBg} class={styles.iconEquity} />
         </div>
+        <ColSticky position="bottom">
+          <div class={['btnGroup', styles.btnGroup]}>
+            {/* {this.discount === 1 && (
+              <div class={styles.tagDiscount}>专属优惠</div>
+            )} */}
+            <Button
+              block
+              round
+              type="primary"
+              onClick={this.onShare}
+              color="linear-gradient(220deg, #DFA164 0%, #FAC87E 100%)"
+            >
+              下载酷乐秀开始练习吧!
+            </Button>
+          </div>
+        </ColSticky>
 
         {this.wxStatus && (
           <div

+ 1 - 1
src/teacher/share-page/share.ts

@@ -60,7 +60,7 @@ export const initJumpNativePage = (url: string) => {
   if (browser().isApp) {
     if (state.platformType === 'STUDENT') {
       // 自动跳转到学生端视频课详情购买页
-      window.location.replace(url)
+      // window.location.replace(url)
       // 为了处理andoird webview的跳转问题
       if (browser().ios) {
         window.location.replace(url)

BIN
src/teacher/teacher-dependent/images/svip_active.png


BIN
src/teacher/teacher-dependent/images/vip_active.png


+ 398 - 355
src/teacher/teacher-dependent/model/teacher-header.module.less

@@ -1,355 +1,398 @@
-.headerContent {
-  padding-top: 40px;
-  min-height: 100px;
-  position: relative;
-}
-.teacherContent {
-  display: flex;
-  // justify-content: space-between;
-  flex-shrink: 0;
-}
-.teacherIcon {
-  position: relative;
-  margin-top: -38px;
-  line-height: 0;
-  .avatar {
-    position: relative;
-    width: 78px;
-    height: 78px;
-    box-sizing: border-box;
-    border: 2px solid #fff;
-    background-color: #fff;
-  }
-  .avatarActive {
-    border-color: #ffe0b9;
-    background-color: #ffe0b9;
-  }
-  .teacherIconVip {
-    position: absolute;
-    bottom: 0;
-    right: -30px;
-    width: 46px;
-    height: 20px;
-  }
-}
-.teacherInfo {
-  display: flex;
-  align-items: center;
-  // padding: 14px 0;
-  padding-left: 46px;
-  .teacherInfoName {
-    font-size: 20px;
-    font-weight: 500;
-    color: #1a1a1a;
-    // line-height: 22px;
-    max-width: 150px;
-    overflow: hidden;
-    white-space: nowrap;
-    text-overflow: ellipsis;
-  }
-  & > img {
-    margin-left: 10px;
-    width: 39px;
-    height: 16px;
-  }
-}
-.teacherHonor {
-  display: flex;
-  align-items: center;
-  font-size: 12px;
-  line-height: 16px;
-  color: #666;
-  font-weight: 500;
-  padding-bottom: 12px;
-  padding-top: 10px;
-  .score {
-    margin-left: 25px;
-  }
-}
-
-.headerCount {
-  width: calc(100% - 28px);
-  padding: 12px;
-  margin: 0 auto;
-  background-color: #fff;
-  border-radius: 10px;
-  box-sizing: border-box;
-}
-
-.teacherOperation {
-  :global {
-    .van-button {
-      height: 28px;
-    }
-  }
-
-  .btn {
-    padding: 3px 12px 1px;
-    min-width: 62px;
-  }
-  .btnStar {
-    color: #f18400;
-    border-color: #f18400;
-  }
-}
-
-.subjectSection {
-  margin-right: 10px;
-  // height: 18px;
-  max-width: 68px;
-  box-sizing: content-box;
-}
-
-.teacher-bottom {
-  padding: 30px 0 0 0;
-  display: flex;
-  align-items: center;
-  justify-content: space-between;
-}
-.followFans {
-  padding-top: 10px !important;
-}
-
-.teacher-data {
-  display: flex;
-  align-items: center;
-  justify-content: space-between;
-
-  .teacher-data_item {
-    font-size: 14px;
-    color: #333333;
-    position: relative;
-    span {
-      font-weight: 500;
-      color: #000000;
-      font-size: 20px;
-      margin-left: 5px;
-    }
-    &::after {
-      content: ' ';
-      display: inline-block;
-      position: absolute;
-      right: 0px;
-      top: 2px;
-      width: 1px;
-      height: 16px;
-      background: #ebebeb;
-    }
-    &:first-child {
-      padding-right: 15px;
-      margin-right: 15px;
-    }
-    &:last-child {
-      &::after {
-        display: none;
-      }
-    }
-  }
-}
-
-.iconVip {
-  width: 34px !important;
-  margin-right: 5px;
-}
-
-.iconOther {
-  margin-left: 6px;
-  width: 18px;
-  height: 18px;
-}
-
-.teacher-info {
-  margin-left: 8px;
-  .teacher-name {
-    font-size: 18px;
-    font-weight: 500;
-    color: #1a1a1a;
-    padding-bottom: 6px;
-    display: flex;
-    justify-content: space-between;
-    .teacherCert {
-      display: flex;
-      align-items: center;
-    }
-
-    .teacherLast {
-      display: inline-block;
-      max-width: 120px;
-      overflow: hidden;
-      text-overflow: ellipsis;
-      white-space: nowrap;
-    }
-  }
-}
-
-.subjectList::-webkit-scrollbar {
-  display: none; /* Chrome Safari */
-}
-.subjectList {
-  overflow: auto;
-  width: 255px;
-  // height: 18px;
-  display: flex;
-  flex-wrap: nowrap;
-}
-
-.piNameSubject {
-  display: flex;
-  align-items: center;
-
-  .subject {
-    display: flex;
-    align-items: center;
-    margin-left: 4px;
-    background: #effbf9;
-    border-radius: 8px;
-    font-size: 12px;
-    line-height: 16px;
-    color: #2dc7aa;
-    padding: 0 5px;
-    white-space: nowrap;
-    &:first-child {
-      margin-left: 0;
-    }
-  }
-}
-
-.rTitle {
-  display: flex;
-  align-items: center;
-  &::before {
-    margin-right: 8px;
-    content: ' ';
-    display: inline-block;
-    width: 4px;
-    height: 14px;
-    background: #2dc7aa;
-    border-radius: 3px;
-  }
-}
-
-.liveTag {
-  position: absolute;
-  bottom: 0;
-  left: 50%;
-  transform: translateX(-50%);
-  line-height: 16px;
-  background: #ff6363;
-  border-radius: 20px;
-  text-align: center;
-  color: #fff;
-  font-size: 10px;
-  font-weight: 500;
-  padding: 2px 0;
-  width: 60%;
-  z-index: 10;
-}
-
-.teacherName {
-  display: inline-block;
-  flex: 1;
-  white-space: nowrap;
-  overflow: hidden;
-  text-overflow: ellipsis;
-  max-width: 100px;
-}
-
-.teacherIcons {
-  display: flex;
-  align-items: center;
-}
-.teaherPopup {
-  background: transparent;
-  width: 276px;
-  overflow: initial;
-}
-.teacherIconWrap {
-  padding: 50px 22px 22px 22px;
-  background-color: #fff;
-  border-radius: 0 0 10px 10px;
-  margin-top: -25px;
-}
-.teacherIconItem {
-  margin-bottom: 16px;
-  .teacherIconItemTop {
-    display: flex;
-    align-items: center;
-    margin-bottom: 10px;
-  }
-  :global {
-    .van-image {
-      margin-right: 8px;
-      width: 24px;
-      height: 24px;
-    }
-  }
-  .teacherIconTitle {
-    font-size: 16px;
-    font-weight: bold;
-    color: #333;
-  }
-  .teacherIconDes {
-    font-size: 12px;
-    line-height: 16px;
-    font-weight: 400;
-    padding-left: 3px;
-    color: #666;
-  }
-}
-.closeIcon {
-  position: absolute;
-  bottom: -54px;
-  left: 50%;
-  transform: translateX(-50%);
-  width: 0.96rem;
-  height: 0.96rem;
-}
-.liveList {
-  padding: 12px 0;
-  .headerFollow {
-    margin-bottom: 12px;
-    .teacherIcon {
-      margin: 0 10px 0 0;
-    }
-    .score {
-      margin-left: 10px;
-    }
-    .teacherIconVip {
-      left: 50%;
-      right: initial;
-      transform: translateX(-50%);
-      bottom: -6px;
-    }
-    .liveTag {
-      // bottom: -30px;
-      width: 80%;
-    }
-    .avatar {
-      width: 60px;
-      height: 60px;
-    }
-    .piNameSubject {
-      align-items: flex-start;
-    }
-    .subjectList {
-      flex-wrap: wrap;
-    }
-    .subject {
-      margin: 2px 5px 3px 0;
-    }
-    .teacher-bottom {
-      padding-top: 24px;
-    }
-    .unlinkeBtn {
-      font-size: 12px;
-      color: #ff6363;
-      border: 1px solid #ff6363;
-      padding: 5px 10px;
-      border-radius: 20px;
-    }
-  }
-}
-.followContainer {
-  display: flex;
-  align-items: flex-start;
-}
+.headerContent {
+  padding-top: 40px;
+  min-height: 100px;
+  position: relative;
+}
+
+.teacherContent {
+  display: flex;
+  // justify-content: space-between;
+  flex-shrink: 0;
+}
+
+.teacherIcon {
+  position: relative;
+  margin-top: -38px;
+  line-height: 0;
+
+  .avatar {
+    position: relative;
+    width: 78px;
+    height: 78px;
+    box-sizing: border-box;
+    border: 2px solid #fff;
+    background-color: #fff;
+  }
+
+  .avatarActive {
+    border-color: #F0AF88;
+    background-color: #F0AF88;
+  }
+
+  .teacherIconVip {
+    position: absolute;
+    bottom: 0;
+    right: -12px;
+    width: 39px;
+    height: 18px;
+  }
+}
+
+.teacherInfo {
+  display: flex;
+  align-items: center;
+  // padding: 14px 0;
+  padding-left: 46px;
+
+  .teacherInfoName {
+    font-size: 20px;
+    font-weight: 500;
+    color: #1a1a1a;
+    // line-height: 22px;
+    max-width: 150px;
+    overflow: hidden;
+    white-space: nowrap;
+    text-overflow: ellipsis;
+  }
+
+  &>img {
+    margin-left: 10px;
+    width: 39px;
+    height: 16px;
+  }
+}
+
+.teacherHonor {
+  display: flex;
+  align-items: center;
+  font-size: 12px;
+  line-height: 16px;
+  color: #666;
+  font-weight: 500;
+  padding-bottom: 12px;
+  padding-top: 10px;
+
+  .score {
+    margin-left: 25px;
+  }
+}
+
+.headerCount {
+  width: calc(100% - 28px);
+  padding: 12px;
+  margin: 0 auto;
+  background-color: #fff;
+  border-radius: 10px;
+  box-sizing: border-box;
+}
+
+.teacherOperation {
+  :global {
+    .van-button {
+      height: 28px;
+    }
+  }
+
+  .btn {
+    padding: 3px 12px 1px;
+    min-width: 62px;
+  }
+
+  .btnStar {
+    color: #f18400;
+    border-color: #f18400;
+  }
+}
+
+.subjectSection {
+  margin-right: 10px;
+  // height: 18px;
+  max-width: 68px;
+  box-sizing: content-box;
+}
+
+.teacher-bottom {
+  padding: 30px 0 0 0;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+}
+
+.followFans {
+  padding-top: 10px !important;
+}
+
+.teacher-data {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+
+  .teacher-data_item {
+    font-size: 14px;
+    color: #333333;
+    position: relative;
+
+    span {
+      font-weight: 500;
+      color: #000000;
+      font-size: 20px;
+      margin-left: 5px;
+    }
+
+    &::after {
+      content: ' ';
+      display: inline-block;
+      position: absolute;
+      right: 0px;
+      top: 2px;
+      width: 1px;
+      height: 16px;
+      background: #ebebeb;
+    }
+
+    &:first-child {
+      padding-right: 15px;
+      margin-right: 15px;
+    }
+
+    &:last-child {
+      &::after {
+        display: none;
+      }
+    }
+  }
+}
+
+.iconVip {
+  width: 34px !important;
+  margin-right: 5px;
+}
+
+.iconOther {
+  margin-left: 6px;
+  width: 18px;
+  height: 18px;
+}
+
+.teacher-info {
+  margin-left: 8px;
+
+  .teacher-name {
+    font-size: 18px;
+    font-weight: 500;
+    color: #1a1a1a;
+    padding-bottom: 6px;
+    display: flex;
+    justify-content: space-between;
+
+    .teacherCert {
+      display: flex;
+      align-items: center;
+    }
+
+    .teacherLast {
+      display: inline-block;
+      max-width: 120px;
+      overflow: hidden;
+      text-overflow: ellipsis;
+      white-space: nowrap;
+    }
+  }
+}
+
+.subjectList::-webkit-scrollbar {
+  display: none;
+  /* Chrome Safari */
+}
+
+.subjectList {
+  overflow: auto;
+  width: 255px;
+  // height: 18px;
+  display: flex;
+  flex-wrap: nowrap;
+}
+
+.piNameSubject {
+  display: flex;
+  align-items: center;
+
+  .subject {
+    display: flex;
+    align-items: center;
+    margin-left: 4px;
+    background: #effbf9;
+    border-radius: 8px;
+    font-size: 12px;
+    line-height: 16px;
+    color: #2dc7aa;
+    padding: 0 5px;
+    white-space: nowrap;
+
+    &:first-child {
+      margin-left: 0;
+    }
+  }
+}
+
+.rTitle {
+  display: flex;
+  align-items: center;
+
+  &::before {
+    margin-right: 8px;
+    content: ' ';
+    display: inline-block;
+    width: 4px;
+    height: 14px;
+    background: #2dc7aa;
+    border-radius: 3px;
+  }
+}
+
+.liveTag {
+  position: absolute;
+  bottom: 0;
+  left: 50%;
+  transform: translateX(-50%);
+  line-height: 16px;
+  background: #ff6363;
+  border-radius: 20px;
+  text-align: center;
+  color: #fff;
+  font-size: 10px;
+  font-weight: 500;
+  padding: 2px 0;
+  width: 60%;
+  z-index: 10;
+}
+
+.teacherName {
+  display: inline-block;
+  flex: 1;
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  max-width: 100px;
+}
+
+.teacherIcons {
+  display: flex;
+  align-items: center;
+}
+
+.teaherPopup {
+  background: transparent;
+  width: 276px;
+  overflow: initial;
+}
+
+.teacherIconWrap {
+  padding: 50px 22px 22px 22px;
+  background-color: #fff;
+  border-radius: 0 0 10px 10px;
+  margin-top: -25px;
+}
+
+.teacherIconItem {
+  margin-bottom: 16px;
+
+  .teacherIconItemTop {
+    display: flex;
+    align-items: center;
+    margin-bottom: 10px;
+  }
+
+  :global {
+    .van-image {
+      margin-right: 8px;
+      width: 24px;
+      height: 24px;
+    }
+  }
+
+  .teacherIconTitle {
+    font-size: 16px;
+    font-weight: bold;
+    color: #333;
+  }
+
+  .teacherIconDes {
+    font-size: 12px;
+    line-height: 16px;
+    font-weight: 400;
+    padding-left: 3px;
+    color: #666;
+  }
+}
+
+.closeIcon {
+  position: absolute;
+  bottom: -54px;
+  left: 50%;
+  transform: translateX(-50%);
+  width: 0.96rem;
+  height: 0.96rem;
+}
+
+.liveList {
+  padding: 12px 0;
+
+  .headerFollow {
+    margin-bottom: 12px;
+
+    .teacherIcon {
+      margin: 0 10px 0 0;
+    }
+
+    .score {
+      margin-left: 10px;
+    }
+
+    .teacherIconVip {
+      left: 50%;
+      right: initial;
+      transform: translateX(-50%);
+      bottom: -6px;
+    }
+
+    .liveTag {
+      // bottom: -30px;
+      width: 80%;
+    }
+
+    .avatar {
+      width: 60px;
+      height: 60px;
+    }
+
+    .piNameSubject {
+      align-items: flex-start;
+    }
+
+    .subjectList {
+      flex-wrap: wrap;
+    }
+
+    .subject {
+      margin: 2px 5px 3px 0;
+    }
+
+    .teacher-bottom {
+      padding-top: 24px;
+    }
+
+    .unlinkeBtn {
+      font-size: 12px;
+      color: #ff6363;
+      border: 1px solid #ff6363;
+      padding: 5px 10px;
+      border-radius: 20px;
+    }
+  }
+}
+
+.followContainer {
+  display: flex;
+  align-items: flex-start;
+}

+ 266 - 256
src/teacher/teacher-dependent/model/teacher-header.tsx

@@ -1,256 +1,266 @@
-import { Button, Cell, Icon, Image, Popup, Rate, Toast } from 'vant'
-import { defineComponent } from 'vue'
-import styles from './teacher-header.module.less'
-import { postMessage } from '@/helpers/native-message'
-import iconTeacher from '@common/images/icon_teacher.png'
-import IconXueli from '@common/images/icon-xueli.png'
-import IconJiaozi from '@common/images/icon-jiaozi.png'
-
-export const getAssetsHomeFile = (fileName: string) => {
-  const path = `../images/${fileName}`
-  const modules = import.meta.globEager('../images/*')
-  return modules[path].default
-}
-
-export default defineComponent({
-  name: 'teacher-header',
-  props: {
-    userInfo: {
-      type: Object,
-      default: {}
-    },
-    teacherId: {
-      type: String || Number,
-      default: ''
-    }
-  },
-  data() {
-    return {
-      iconShow: false
-    }
-  },
-  computed: {
-    subjectNameList() {
-      const userInfo: any = this.userInfo
-      const subjectName = userInfo.subjectName
-      return subjectName ? subjectName.split(',') : []
-    },
-    starGrade() {
-      const { starGrade } = this.userInfo as any
-      return Number(starGrade) || 0
-    }
-  },
-  methods: {
-    // 检验是否有对应徽章
-    checkBadge(type: string) {
-      // tag : 老师点亮图标
-      // STYLE:个人风采
-      // VIDEO:视频课
-      // LIVE:直播课,
-      // MUSIC:曲目 逗号隔开
-      let status = false
-      const { userInfo } = this
-      switch (type) {
-        case 'STYLE':
-        case 'VIDEO':
-        case 'LIVE':
-        case 'MUSIC':
-          if (userInfo.tag) {
-            status = userInfo.tag.indexOf(type) > -1
-          }
-          break
-        case 'VIP':
-          status = userInfo.isVip > 0
-          break
-        default:
-          status = false
-          break
-      }
-      return status
-    },
-
-    openTeacherIcon() {
-      this.iconShow = true
-    }
-  },
-  render() {
-    const iconList = [
-      {
-        icon: 'cert_active.png',
-        title: '演奏Mlog达人',
-        des: '个人风采中上传老师风采视频并通过审核'
-      },
-      {
-        icon: 'video_active.png',
-        title: '教学视频达人',
-        des: '发布您制作的教学视频课程并通过审核'
-      },
-      {
-        icon: 'live_active.png',
-        title: '直播up达人',
-        des: '达到开通直播权限标准并开通直播功能'
-      },
-      {
-        icon: 'music_active.png',
-        title: '乐谱歌单达人',
-        des: '上传您制作的乐谱并通过审核'
-      }
-    ]
-    return (
-      <>
-        <div class={styles.headerContent}>
-          <div class={styles.headerCount}>
-            <div class={styles.teacherContent}>
-              <div
-                class={styles.teacherIcon}
-                onClick={() => {
-                  // 判断是否在直播中
-                  if (this.userInfo.liveing === 1) {
-                    postMessage({
-                      api: 'joinLiveRoom',
-                      content: {
-                        roomId: this.userInfo.roomUid,
-                        teacherId: this.userInfo.userId
-                      }
-                    })
-                  }
-                }}
-              >
-                {/* iy */}
-                <Image
-                  class={[
-                    styles.avatar,
-                    this.checkBadge('VIP') && styles.avatarActive
-                  ]}
-                  round
-                  src={this.userInfo.heardUrl || iconTeacher}
-                  fit="cover"
-                />
-
-                {this.userInfo.liveing === 1 && (
-                  <p class={styles.liveTag}>直播中</p>
-                )}
-
-                <Image
-                  class={styles.teacherIconVip}
-                  src={
-                    this.checkBadge('VIP')
-                      ? getAssetsHomeFile('vip_active.png')
-                      : getAssetsHomeFile('vip_default.png')
-                  }
-                />
-              </div>
-              <div class={styles.teacherInfo}>
-                <div class={styles.teacherInfoName}>
-                  {this.userInfo.username ||
-                    `游客${this.userInfo.userId || ''}`}
-                </div>
-                {this.userInfo.degreeFlag ? <img src={IconXueli} /> : null}
-                {this.userInfo.teacherFlag ? <img src={IconJiaozi} /> : null}
-              </div>
-            </div>
-
-            <div class={styles.teacherHonor}>
-              <div>勋章:</div>
-              <div class={styles.teacherIcons} onClick={this.openTeacherIcon}>
-                <Image
-                  class={styles.iconOther}
-                  src={
-                    this.checkBadge('STYLE')
-                      ? getAssetsHomeFile('cert_active.png')
-                      : getAssetsHomeFile('cert_default.png')
-                  }
-                />
-                <Image
-                  class={styles.iconOther}
-                  src={
-                    this.checkBadge('VIDEO')
-                      ? getAssetsHomeFile('video_active.png')
-                      : getAssetsHomeFile('video_default.png')
-                  }
-                />
-                <Image
-                  class={styles.iconOther}
-                  src={
-                    this.checkBadge('LIVE')
-                      ? getAssetsHomeFile('live_active.png')
-                      : getAssetsHomeFile('live_default.png')
-                  }
-                />
-                <Image
-                  class={styles.iconOther}
-                  src={
-                    this.checkBadge('MUSIC')
-                      ? getAssetsHomeFile('music_active.png')
-                      : getAssetsHomeFile('music_default.png')
-                  }
-                />
-              </div>
-              <div class={styles.score}>评分:</div>
-              <div class={styles.level}>
-                {this.starGrade ? (
-                  <Rate
-                    readonly
-                    modelValue={this.starGrade}
-                    iconPrefix="iconfont"
-                    color="#FFC459"
-                    void-icon="star_default"
-                    icon="star_active"
-                    size={15}
-                  />
-                ) : (
-                  <span style={{ fontSize: '12px', color: '#999999' }}>
-                    暂无评分
-                  </span>
-                )}
-              </div>
-            </div>
-            <div class={styles.piNameSubject}>
-              <Image
-                class={styles.subjectSection}
-                src={getAssetsHomeFile('icon_subject.png')}
-                fit="contain"
-              />
-              <div class={styles.subjectList}>
-                {this.subjectNameList.map((item: any) => (
-                  <span class={styles.subject}>{item}</span>
-                ))}
-              </div>
-            </div>
-            <div class={styles['teacher-bottom']}>
-              <div class={styles['teacher-data']}>
-                <div class={styles['teacher-data_item']}>
-                  粉丝 <span>{this.userInfo.fansNum || 0}</span>
-                </div>
-                <div class={styles['teacher-data_item']}>
-                  已上课时 <span>{this.userInfo.expTime || 0}</span>
-                </div>
-              </div>
-            </div>
-          </div>
-        </div>
-        <Popup class={styles['teaherPopup']} v-model:show={this.iconShow}>
-          <Image src={getAssetsHomeFile('teacher-icon.png')} />
-          <div class={styles.teacherIconWrap}>
-            {iconList.map(n => {
-              return (
-                <div class={styles.teacherIconItem}>
-                  <div class={styles.teacherIconItemTop}>
-                    <Image src={getAssetsHomeFile(n.icon)} />
-                    <div class={styles.teacherIconTitle}>{n.title}</div>
-                  </div>
-                  <div class={styles.teacherIconDes}>{n.des}</div>
-                </div>
-              )
-            })}
-          </div>
-          <Image
-            onClick={() => (this.iconShow = false)}
-            class={styles.closeIcon}
-            src={getAssetsHomeFile('icon-close.png')}
-          />
-        </Popup>
-      </>
-    )
-  }
-})
+import { Button, Cell, Icon, Image, Popup, Rate, Toast } from 'vant'
+import { defineComponent } from 'vue'
+import styles from './teacher-header.module.less'
+import { postMessage } from '@/helpers/native-message'
+import iconTeacher from '@common/images/icon_teacher.png'
+import IconXueli from '@common/images/icon-xueli.png'
+import IconJiaozi from '@common/images/icon-jiaozi.png'
+
+export const getAssetsHomeFile = (fileName: string) => {
+  const path = `../images/${fileName}`
+  const modules = import.meta.globEager('../images/*')
+  return modules[path].default
+}
+
+export default defineComponent({
+  name: 'teacher-header',
+  props: {
+    userInfo: {
+      type: Object,
+      default: {}
+    },
+    teacherId: {
+      type: String || Number,
+      default: ''
+    }
+  },
+  data() {
+    return {
+      iconShow: false
+    }
+  },
+  computed: {
+    subjectNameList() {
+      const userInfo: any = this.userInfo
+      const subjectName = userInfo.subjectName
+      return subjectName ? subjectName.split(',') : []
+    },
+    starGrade() {
+      const { starGrade } = this.userInfo as any
+      return Number(starGrade) || 0
+    }
+  },
+  methods: {
+    // 检验是否有对应徽章
+    checkBadge(type: string) {
+      // tag : 老师点亮图标
+      // STYLE:个人风采
+      // VIDEO:视频课
+      // LIVE:直播课,
+      // MUSIC:曲目 逗号隔开
+      let status = false
+      const { userInfo } = this
+      switch (type) {
+        case 'STYLE':
+        case 'VIDEO':
+        case 'LIVE':
+        case 'MUSIC':
+          if (userInfo.tag) {
+            status = userInfo.tag.indexOf(type) > -1
+          }
+          break
+        case 'VIP':
+          status = userInfo.userVip?.vipType === 'VIP'
+          break
+        case 'SVIP':
+          status =
+            userInfo.userVip?.vipType === 'SVIP' ||
+            userInfo.userVip?.vipType === 'PERMANENT_SVIP'
+          break
+        default:
+          status = false
+          break
+      }
+      return status
+    },
+
+    openTeacherIcon() {
+      this.iconShow = true
+    }
+  },
+  render() {
+    const iconList = [
+      {
+        icon: 'cert_active.png',
+        title: '演奏Mlog达人',
+        des: '个人风采中上传老师风采视频并通过审核'
+      },
+      {
+        icon: 'video_active.png',
+        title: '教学视频达人',
+        des: '发布您制作的教学视频课程并通过审核'
+      },
+      {
+        icon: 'live_active.png',
+        title: '直播up达人',
+        des: '达到开通直播权限标准并开通直播功能'
+      },
+      {
+        icon: 'music_active.png',
+        title: '乐谱歌单达人',
+        des: '上传您制作的乐谱并通过审核'
+      }
+    ]
+    return (
+      <>
+        <div class={styles.headerContent}>
+          <div class={styles.headerCount}>
+            <div class={styles.teacherContent}>
+              <div
+                class={styles.teacherIcon}
+                onClick={() => {
+                  // 判断是否在直播中
+                  if (this.userInfo.liveing === 1) {
+                    postMessage({
+                      api: 'joinLiveRoom',
+                      content: {
+                        roomId: this.userInfo.roomUid,
+                        teacherId: this.userInfo.userId
+                      }
+                    })
+                  }
+                }}
+              >
+                {/* iy */}
+                <Image
+                  class={[
+                    styles.avatar,
+                    (this.checkBadge('SVIP') || this.checkBadge('VIP')) &&
+                      styles.avatarActive
+                  ]}
+                  round
+                  src={this.userInfo.heardUrl || iconTeacher}
+                  fit="cover"
+                />
+
+                {this.userInfo.liveing === 1 && (
+                  <p class={styles.liveTag}>直播中</p>
+                )}
+
+                {(this.checkBadge('SVIP') || this.checkBadge('VIP')) && (
+                  <Image
+                    class={styles.teacherIconVip}
+                    src={
+                      this.checkBadge('SVIP')
+                        ? getAssetsHomeFile('svip_active.png')
+                        : this.checkBadge('VIP')
+                        ? getAssetsHomeFile('vip_active.png')
+                        : ''
+                    }
+                  />
+                )}
+              </div>
+              <div class={styles.teacherInfo}>
+                <div class={styles.teacherInfoName}>
+                  {this.userInfo.username ||
+                    `游客${this.userInfo.userId || ''}`}
+                </div>
+                {this.userInfo.degreeFlag ? <img src={IconXueli} /> : null}
+                {this.userInfo.teacherFlag ? <img src={IconJiaozi} /> : null}
+              </div>
+            </div>
+
+            <div class={styles.teacherHonor}>
+              <div>勋章:</div>
+              <div class={styles.teacherIcons} onClick={this.openTeacherIcon}>
+                <Image
+                  class={styles.iconOther}
+                  src={
+                    this.checkBadge('STYLE')
+                      ? getAssetsHomeFile('cert_active.png')
+                      : getAssetsHomeFile('cert_default.png')
+                  }
+                />
+                <Image
+                  class={styles.iconOther}
+                  src={
+                    this.checkBadge('VIDEO')
+                      ? getAssetsHomeFile('video_active.png')
+                      : getAssetsHomeFile('video_default.png')
+                  }
+                />
+                <Image
+                  class={styles.iconOther}
+                  src={
+                    this.checkBadge('LIVE')
+                      ? getAssetsHomeFile('live_active.png')
+                      : getAssetsHomeFile('live_default.png')
+                  }
+                />
+                <Image
+                  class={styles.iconOther}
+                  src={
+                    this.checkBadge('MUSIC')
+                      ? getAssetsHomeFile('music_active.png')
+                      : getAssetsHomeFile('music_default.png')
+                  }
+                />
+              </div>
+              <div class={styles.score}>评分:</div>
+              <div class={styles.level}>
+                {this.starGrade ? (
+                  <Rate
+                    readonly
+                    modelValue={this.starGrade}
+                    iconPrefix="iconfont"
+                    color="#FFC459"
+                    void-icon="star_default"
+                    icon="star_active"
+                    size={15}
+                  />
+                ) : (
+                  <span style={{ fontSize: '12px', color: '#999999' }}>
+                    暂无评分
+                  </span>
+                )}
+              </div>
+            </div>
+            <div class={styles.piNameSubject}>
+              <Image
+                class={styles.subjectSection}
+                src={getAssetsHomeFile('icon_subject.png')}
+                fit="contain"
+              />
+              <div class={styles.subjectList}>
+                {this.subjectNameList.map((item: any) => (
+                  <span class={styles.subject}>{item}</span>
+                ))}
+              </div>
+            </div>
+            <div class={styles['teacher-bottom']}>
+              <div class={styles['teacher-data']}>
+                <div class={styles['teacher-data_item']}>
+                  粉丝 <span>{this.userInfo.fansNum || 0}</span>
+                </div>
+                <div class={styles['teacher-data_item']}>
+                  已上课时 <span>{this.userInfo.expTime || 0}</span>
+                </div>
+              </div>
+            </div>
+          </div>
+        </div>
+        <Popup class={styles['teaherPopup']} v-model:show={this.iconShow}>
+          <Image src={getAssetsHomeFile('teacher-icon.png')} />
+          <div class={styles.teacherIconWrap}>
+            {iconList.map(n => {
+              return (
+                <div class={styles.teacherIconItem}>
+                  <div class={styles.teacherIconItemTop}>
+                    <Image src={getAssetsHomeFile(n.icon)} />
+                    <div class={styles.teacherIconTitle}>{n.title}</div>
+                  </div>
+                  <div class={styles.teacherIconDes}>{n.des}</div>
+                </div>
+              )
+            })}
+          </div>
+          <Image
+            onClick={() => (this.iconShow = false)}
+            class={styles.closeIcon}
+            src={getAssetsHomeFile('icon-close.png')}
+          />
+        </Popup>
+      </>
+    )
+  }
+})

+ 88 - 88
src/teacher/teacher-dependent/teacher-home.tsx

@@ -1,88 +1,88 @@
-import ColHeader from '@/components/col-header'
-import { defineComponent } from 'vue'
-import styles from './teacher-home.module.less'
-import Single from './components/single'
-import request from '@/helpers/request'
-import { listenerMessage } from '@/helpers/native-message'
-import { useEventListener, useWindowScroll } from '@vueuse/core'
-import TeacherHeader from './model/teacher-header'
-import { useRect } from '@vant/use'
-
-export default defineComponent({
-  name: 'teacherHome',
-  data() {
-    // 先取session中的数据,没有再取参数,默认为老师风采
-    const tabs = sessionStorage.getItem('teacherHomeTabs') || ''
-    const query = this.$route.query
-    return {
-      teacherId: query.teacherId as string,
-      tabs: tabs || query.tabs || 'single',
-      userInfo: {} as any,
-      background: 'rgba(55, 205, 177, 0)',
-      headColor: '#fff',
-      height: 'auto' as any,
-      backIconColor: 'white',
-      homeContaiterHeight: ''
-    }
-  },
-  async created() {},
-  async mounted() {
-    this.getTeacherDetail()
-    // 监听页面返回
-    listenerMessage('webViewOnResume', () => {
-      this.getTeacherDetail()
-    })
-    useEventListener(document, 'scroll', evt => {
-      const { y } = useWindowScroll()
-      // this.background = `rgba(255, 255, 255, ${y.value / 100})`
-      // console.log(y.value) 142
-      if (y.value > 52) {
-        this.headColor = '#000'
-        this.background = '#fff'
-        this.backIconColor = 'black'
-      } else {
-        this.background = 'transparent'
-        this.headColor = '#fff'
-        this.backIconColor = 'white'
-      }
-    })
-  },
-  methods: {
-    async getTeacherDetail() {
-      try {
-        const res = await request.get('/api-student/teacher/queryTeacherHome', {
-          params: {
-            userId: this.teacherId
-          }
-        })
-        this.userInfo = res.data
-      } catch {}
-    }
-  },
-  render() {
-    return (
-      <div class={styles['teacher-record']}>
-        <div ref="headers">
-          <ColHeader
-            background={this.background}
-            border={false}
-            color={this.headColor}
-            backIconColor={this.backIconColor as any}
-            onHeaderBack={() => {
-              this.$nextTick(() => {
-                const { height } = useRect((this as any).$refs.headers)
-                this.height = height
-              })
-            }}
-          />
-        </div>
-        <img class={styles.bgImg} src={this.userInfo.heardUrl} />
-        <div class={styles.bg}></div>
-        <div class={styles.teacherHeader}>
-          <TeacherHeader userInfo={this.userInfo} teacherId={this.teacherId} />
-        </div>
-        <Single userInfo={this.userInfo} />
-      </div>
-    )
-  }
-})
+import ColHeader from '@/components/col-header'
+import { defineComponent } from 'vue'
+import styles from './teacher-home.module.less'
+import Single from './components/single'
+import request from '@/helpers/request'
+import { listenerMessage } from '@/helpers/native-message'
+import { useEventListener, useWindowScroll } from '@vueuse/core'
+import TeacherHeader from './model/teacher-header'
+import { useRect } from '@vant/use'
+
+export default defineComponent({
+  name: 'teacherHome',
+  data() {
+    // 先取session中的数据,没有再取参数,默认为老师风采
+    const tabs = sessionStorage.getItem('teacherHomeTabs') || ''
+    const query = this.$route.query
+    return {
+      teacherId: query.teacherId as string,
+      tabs: tabs || query.tabs || 'single',
+      userInfo: {} as any,
+      background: 'rgba(55, 205, 177, 0)',
+      headColor: '#fff',
+      height: 'auto' as any,
+      backIconColor: 'white',
+      homeContaiterHeight: ''
+    }
+  },
+  async created() {},
+  async mounted() {
+    this.getTeacherDetail()
+    // 监听页面返回
+    listenerMessage('webViewOnResume', () => {
+      this.getTeacherDetail()
+    })
+    useEventListener(document, 'scroll', evt => {
+      const { y } = useWindowScroll()
+      // this.background = `rgba(255, 255, 255, ${y.value / 100})`
+      // console.log(y.value) 142
+      if (y.value > 52) {
+        this.headColor = '#000'
+        this.background = '#fff'
+        this.backIconColor = 'black'
+      } else {
+        this.background = 'transparent'
+        this.headColor = '#fff'
+        this.backIconColor = 'white'
+      }
+    })
+  },
+  methods: {
+    async getTeacherDetail() {
+      try {
+        const res = await request.get('/api-student/teacher/queryTeacherHome', {
+          params: {
+            userId: this.teacherId
+          }
+        })
+        this.userInfo = res.data
+      } catch {}
+    }
+  },
+  render() {
+    return (
+      <div class={styles['teacher-record']}>
+        <div ref="headers">
+          <ColHeader
+            background={this.background}
+            border={false}
+            color={this.headColor}
+            backIconColor={this.backIconColor as any}
+            onHeaderBack={() => {
+              this.$nextTick(() => {
+                const { height } = useRect((this as any).$refs.headers)
+                this.height = height
+              })
+            }}
+          />
+        </div>
+        <img class={styles.bgImg} src={this.userInfo.heardUrl} />
+        <div class={styles.bg}></div>
+        <div class={styles.teacherHeader}>
+          <TeacherHeader userInfo={this.userInfo} teacherId={this.teacherId} />
+        </div>
+        <Single userInfo={this.userInfo} />
+      </div>
+    )
+  }
+})

+ 1 - 0
src/tenant/music/music-detail/new-index.tsx

@@ -1172,6 +1172,7 @@ export default defineComponent({
                         musicBuy(musicDetail.value, () => {}, {
                           'part-index': item?.xmlValue || 0,
                           sett: staff.radio,
+                          albumId: route.query.tenantAlbumId || '', // 专辑编号
                           // 1:忽略系统节拍器
                           ignoreSysMetronome:
                             route.query.subjectType === 'MUSIC' ? 1 : 0

+ 7 - 1
src/views/adapay/payment/index.tsx

@@ -121,7 +121,13 @@ export default defineComponent({
       // 不管接口是否报错,都返回
       emit('update:modelValue', false)
 
-      !noBack && router.go(-1)
+      if (!noBack) {
+        if (browser().isApp) {
+          postMessage({ api: 'goBack' })
+        } else {
+          router.go(-1)
+        }
+      }
       emit('backOut')
     }
     const onSubmit = async () => {

BIN
src/views/creation/images/icon-svip.png


BIN
src/views/creation/images/icon-vip.png


+ 22 - 5
src/views/creation/index-share.tsx

@@ -10,7 +10,9 @@ import {
 // import Regions from 'wavesurfer.js/dist/plugins/regions.js';
 import styles from './index.module.less'
 import { Cell, Image, List, Popup, Slider } from 'vant'
-import iconMember from './images/icon-member.png'
+// import iconMember from './images/icon-member.png'
+import iconVip from './images/icon-vip.png'
+import iconSVip from './images/icon-svip.png'
 import iconZan from './images/icon-zan.png'
 import iconZanActive from './images/icon-zan-active.png'
 import iconZ from './images/icon-z.png'
@@ -341,15 +343,30 @@ export default defineComponent({
         <Cell class={styles.userSection} center border={false}>
           {{
             icon: () => (
-              <Image class={styles.userLogo} src={state.musicDetail.avatar} />
+              <div
+                class={[
+                  styles.userLogoSection,
+                  (state.musicDetail.vipType === 'SVIP' ||
+                    state.musicDetail.vipType === 'PERMANENT_SVIP') &&
+                    styles.userSVip,
+                  state.musicDetail.vipType === 'VIP' && styles.userVip
+                ]}
+              >
+                <Image class={styles.userLogo} src={state.musicDetail.avatar} />
+                <i class={styles.showMemeber}></i>
+              </div>
             ),
             title: () => (
               <div class={styles.userInfo}>
                 <p class={styles.name}>
                   <span>{state.musicDetail.username}</span>
-                  {state.musicDetail.vipFlag && (
-                    <img src={iconMember} class={styles.iconMember} />
-                  )}
+                  {/* {state.musicDetail.vipType === 'VIP' && (
+                    <img src={iconVip} class={styles.iconMember} />
+                  )} */}
+                  {/* {(state.musicDetail.vipType === 'SVIP' ||
+                    state.musicDetail.vipType === 'PERMANENT_SVIP') && (
+                    <img src={iconSVip} class={styles.iconMember} />
+                  )} */}
                 </p>
                 <p class={styles.sub}>
                   {state.musicDetail.subjectName}{' '}

+ 38 - 2
src/views/creation/index.module.less

@@ -221,12 +221,48 @@
   padding: 15px 12px !important;
   background-color: transparent !important;
 
-  .userLogo {
+  .userLogoSection {
     width: 44px;
     height: 44px;
     border: 1px solid #FFFFFF;
     margin-right: 10px;
     border-radius: 50%;
+    flex-shrink: 0;
+    position: relative;
+
+    .showMemeber {
+      position: absolute;
+      bottom: 1px;
+      right: -3px;
+      width: 18px;
+      height: 18px;
+    }
+
+    &.userVip {
+      border: 1px solid #F0AF88;
+
+      .showMemeber {
+        background: url('./images/icon-vip.png') no-repeat center;
+        background-size: contain;
+      }
+    }
+
+    &.userSVip {
+
+      border: 1px solid #F0AF88;
+
+      .showMemeber {
+        background: url('./images/icon-svip.png') no-repeat center;
+        background-size: contain;
+      }
+
+    }
+  }
+
+  .userLogo {
+    width: 44px;
+    height: 44px;
+    border-radius: 50%;
     overflow: hidden;
   }
 
@@ -572,4 +608,4 @@
       line-height: 14px;
     }
   }
-}
+}

+ 21 - 4
src/views/creation/index.tsx

@@ -7,7 +7,9 @@ import { Button, Cell, Dialog, Image, List, Popup, Slider, Toast } from 'vant'
 import iconDownload from './images/icon-download.png'
 import iconShare from './images/icon-share.png'
 import iconDelete from './images/icon-delete.png'
-import iconMember from './images/icon-member.png'
+// import iconMember from './images/icon-member.png'
+import iconVip from './images/icon-vip.png'
+import iconSVip from './images/icon-svip.png'
 import iconZan from './images/icon-zan.png'
 import iconZanActive from './images/icon-zan-active.png'
 import iconPlay from './images/icon-play.png'
@@ -348,15 +350,30 @@ export default defineComponent({
         <Cell class={styles.userSection} center border={false}>
           {{
             icon: () => (
-              <Image class={styles.userLogo} src={state.musicDetail.avatar} />
+              <div
+                class={[
+                  styles.userLogoSection,
+                  (state.musicDetail.vipType === 'SVIP' ||
+                    state.musicDetail.vipType === 'PERMANENT_SVIP') &&
+                    styles.userSVip,
+                  state.musicDetail.vipType === 'VIP' && styles.userVip
+                ]}
+              >
+                <Image class={styles.userLogo} src={state.musicDetail.avatar} />
+                <i class={styles.showMemeber}></i>
+              </div>
             ),
             title: () => (
               <div class={styles.userInfo}>
                 <p class={styles.name}>
                   <span>{state.musicDetail?.username}</span>
-                  {state.musicDetail.vipFlag && (
-                    <img src={iconMember} class={styles.iconMember} />
+                  {/* {state.musicDetail.vipType === 'VIP' && (
+                    <img src={iconVip} class={styles.iconMember} />
                   )}
+                  {(state.musicDetail.vipType === 'SVIP' ||
+                    state.musicDetail.vipType === 'PERMANENT_SVIP') && (
+                    <img src={iconSVip} class={styles.iconMember} />
+                  )} */}
                 </p>
                 <p class={styles.sub}>
                   {state.musicDetail.subjectName}{' '}

+ 37 - 0
src/views/member-center/components/member-interes/index.module.less

@@ -0,0 +1,37 @@
+.member_insteres {
+  padding: 0 16px;
+
+  .title {
+    height: 28px;
+    text-align: center;
+    padding: 16px 0;
+
+    img {
+      height: inherit;
+      width: auto;
+    }
+  }
+
+  img {
+    width: 100%;
+  }
+
+  .intro {
+    img {
+      margin-bottom: 4px;
+
+      &:last-child {
+        margin-bottom: 0px;
+      }
+    }
+  }
+
+  .introVip {
+    line-height: 0;
+
+    img {
+      margin-bottom: 0;
+
+    }
+  }
+}

+ 65 - 0
src/views/member-center/components/member-interes/index.tsx

@@ -0,0 +1,65 @@
+import { defineComponent } from 'vue'
+import styles from './index.module.less'
+import title1 from '../../new-images/icon-title-1.png'
+import title2 from '../../new-images/icon-title-2.png'
+import title3 from '../../new-images/icon-title-3.png'
+import iconEquity from '../../new-images/icon-equity-bg.png'
+import sVip1 from '../../new-images/svip-fun-1.png'
+import sVip2 from '../../new-images/svip-fun-2.png'
+import sVip3 from '../../new-images/svip-fun-3.png'
+import sVip4 from '../../new-images/svip-fun-4.png'
+import sVipQuestion from '../../new-images/svip-question-bg.png'
+import vip1 from '../../new-images/vip-fun-1.png'
+import vip2 from '../../new-images/vip-fun-2.png'
+import vip3 from '../../new-images/vip-fun-3.png'
+import vipQuestion from '../../new-images/vip-question-bg.png'
+
+export default defineComponent({
+  name: 'member-insteres',
+  props: {
+    type: {
+      type: String,
+      default: 'VIP'
+    }
+  },
+  setup(props) {
+    return () => (
+      <div class={styles.member_insteres}>
+        <div class={styles.title}>
+          <img src={title3} />
+        </div>
+
+        <img src={iconEquity} />
+
+        <div class={styles.title}>
+          <img src={title1} />
+        </div>
+
+        {props.type === 'SVIP' ? (
+          <div class={styles.intro}>
+            <img src={sVip1} />
+            <img src={sVip2} />
+            <img src={sVip3} />
+            <img src={sVip4} />
+          </div>
+        ) : (
+          <div class={[styles.intro, styles.introVip]}>
+            <img src={vip1} />
+            <img src={vip2} style={{ 'margin-top': '-1px' }} />
+            <img src={vip3} />
+          </div>
+        )}
+
+        <div class={styles.title}>
+          <img src={title2} />
+        </div>
+
+        {props.type === 'SVIP' ? (
+          <img src={sVipQuestion} />
+        ) : (
+          <img src={vipQuestion} />
+        )}
+      </div>
+    )
+  }
+})

+ 419 - 0
src/views/member-center/index copy.tsx

@@ -0,0 +1,419 @@
+import ColHeader from '@/components/col-header'
+import { Button, Cell, Icon, Image, Popup, Toast } from 'vant'
+import { defineComponent } from 'vue'
+import styles from './index.module.less'
+import request from '@/helpers/request'
+import { setLogin, state } from '@/state'
+import iconStudent from '@common/images/icon_student.png'
+import iconTeacher from '@common/images/icon_teacher.png'
+import iconGift from './images/icon_gift.png'
+import iconShare from '../music/album/icon_share2.svg'
+import iconDiscount from './images/icon_discount.png'
+import iconMemberLogo from './images/member_logo.png'
+import { orderStatus } from '@/views/order-detail/orderStatus'
+import dayjs from 'dayjs'
+import { memberType } from '@/constant'
+import { moneyFormat } from '@/helpers/utils'
+import ColShare from '@/components/col-share'
+
+export const getAssetsHomeFile = (fileName: string) => {
+  const path = `./images/${fileName}`
+  const modules = import.meta.globEager('./images/*')
+  return modules[path].default
+}
+
+export default defineComponent({
+  name: 'MemberCenter',
+  data() {
+    const query = this.$route.query
+    return {
+      activityId: query.activityId,
+      recomUserId: query.recomUserId,
+      apiSuffix:
+        state.platformType === 'STUDENT' ? '/api-student' : '/api-teacher',
+      agreeStatus: false,
+      functionList: [],
+      memberList: [],
+      selectMember: {} as any,
+      params: {
+        page: 1,
+        rows: 20
+      },
+      discountTeacher: {
+        avatar: '',
+        discount: 0,
+        username: ''
+      },
+      shareStatus: false,
+      shareUrl: '',
+      shareDiscount: 0 // 是否有优惠活动
+    }
+  },
+  computed: {
+    userInfo() {
+      const users = state.user.data
+      return {
+        username: users?.username,
+        phone: users?.phone,
+        avatar: users?.heardUrl,
+        id: users?.userId,
+        memberRankSettingId: users?.memberRankSettingId,
+        isVip: users?.isVip,
+        membershipDays: users?.membershipDays,
+        membershipEndTime: users?.membershipEndTime
+      }
+    }
+  },
+  async mounted() {
+    try {
+      const userInfo = await request.get(
+        state.platformType === 'TEACHER'
+          ? '/api-teacher/teacher/queryUserInfo'
+          : '/api-student/student/queryUserInfo'
+      )
+      setLogin(userInfo.data)
+
+      const res = await request.post(
+        `${this.apiSuffix}/memberPriceSettings/vipPermissions`
+      )
+      const result = res.data || []
+      this.functionList = result.map((item: any) => {
+        return {
+          title: item.paramName,
+          icon: getAssetsHomeFile(`${item.paramValue}.png`)
+        }
+      })
+
+      const setting = await request.post(
+        `${this.apiSuffix}/memberPriceSettings/list`,
+        {
+          data: {
+            activityId: Number(this.activityId),
+            userId: this.recomUserId
+          }
+        }
+      )
+      const { list, ...more } = setting.data
+      this.discountTeacher = {
+        ...more
+      }
+      const settingResult = list || []
+      let settingList: any = []
+      settingResult.forEach((item: any) => {
+        const tempItem = {
+          title: '',
+          salePrice: item.salePrice,
+          originalPrice: item.originalPrice,
+          period: item.period,
+          id: item.id,
+          discount: item.discount,
+          discountPrice: item.discountPrice,
+          status: false
+        }
+
+        tempItem.title = memberType[item.period]
+
+        item.period !== 'DAY' && settingList.push(tempItem)
+      })
+
+      settingList = settingList ? settingList.reverse() : []
+      if (settingList.length > 0) {
+        settingList[0].status = true
+        this.selectMember = settingList[0]
+      }
+      console.log(settingList)
+      this.memberList = settingList
+    } catch {}
+  },
+  methods: {
+    async onShare() {
+      try {
+        const res = await request.post('/api-teacher/open/vipProfit', {
+          data: {
+            userId: this.userInfo.id
+          }
+        })
+
+        this.shareUrl = `${location.origin}/teacher#/shareVip?recomUserId=${this.userInfo.id}&userType=${state.platformType}`
+        // 判断是否有我分享的编号
+        if (res.data && res.data.activityId) {
+          this.shareUrl = this.shareUrl + '&activityId=' + res.data.activityId
+        }
+        this.shareStatus = true
+        this.shareDiscount = res.data.discount || 0
+        // let url =
+        //   location.origin +
+        //   `/accompany/colexiu-share.html?id=${moreData.value.id}&recomUserId=${state.user.data?.userId}`
+        // // 判断是否有活动
+        // if (res.data.discount === 1) {
+        //   url += `&activityId=${res.data.activityId}`
+        // }
+        // shareDiscount.value = res.data.discount || 0
+        // shareUrl.value = url
+        // isMore.value = false
+        // shareStatus.value = true
+        return
+      } catch {}
+    },
+    calcSalePrice(item: any) {
+      // discount
+      if (item.discount === 1) {
+        const tempPrice = Number(
+          (item.salePrice - item.discountPrice).toFixed(2)
+        )
+        return tempPrice >= 0 ? tempPrice : 0
+      }
+      return item.salePrice
+    },
+    onSubmit() {
+      const member: any = this.selectMember
+      // 判断是否有会员
+      const startTime = this.userInfo.isVip
+        ? dayjs(this.userInfo.membershipEndTime).toDate()
+        : new Date()
+      let endTime = new Date()
+      if (member.period === 'MONTH') {
+        endTime = dayjs(startTime).add(1, 'month').toDate()
+      } else if (member.period === 'QUARTERLY') {
+        endTime = dayjs(startTime).add(3, 'month').toDate()
+      } else if (member.period === 'YEAR_HALF') {
+        endTime = dayjs(startTime).add(6, 'month').toDate()
+      } else if (member.period === 'YEAR') {
+        endTime = dayjs(startTime).add(1, 'year').toDate()
+      }
+
+      orderStatus.orderObject.orderType = 'VIP'
+      orderStatus.orderObject.orderName = '小酷Ai' + member.title
+      orderStatus.orderObject.orderDesc = '小酷Ai' + member.title
+      orderStatus.orderObject.actualPrice = this.calcSalePrice(member)
+      orderStatus.orderObject.recomUserId = this.recomUserId
+      orderStatus.orderObject.activityId = this.activityId
+      orderStatus.orderObject.orderNo = ''
+      orderStatus.orderObject.orderList = [
+        {
+          orderType: 'VIP',
+          goodsName: '小酷Ai' + member.title,
+          id: member.id,
+          title: member.title,
+          price: this.calcSalePrice(member),
+          startTime: dayjs(startTime).format('YYYY-MM-DD'),
+          endTime: dayjs(endTime).format('YYYY-MM-DD'),
+          recomUserId: this.recomUserId
+        }
+      ]
+      this.$router.push({
+        path: '/orderDetail',
+        query: {
+          orderType: 'VIP'
+        }
+      })
+    }
+  },
+  render() {
+    return (
+      <div class={styles['member-center']}>
+        <ColHeader
+          background="#ffe5cc"
+          v-slots={{
+            right: () => (
+              <div class={styles.shareBtn} onClick={this.onShare}>
+                <Image src={iconShare} />
+                分享
+              </div>
+            )
+          }}
+        />
+        <div class={styles.member_container}>
+          <Cell
+            class={styles.userMember}
+            labelClass={styles.timeRemaining}
+            v-slots={{
+              icon: () => (
+                <div class={styles.userImgSection}>
+                  <Image
+                    class={styles.userImg}
+                    src={this.userInfo.avatar || iconStudent}
+                    fit="cover"
+                  />
+                </div>
+              ),
+              title: () => (
+                <div class={styles.userInfo}>
+                  <span class={styles.name}>{this.userInfo.username}</span>
+                  {!!this.userInfo.isVip && (
+                    <Image
+                      class={styles.level}
+                      src="https://oss.dayaedu.com/daya/202107/ScSTL1D.png"
+                    />
+                  )}
+                  <span
+                    class={styles.phone}
+                    v-html={`(${this.userInfo.phone})`}
+                  ></span>
+                </div>
+              ),
+              label: () => (
+                <div class={styles.member_time}>
+                  {this.userInfo.isVip ? (
+                    <div>
+                      会员权益有效期剩余
+                      <span class={styles.remaining}>
+                        {this.userInfo.membershipDays}
+                      </span>
+                      天
+                    </div>
+                  ) : !this.userInfo.isVip &&
+                    this.userInfo.membershipEndTime ? (
+                    <div>您的会员已过期,续费后会员权益可继续使用</div>
+                  ) : (
+                    <div>亲,您还不是会员哦~</div>
+                  )}
+                </div>
+              )
+            }}
+          ></Cell>
+        </div>
+
+        <div class={styles.memberContainer}>
+          <div class={styles.memberItem}>
+            <div class={styles.title}>
+              会员<span>VIP</span>
+            </div>
+
+            {/* 判断是否有推荐老师 */}
+            {this.discountTeacher.discount == 1 && (
+              <div class={styles.memberDiscount}>
+                <Image
+                  src={this.discountTeacher.avatar || iconTeacher}
+                  class={styles.discountAvatar}
+                />
+
+                <span class={styles.discountName}>
+                  {this.discountTeacher.username}老师的专属优惠~
+                </span>
+
+                <Image src={iconGift} class={styles.discountGift} />
+              </div>
+            )}
+
+            <div class={styles['system-list']}>
+              {this.memberList.map((item: any) => (
+                <div
+                  class={[styles['system-item'], item.status && styles.active]}
+                  onClick={() => {
+                    this.memberList.forEach((item: any) => {
+                      item.status = false
+                    })
+                    item.status = true
+                    this.selectMember = item
+                  }}
+                >
+                  {item.period === 'YEAR' && (
+                    <span class={[styles.bat]}>优惠</span>
+                  )}
+
+                  <div class={styles.discountItem}>
+                    {item.discount == 1 && <img src={iconDiscount} />}
+                  </div>
+                  <p class={styles.title}>{item.title}</p>
+                  <p class={styles.price}>
+                    <span>¥</span>
+                    {moneyFormat(this.calcSalePrice(item), '0,0[.]00')}
+                  </p>
+                  <del class={styles.originalPrice}>
+                    ¥{moneyFormat(item.originalPrice, '0,0[.]00')}
+                  </del>
+                </div>
+              ))}
+            </div>
+          </div>
+
+          <div class={[styles.intro]}>
+            <p>
+              酷乐秀会员可使用包括平台提供的所有训练乐谱,并专享“
+              <b>小酷Ai</b>
+              ”八大核心功能,孩子在家就能轻松完成乐器自主规范练习。
+            </p>
+          </div>
+
+          {this.functionList.length > 0 && (
+            <div class={styles.memberItem}>
+              <div class={styles.title}>会员功能</div>
+
+              <div class={styles.member_function}>
+                {this.functionList.map((item: any) => (
+                  <div class={styles.function_item}>
+                    <Icon name={item.icon} size={34} />
+                    <div class={styles.function_text} v-html={item.title}></div>
+                  </div>
+                ))}
+              </div>
+            </div>
+          )}
+
+          {/* <ColProtocol
+            v-model={this.agreeStatus}
+            showHeader
+            style={{ paddingLeft: 0, paddingRight: 0, marginBottom: '64px' }}
+          /> */}
+        </div>
+        <div class={styles.btnGroup}>
+          <div class={styles.priceSection}>
+            支付金额:
+            <div class={styles.price}>
+              <span class={styles.priceUnit}>¥</span>
+              <span class={styles.priceNum}>
+                {(this as any).$filters.moneyFormat(
+                  this.calcSalePrice(this.selectMember) || 0
+                )}
+              </span>
+            </div>
+            {this.selectMember?.discount == 1 && (
+              <div class={[styles.discountItem, styles.discountBuy]}>
+                <img src={iconDiscount} />
+              </div>
+            )}
+          </div>
+          <Button
+            color="linear-gradient(220deg, #DFA164 0%, #FAC87E 100%)"
+            round
+            class={styles.btn}
+            onClick={this.onSubmit}
+          >
+            {this.userInfo.isVip ? (
+              <>立即续费</>
+            ) : !this.userInfo.isVip && this.userInfo.membershipEndTime ? (
+              <>立即续费</>
+            ) : (
+              <>立即支付</>
+            )}
+          </Button>
+        </div>
+
+        <Popup
+          v-model:show={this.shareStatus}
+          style={{ background: 'transparent' }}
+        >
+          <ColShare
+            teacherId={this.userInfo.id}
+            shareUrl={this.shareUrl}
+            shareType="vip"
+            shareLength={2}
+          >
+            <div class={styles.shareVip}>
+              {this.shareDiscount === 1 && (
+                <div class={styles.tagDiscount}>专属优惠</div>
+              )}
+
+              <img class={styles.icon} src={iconMemberLogo} />
+              <div class={styles.info}>
+                <h4 class="van-multi-ellipsis--l2">小酷Ai会员</h4>
+                <p>海量曲谱、智能评测,专为器乐学习者量身打造</p>
+              </div>
+            </div>
+          </ColShare>
+        </Popup>
+      </div>
+    )
+  }
+})

+ 437 - 0
src/views/member-center/index.module copy.less

@@ -0,0 +1,437 @@
+.member-center {
+  background-color: #ffe5cc;
+  min-height: 100vh;
+  position: relative;
+
+  :global {
+    .van-nav-bar {
+      background-color: transparent;
+    }
+  }
+
+  .member_container {
+    padding: 10px 14px 0;
+
+    .title {
+      display: flex;
+      align-items: center;
+      font-size: 16px;
+      line-height: 28px;
+      font-weight: 500;
+      color: #333333;
+
+      &::before {
+        content: ' ';
+        width: 4px;
+        height: 17px;
+        background: #01c1b5;
+        display: inline-block;
+        margin-right: 7px;
+        border-radius: 8px;
+      }
+    }
+  }
+
+  .level {
+    width: 18px;
+    height: 16px;
+  }
+
+  .userMember {
+    background: url('./images/member_bg.png') no-repeat center #534754;
+    background-size: cover;
+    width: auto;
+    border-radius: 10px;
+    padding: 20px 12px 30px;
+
+    .userImgSection {
+      background-color: transparent;
+      margin-right: 12px;
+    }
+
+    .userImg {
+      padding: 2px;
+      border: 1px solid #feecd2;
+      border-radius: 50%;
+      vertical-align: middle;
+      overflow: hidden;
+
+      img {
+        width: 46px;
+        height: 46px;
+        border-radius: 50%;
+      }
+    }
+
+    .userInfo {
+      display: flex;
+      align-items: center;
+      color: #fff;
+      padding-bottom: 5px;
+
+      .name {
+        font-size: 18px;
+        padding-right: 5px;
+        max-width: 100px;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+      }
+
+      .phone {
+        font-size: 14px;
+      }
+    }
+
+    .timeRemaining {
+      margin-top: 0;
+      font-size: 14px;
+      color: #c0c0c0;
+
+      .remaining {
+        color: #f7b500;
+        padding: 0 5px;
+      }
+    }
+
+    .member_time {
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+    }
+  }
+
+  .intro {
+    background: url('./images/tip_bg.png') no-repeat center;
+    background-size: contain;
+    height: 142px;
+    font-size: 14px;
+    color: #bb6e3a;
+
+    p {
+      padding: 45px 25px 0;
+      text-align: justify;
+      line-height: 22px;
+    }
+  }
+
+  .memberContainer {
+    // height: calc(100vh - 196px);
+    // overflow-y: auto;
+    background-color: #fff;
+    border-radius: 18px 18px 0px 0px;
+    position: relative;
+    margin-top: -15px;
+    padding: 0 14px 75px;
+    z-index: 99;
+  }
+
+  .memberItem {
+    padding-top: 20px;
+
+    .title {
+      font-size: 16px;
+      color: #333333;
+      font-weight: 500;
+
+      span {
+        color: #f7b500;
+      }
+    }
+  }
+
+  .member_function {
+    display: flex;
+    justify-content: space-between;
+    flex-wrap: wrap;
+
+    .function_item__content {
+      height: 100%;
+    }
+
+    .function_item {
+      width: 80px;
+      padding: 12px 0;
+      margin-top: 8px;
+      border-radius: 8px;
+      overflow: hidden;
+      background-color: #faefe3;
+      text-align: center;
+    }
+
+    .function_text {
+      font-size: 12px;
+      color: #814014;
+      line-height: 16px;
+    }
+  }
+
+  .system-list::-webkit-scrollbar {
+    display: none;
+    /* Chrome Safari */
+  }
+
+  .system-list {
+    width: 100%;
+    overflow-x: auto;
+    overflow-y: hidden;
+    display: flex;
+    position: relative;
+    user-select: none;
+    box-sizing: content-box;
+    padding-top: 16px;
+    padding-bottom: 10px;
+    margin-bottom: 10px;
+  }
+
+  .system-item {
+    position: relative;
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    justify-content: center;
+    flex: 1 0 auto;
+    width: 96px;
+    min-height: 120px;
+    box-sizing: border-box;
+    background: #ffffff;
+    border-radius: 12px;
+    border: 1px solid #e5e5e5;
+    margin-left: 10px;
+
+    .bat {
+      position: absolute;
+      top: -1px;
+      left: -1px;
+      padding: 2px 5px 1px;
+      background: linear-gradient(90deg, #FF7878 0%, #FF4343 100%);
+      border-radius: 11px 10px 10px 0px;
+      font-size: 12px;
+      font-weight: 600;
+      color: #FFFFFF;
+      line-height: 17px;
+    }
+
+    &:first-child {
+      margin-left: 0;
+    }
+
+    .title {
+      font-size: 14px;
+      font-weight: 500;
+      color: #333333;
+      line-height: 20px;
+    }
+
+    .price {
+      color: #dc9362;
+      font-size: 25px;
+      line-height: 1.5;
+
+      span {
+        font-size: 16px;
+      }
+    }
+
+    .originalPrice {
+      color: #937059;
+      font-size: 13px;
+    }
+
+    &.active {
+      background: linear-gradient(215deg,
+          #ffe7c4 0%,
+          rgba(250, 211, 156, 0.21) 100%);
+      border: 1px solid #b1652e;
+      position: relative;
+
+      .title {
+        color: #814014;
+      }
+
+      .price {
+        color: #b1652e;
+      }
+
+      .originalPrice {
+        color: #937059;
+      }
+
+      &::before {
+        content: '\e728';
+        font: 14px/1 'vant-icon';
+        color: #fff;
+        background-color: #b1652e;
+        width: 27px;
+        height: 18px;
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        position: absolute;
+        top: -1px;
+        right: -1px;
+        border-radius: 0 12px 0 12px;
+      }
+
+      .bat {
+        background: linear-gradient(270deg, rgba(255, 255, 255, 0.33) 0%, rgba(254, 234, 205, 0.33) 100%);
+        border-radius: 11px 10px 10px 0px;
+        border: 1px solid rgba(177, 101, 46, 0.33);
+        border-left: 0;
+        border-top: 0;
+        color: #B1652E;
+      }
+    }
+  }
+
+  .btnGroup {
+    position: fixed;
+    bottom: 0;
+    left: 0;
+    right: 0;
+    z-index: 100;
+    background-color: #fff;
+    display: flex;
+    align-items: center;
+    padding: 12px 16px;
+    justify-content: space-between;
+    border-top: 1px solid #f0f0f0;
+
+    .btn {
+      padding: 0 22px;
+      color: #7a3104 !important;
+    }
+
+    .priceSection {
+      display: flex;
+      align-items: center;
+      font-size: 16px;
+      color: #1a1a1a;
+
+      .price {
+        font-size: 18px;
+        font-weight: bold;
+        color: #ff3535;
+
+        .priceUnit {
+          font-size: 14px;
+        }
+      }
+    }
+  }
+}
+
+.memberDiscount {
+  margin-top: 16px;
+  position: relative;
+  background: url('./images/discount_bg.png') no-repeat center;
+  background-size: contain;
+  display: flex;
+  align-items: center;
+  height: 44px;
+  font-size: 16px;
+  color: #ff7100;
+  line-height: 18px;
+
+  .discountAvatar {
+    margin-left: 15px;
+    width: 36px;
+    height: 36px;
+    border-radius: 50%;
+    overflow: hidden;
+    border: 1px solid #ffaf59;
+  }
+
+  .discountName {
+    padding-left: 30px;
+    max-width: 200px;
+    white-space: nowrap;
+    overflow: hidden;
+    text-overflow: ellipsis;
+  }
+
+  .discountGift {
+    position: absolute;
+    right: 26px;
+    top: 7px;
+    width: 29px;
+    height: 29px;
+  }
+}
+
+.discountItem {
+  height: 14px;
+  padding-bottom: 2px;
+
+  img {
+    height: 100%;
+  }
+}
+
+.discountBuy {
+  height: 18px;
+  padding-bottom: 0;
+  margin-left: 8px;
+}
+
+.shareBtn {
+  display: flex;
+  align-items: flex-start;
+  color: #666;
+  font-size: 14px;
+  line-height: 20px !important;
+
+  :global(.van-image) {
+    width: 18px;
+    height: 18px;
+    margin-right: 6px;
+  }
+}
+
+.shareVip {
+  position: relative;
+  margin-top: 50px;
+  display: flex;
+  flex: 1;
+  align-items: center;
+  padding: 11px 6px 11px;
+  background: #ffffff;
+  border-radius: 10px;
+
+  .icon {
+    width: 36px;
+    height: 36px;
+    border-radius: 10px;
+  }
+
+  .info {
+    margin-left: 6px;
+    flex: 1;
+    word-break: break-all;
+
+    >h4 {
+      color: var(--music-list-item-title-color);
+      font-size: 14px;
+      font-weight: 600;
+    }
+
+    >p {
+      color: var(--music-list-item-mate-color);
+      line-height: 17px;
+    }
+  }
+}
+
+.tagDiscount {
+  position: absolute;
+  top: -23px;
+  left: 15px;
+  padding: 0 10px;
+  height: 23px;
+  background: linear-gradient(180deg, #ffb635 0%, #ff4e18 100%);
+  border-radius: 8px 8px 0px 0px;
+  font-size: 14px;
+  font-weight: 600;
+  color: #ffffff;
+  line-height: 24px;
+}

+ 635 - 312
src/views/member-center/index.module.less

@@ -1,437 +1,760 @@
-.member-center {
-  background-color: #ffe5cc;
+.memberCenter {
   min-height: 100vh;
-  position: relative;
+  background: url('./new-images/icon-banner.png') no-repeat top center;
+  background-size: contain;
+  box-sizing: border-box;
 
   :global {
-    .van-nav-bar {
-      background-color: transparent;
+    .van-nav-bar__left .van-icon {
+      color: #000000;
     }
   }
 
-  .member_container {
-    padding: 10px 14px 0;
-
-    .title {
-      display: flex;
-      align-items: center;
-      font-size: 16px;
-      line-height: 28px;
-      font-weight: 500;
-      color: #333333;
-
-      &::before {
-        content: ' ';
-        width: 4px;
-        height: 17px;
-        background: #01c1b5;
-        display: inline-block;
-        margin-right: 7px;
-        border-radius: 8px;
-      }
-    }
-  }
-
-  .level {
-    width: 18px;
+  .shareBtn {
+    width: 16px;
     height: 16px;
   }
+}
 
-  .userMember {
-    background: url('./images/member_bg.png') no-repeat center #534754;
-    background-size: cover;
-    width: auto;
-    border-radius: 10px;
-    padding: 20px 12px 30px;
+.userSection {
+  position: absolute;
+  top: 10px;
+  left: 16px;
+  display: flex;
+  align-items: flex-start;
 
-    .userImgSection {
-      background-color: transparent;
-      margin-right: 12px;
-    }
+  .userImgSection {
+    position: relative;
+    width: 48px;
+    height: 48px;
+    margin-right: 13px;
+    flex-shrink: 0;
 
     .userImg {
-      padding: 2px;
-      border: 1px solid #feecd2;
+      width: 48px;
+      height: 48px;
       border-radius: 50%;
-      vertical-align: middle;
       overflow: hidden;
+      border: 2px solid #F2F6F7;
+    }
+
+    .showMemeber {
+      position: absolute;
+      bottom: 1px;
+      right: -3px;
+      width: 18px;
+      height: 18px;
 
-      img {
-        width: 46px;
-        height: 46px;
-        border-radius: 50%;
-      }
     }
 
-    .userInfo {
-      display: flex;
-      align-items: center;
-      color: #fff;
-      padding-bottom: 5px;
-
-      .name {
-        font-size: 18px;
-        padding-right: 5px;
-        max-width: 100px;
-        overflow: hidden;
-        text-overflow: ellipsis;
-        white-space: nowrap;
+    &.userVip {
+      .showMemeber {
+        background: url('./new-images/icon-vip-disabled.png') no-repeat center;
+        background-size: contain;
       }
 
-      .phone {
-        font-size: 14px;
+      &.isVip {
+        .userImg {
+          border: 2px solid #F0AF88;
+        }
+
+        .showMemeber {
+          background: url('./new-images/icon-vip.png') no-repeat center;
+          background-size: contain;
+        }
       }
     }
 
-    .timeRemaining {
-      margin-top: 0;
-      font-size: 14px;
-      color: #c0c0c0;
+    &.userSVip {
+      .showMemeber {
+        background: url('./new-images/icon-svip-disabled.png') no-repeat center;
+        background-size: contain;
+      }
+
+      &.isVip {
+        .userImg {
+          border: 2px solid #F0AF88;
+        }
 
-      .remaining {
-        color: #f7b500;
-        padding: 0 5px;
+        .showMemeber {
+          background: url('./new-images/icon-svip.png') no-repeat center;
+          background-size: contain;
+        }
       }
     }
+  }
 
-    .member_time {
+  .userInfo {
+    padding-top: 5px;
+    max-width: 185px;
+
+    .userName {
       display: flex;
       align-items: center;
-      justify-content: space-between;
+      padding-bottom: 4px;
     }
-  }
 
-  .intro {
-    background: url('./images/tip_bg.png') no-repeat center;
-    background-size: contain;
-    height: 142px;
-    font-size: 14px;
-    color: #bb6e3a;
+    .name {
+      font-weight: 500;
+      font-size: 18px;
+      color: #000000;
+      max-width: 90px;
+      overflow: hidden;
+      text-overflow: ellipsis;
+      white-space: nowrap;
+    }
+
+    .phone {
+      font-size: 13px;
+      color: #777777;
+    }
+
+    .member_time {
+      font-size: 12px;
+      color: #777777;
+      line-height: 17px;
 
-    p {
-      padding: 45px 25px 0;
-      text-align: justify;
-      line-height: 22px;
+      span {
+        color: #FF623A;
+        font-weight: bold;
+      }
     }
   }
+}
 
-  .memberContainer {
-    // height: calc(100vh - 196px);
-    // overflow-y: auto;
-    background-color: #fff;
-    border-radius: 18px 18px 0px 0px;
-    position: relative;
-    margin-top: -15px;
-    padding: 0 14px 75px;
-    z-index: 99;
+.memberContainer {
+  position: relative;
+  padding-top: 100px;
+
+  .showBrid {
+    position: absolute;
+    right: 0;
+    top: -17px;
+    display: inline-block;
+    width: 129px;
+    height: 144px;
+    background: url('./new-images/icon-banner-brid.png') no-repeat center;
+    background-size: contain;
   }
+}
 
-  .memberItem {
-    padding-top: 20px;
 
-    .title {
-      font-size: 16px;
-      color: #333333;
-      font-weight: 500;
+.shareVip {
+  position: relative;
+  margin-top: 50px;
+  display: flex;
+  flex: 1;
+  align-items: center;
+  padding: 11px 6px 11px;
+  background: #ffffff;
+  border-radius: 10px;
 
-      span {
-        color: #f7b500;
-      }
-    }
+  .icon {
+    width: 36px;
+    height: 36px;
+    border-radius: 10px;
   }
 
-  .member_function {
-    display: flex;
-    justify-content: space-between;
-    flex-wrap: wrap;
+  .info {
+    margin-left: 6px;
+    flex: 1;
+    word-break: break-all;
 
-    .function_item__content {
-      height: 100%;
+    >h4 {
+      color: var(--music-list-item-title-color);
+      font-size: 14px;
+      font-weight: 600;
     }
 
-    .function_item {
-      width: 80px;
-      padding: 12px 0;
-      margin-top: 8px;
-      border-radius: 8px;
-      overflow: hidden;
-      background-color: #faefe3;
-      text-align: center;
+    >p {
+      color: var(--music-list-item-mate-color);
+      line-height: 17px;
     }
+  }
+}
 
-    .function_text {
-      font-size: 12px;
-      color: #814014;
-      line-height: 16px;
-    }
+.tagDiscount {
+  position: absolute;
+  top: -23px;
+  left: 15px;
+  padding: 0 10px;
+  height: 23px;
+  background: linear-gradient(180deg, #ffb635 0%, #ff4e18 100%);
+  border-radius: 8px 8px 0px 0px;
+  font-size: 14px;
+  font-weight: 600;
+  color: #ffffff;
+  line-height: 24px;
+}
+
+
+.memberSection {
+  position: relative;
+  z-index: 1;
+  background: linear-gradient(179deg, #FFFFFF 0%, #FFFFFF 45%, #BEF5D8 70%, #CDF7CB 100%);
+  border-radius: 16px 16px 0px 0px;
+  padding-bottom: 10px;
+}
+
+.member_tabs {
+  display: flex;
+  align-items: center;
+  justify-content: space-around;
+
+  .member_tab {
+    flex: 1;
+    text-align: center;
+    padding: 12px 0;
+    cursor: pointer;
+    opacity: 0.3;
   }
 
-  .system-list::-webkit-scrollbar {
-    display: none;
-    /* Chrome Safari */
+  .member_tab_active {
+    opacity: 1;
   }
 
-  .system-list {
-    width: 100%;
-    overflow-x: auto;
-    overflow-y: hidden;
-    display: flex;
-    position: relative;
-    user-select: none;
-    box-sizing: content-box;
-    padding-top: 16px;
-    padding-bottom: 10px;
-    margin-bottom: 10px;
+  .icon_member {
+    display: inline-block;
+    width: 24px;
+    height: 24px;
+    margin-right: 6px;
   }
 
-  .system-item {
+  .icon_text {
     position: relative;
+    margin-top: 3px;
+  }
+
+  .bottom_line {
+    position: absolute;
+    left: 0;
+    right: 0;
+    bottom: -3px;
+    z-index: -1;
+    height: 7px;
+    width: 100%;
+    display: inline-block;
+  }
+
+  .top_tab {
     display: flex;
-    flex-direction: column;
     align-items: center;
     justify-content: center;
-    flex: 1 0 auto;
-    width: 96px;
-    min-height: 120px;
-    box-sizing: border-box;
-    background: #ffffff;
-    border-radius: 12px;
-    border: 1px solid #e5e5e5;
-    margin-left: 10px;
+    padding-bottom: 5px;
+  }
 
-    .bat {
-      position: absolute;
-      top: -1px;
-      left: -1px;
-      padding: 2px 5px 1px;
-      background: linear-gradient(90deg, #FF7878 0%, #FF4343 100%);
-      border-radius: 11px 10px 10px 0px;
-      font-size: 12px;
-      font-weight: 600;
-      color: #FFFFFF;
-      line-height: 17px;
+  .vip_member_tip {
+    width: 71px;
+    height: 14px;
+    background: url('./new-images/vip-bottom-tip.png') no-repeat center;
+    background-size: contain;
+    display: inline-block;
+  }
+
+  .top_tab_vip {
+    .icon_member {
+      background: url('./new-images/icon-vip.png') no-repeat center;
+      background-size: contain;
     }
 
-    &:first-child {
-      margin-left: 0;
+    .icon_text {
+      background: url('./new-images/icon-vip-text.png') no-repeat center;
+      background-size: contain;
+      width: 59px;
+      height: 15px;
     }
 
-    .title {
-      font-size: 14px;
-      font-weight: 500;
-      color: #333333;
-      line-height: 20px;
+    .bottom_line {
+      background: url('./new-images/icon-vip-bottom-line.png') no-repeat center;
+      background-size: contain;
     }
+  }
 
-    .price {
-      color: #dc9362;
-      font-size: 25px;
-      line-height: 1.5;
+  .svip_member_tip {
+    width: 122px;
+    height: 14px;
+    background: url('./new-images/svip-bottom-tip.png') no-repeat center;
+    background-size: contain;
+    display: inline-block;
+  }
 
-      span {
-        font-size: 16px;
-      }
+  .top_tab_svip {
+    .icon_member {
+      background: url('./new-images/icon-svip.png') no-repeat center;
+      background-size: contain;
     }
 
-    .originalPrice {
-      color: #937059;
-      font-size: 13px;
+    .icon_text {
+      background: url('./new-images/icon-svip-text.png') no-repeat center;
+      background-size: contain;
+      width: 68px;
+      height: 15px;
     }
 
-    &.active {
-      background: linear-gradient(215deg,
-          #ffe7c4 0%,
-          rgba(250, 211, 156, 0.21) 100%);
-      border: 1px solid #b1652e;
-      position: relative;
-
-      .title {
-        color: #814014;
-      }
-
-      .price {
-        color: #b1652e;
-      }
-
-      .originalPrice {
-        color: #937059;
-      }
-
-      &::before {
-        content: '\e728';
-        font: 14px/1 'vant-icon';
-        color: #fff;
-        background-color: #b1652e;
-        width: 27px;
-        height: 18px;
-        display: flex;
-        align-items: center;
-        justify-content: center;
-        position: absolute;
-        top: -1px;
-        right: -1px;
-        border-radius: 0 12px 0 12px;
-      }
-
-      .bat {
-        background: linear-gradient(270deg, rgba(255, 255, 255, 0.33) 0%, rgba(254, 234, 205, 0.33) 100%);
-        border-radius: 11px 10px 10px 0px;
-        border: 1px solid rgba(177, 101, 46, 0.33);
-        border-left: 0;
-        border-top: 0;
-        color: #B1652E;
-      }
+    .bottom_line {
+      background: url('./new-images/icon-svip-bottom-line.png') no-repeat center;
+      background-size: contain;
     }
   }
 
-  .btnGroup {
-    position: fixed;
-    bottom: 0;
-    left: 0;
-    right: 0;
-    z-index: 100;
-    background-color: #fff;
+
+  .member_tab_single {
     display: flex;
     align-items: center;
-    padding: 12px 16px;
     justify-content: space-between;
-    border-top: 1px solid #f0f0f0;
-
-    .btn {
-      padding: 0 22px;
-      color: #7a3104 !important;
-    }
-
-    .priceSection {
-      display: flex;
-      align-items: center;
-      font-size: 16px;
-      color: #1a1a1a;
-
-      .price {
-        font-size: 18px;
-        font-weight: bold;
-        color: #ff3535;
-
-        .priceUnit {
-          font-size: 14px;
-        }
-      }
-    }
+    padding: 11px 16px 0;
   }
 }
 
 .memberDiscount {
-  margin-top: 16px;
+  margin: 10px 16px 6px;
   position: relative;
-  background: url('./images/discount_bg.png') no-repeat center;
+  background: url('./new-images/icon-discount-bg.png') no-repeat center;
   background-size: contain;
   display: flex;
   align-items: center;
-  height: 44px;
-  font-size: 16px;
-  color: #ff7100;
+  height: 40px;
+  font-size: 14px;
+  color: #6B4429;
   line-height: 18px;
 
   .discountAvatar {
-    margin-left: 15px;
-    width: 36px;
-    height: 36px;
+    margin-left: 12px;
+    width: 34px;
+    height: 34px;
     border-radius: 50%;
     overflow: hidden;
     border: 1px solid #ffaf59;
   }
 
   .discountName {
-    padding-left: 30px;
-    max-width: 200px;
+    margin-left: 30px;
+    width: 200px;
     white-space: nowrap;
     overflow: hidden;
     text-overflow: ellipsis;
+    background: transparent;
+    font-size: 14px;
+    color: #6B4429;
+    padding-top: 1px;
+    line-height: 1.2;
+
+    span {
+      color: #FF491A;
+      font-weight: 500;
+    }
   }
 
   .discountGift {
     position: absolute;
-    right: 26px;
-    top: 7px;
-    width: 29px;
-    height: 29px;
+    right: 11px;
+    top: 0;
+    width: 40px;
+    height: 40px;
   }
 }
 
-.discountItem {
-  height: 14px;
-  padding-bottom: 2px;
+.btnGroup {
+  padding: 18px 15px 23px;
+  background-color: #fff;
 
-  img {
-    height: 100%;
+
+  .btn {
+    border-radius: 12px;
+    font-weight: bold;
+    font-size: 18px;
+    color: #662610 !important;
+    line-height: 24px;
   }
+
+  .btnDisabled {
+    opacity: .4;
+  }
+}
+
+
+.system_list_section {
+  // margin: 0 16px;
 }
 
-.discountBuy {
-  height: 18px;
-  padding-bottom: 0;
-  margin-left: 8px;
+.system-list::-webkit-scrollbar {
+  display: none;
+  /* Chrome Safari */
 }
 
-.shareBtn {
+.system-list {
+  width: calc(100% - 16px);
+  overflow-x: auto;
+  overflow-y: hidden;
   display: flex;
-  align-items: flex-start;
-  color: #666;
-  font-size: 14px;
-  line-height: 20px !important;
+  position: relative;
+  user-select: none;
+  box-sizing: content-box;
+  padding-top: 15px;
+  padding-bottom: 2px;
+  padding-right: 16px;
 
-  :global(.van-image) {
-    width: 18px;
-    height: 18px;
-    margin-right: 6px;
+
+  &.list_two {
+    .system-item {
+      width: 141px;
+
+      &.active {
+        width: 191px;
+      }
+    }
   }
 }
 
-.shareVip {
+.system-item {
   position: relative;
-  margin-top: 50px;
   display: flex;
-  flex: 1;
+  flex-direction: column;
   align-items: center;
-  padding: 11px 6px 11px;
+  justify-content: flex-start;
+  flex: 1 0 auto;
+  width: 96px;
+  min-height: 120px;
+  // overflow: hidden;
+  box-sizing: border-box;
   background: #ffffff;
-  border-radius: 10px;
+  border-radius: 8px;
+  border: 1px solid #E7E7E7;
+  margin-left: 10px;
 
-  .icon {
-    width: 36px;
-    height: 36px;
-    border-radius: 10px;
+  &:first-child {
+    margin-left: 16px;
   }
 
-  .info {
-    margin-left: 6px;
-    flex: 1;
-    word-break: break-all;
+  // &:last-child {
+  //   margin-right: 16px;
+  // }
 
-    >h4 {
-      color: var(--music-list-item-title-color);
-      font-size: 14px;
-      font-weight: 600;
+
+  .discountTag {
+    position: absolute;
+    top: 13px;
+    left: 0;
+    right: 0;
+    width: 100%;
+    // background: linear-gradient(180deg, #FF491A 0%, #FF9F7E 100%);
+    // color: #FFFFFF;
+    display: inline-block;
+    width: 48px;
+    height: 16px;
+    background: url('./new-images/icon_discount-text.png') no-repeat center;
+    background-size: contain;
+    // margin-top: 1px;
+    margin: 0 auto;
+  }
+
+  .iconPermanent {
+    position: absolute;
+    left: -1px;
+    top: -9px;
+    width: 77px;
+    height: 20px;
+    background: url('./new-images/icon-permanent1.png') no-repeat center;
+    background-size: cover;
+  }
+
+  .s_title {
+    position: relative;
+    font-weight: 500;
+    font-size: 13px;
+    color: #333333;
+    line-height: 18px;
+    padding-top: 30px;
+    width: 100%;
+    text-align: center;
+  }
+
+  .price {
+    font-family: DINAlternate-Bold, DINAlternate;
+    font-weight: bold;
+    font-size: 28px;
+    color: #333333;
+    padding: 3px 0 6px;
+
+    span {
+      font-size: 16px;
+      vertical-align: middle;
     }
+  }
 
-    >p {
-      color: var(--music-list-item-mate-color);
-      line-height: 17px;
+  .originalPrice {
+    color: #999999;
+    font-size: 12px;
+    line-height: 16px;
+
+    &.originalPriceHide {
+      opacity: 0;
+    }
+  }
+
+  .extraTip {
+    position: absolute;
+    bottom: 0;
+    left: 0;
+    right: 0;
+    width: 100%;
+    box-sizing: border-box;
+    background: #FFF5E0;
+    line-height: 21px;
+    font-weight: 500;
+    font-size: 12px;
+    color: #84520F;
+    text-align: center;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+    overflow: hidden;
+    padding: 2px 8px 1px;
+    border-radius: 0 0 6px 6px;
+  }
+
+  &.active {
+    border: 2px solid #0ED8B0;
+    background: linear-gradient(51deg, #E3F9F2 0%, #BCF8E5 100%);
+    width: 130px;
+
+    .iconPermanent {
+      left: -2px;
+    }
+
+    .extraTip {
+      background: #0ED8B0;
+      color: #FFFFFF;
+      font-weight: 500;
     }
   }
 }
 
-.tagDiscount {
-  position: absolute;
-  top: -23px;
-  left: 15px;
-  padding: 0 10px;
-  height: 23px;
-  background: linear-gradient(180deg, #ffb635 0%, #ff4e18 100%);
-  border-radius: 8px 8px 0px 0px;
-  font-size: 14px;
-  font-weight: 600;
-  color: #ffffff;
-  line-height: 24px;
-}
+.list_one {
+  padding-top: 10px;
+
+  .system-item {
+    flex-direction: row;
+    justify-content: space-between;
+    padding: 0 20px;
+    width: calc(100% - 32px);
+    margin: 0 0 0 16px;
+    // margin: 0;
+    min-height: 81px;
+    border: 2px solid #0ED8B0;
+    background: linear-gradient(51deg, #E3F9F2 0%, #BCF8E5 100%);
+
+    .iconPermanent {
+      left: -2px;
+      top: -2px;
+      background: url('./new-images/icon-permanent.png') no-repeat center;
+      background-size: cover;
+      width: 61px;
+      height: 16px;
+    }
+
+    .discountTag {
+      position: absolute;
+      right: -2px;
+      top: -2px;
+      left: auto;
+      background: url('./new-images/icon_discount2.png') no-repeat center;
+      background-size: contain;
+      width: 48px;
+      height: 16px;
+      padding: 0;
+      margin: 0;
+      border-radius: 0;
+    }
+
+
+    .itemBg {
+      position: absolute;
+      right: 71px;
+      top: 0;
+      bottom: 0;
+      width: 100px;
+      background: url('./new-images/icon-svip-big-icon.png') no-repeat center;
+      background-size: contain;
+    }
+  }
+
+  .priceS {
+    position: relative;
+    z-index: 1;
+    display: flex;
+    align-items: center;
+
+    .price {
+      color: #03A385;
+      padding-bottom: 0;
+      padding-top: 0;
+    }
+
+    .s_title {
+      padding-top: 4px;
+      padding-left: 10px;
+      font-weight: 500;
+      font-size: 15px;
+      color: #333333;
+      line-height: 21px;
+    }
+  }
+
+  .oneMaxNum {
+    margin-left: 4px;
+    display: inline-block;
+    background: linear-gradient(90deg, #BEFCE8 0%, #BFFAE8 100%);
+    border-radius: 2px;
+    font-size: 12px;
+    color: #03A385;
+    margin-top: 2px;
+    padding: 1px 2px;
+  }
+
+  .oneMaxNumPrice {
+    text-decoration: line-through;
+  }
+
+  .oneBtn {
+    position: relative;
+    z-index: 1;
+    width: 71px;
+    height: 30px;
+    background: url('./new-images/btn-svip.png') no-repeat center;
+    background-size: contain;
+    cursor: pointer;
+
+    &.onBtnRenew {
+      background: url('./new-images/btn-svip-review.png') no-repeat center;
+      background-size: contain;
+    }
+
+    &.onBtnDisbled {
+      opacity: .4;
+    }
+  }
+}
+
+.system_list_vip {
+  .system-item {
+    &.active {
+      border: 2px solid #FFDB66;
+      background: linear-gradient(90deg, #FFF7C4 0%, #FEF098 100%);
+      width: 130px;
+
+      .extraTip {
+        background-color: #FFDB66;
+      }
+    }
+  }
+
+  &.list_two {
+    .system-item {
+      width: 141px;
+
+      &.active {
+        width: 191px;
+      }
+    }
+  }
+
+  &.list_one {
+    .system-item {
+      background: linear-gradient(90deg, #FFF7C4 0%, #FEF098 100%);
+      border: 2px solid #FFDB66;
+
+
+      .itemBg {
+        background: url('./new-images/icon-vip-big-icon.png') no-repeat center;
+        background-size: contain;
+      }
+    }
+
+    .priceS {
+      .price {
+        color: #FF7452;
+      }
+    }
+
+    .oneMaxNum {
+      background: linear-gradient(90deg, #FEDA66 0%, #FEDA66 100%);
+      color: #FF7452;
+      text-decoration: line-through;
+    }
+
+    .oneBtn {
+      background: url('./new-images/btn-vip.png') no-repeat center;
+      background-size: contain;
+      cursor: pointer;
+
+      &.onBtnRenew {
+        background: url('./new-images/btn-vip-review.png') no-repeat center;
+        background-size: contain;
+      }
+    }
+  }
+}
+
+// 弹窗样式
+.dialogContainer {
+  width: 287px;
+  box-sizing: border-box;
+  background: #FFFFFF;
+  border-radius: 12px;
+  padding: 16px 24px 22px;
+  text-align: center;
+
+  .dialogTitle {
+    font-weight: 500;
+    font-size: 18px;
+    color: #333333;
+    line-height: 25px;
+  }
+
+  .dialogContent {
+    padding: 16px 0 21px;
+    font-size: 15px;
+    color: #777777;
+    line-height: 26px;
+  }
+
+  .dialogBtnGroup {
+    padding: 0 16px;
+
+    &.orderGroup {
+      display: flex;
+      align-items: center;
+      padding: 0;
+    }
+
+    :global {
+      .van-button {
+        font-weight: 500;
+        font-size: 16px;
+      }
+    }
+  }
+
+  .dialogBtn {
+    margin-left: 12px;
+    color: #FFFFFF;
+    line-height: 22px;
+  }
+}
+
+.discountTips {
+  background: linear-gradient(203deg, rgba(254, 237, 197, 0.5) 0%, rgba(255, 198, 179, 0.5) 100%);
+  border-radius: 6px;
+  padding: 6px 3px 6px 8px;
+  // font-weight: 500;
+  font-size: 12px;
+  line-height: 17px;
+  color: #6B4429;
+  margin-top: 12px;
+  margin-left: 16px;
+  margin-right: 16px;
+
+  span {
+    color: #FF491A;
+  }
+}

Dosya farkı çok büyük olduğundan ihmal edildi
+ 685 - 328
src/views/member-center/index.tsx


BIN
src/views/member-center/new-images/btn-svip-review.png


BIN
src/views/member-center/new-images/btn-svip.png


BIN
src/views/member-center/new-images/btn-vip-review.png


BIN
src/views/member-center/new-images/btn-vip.png


BIN
src/views/member-center/new-images/icon-banner-brid.png


BIN
src/views/member-center/new-images/icon-banner.png


BIN
src/views/member-center/new-images/icon-discount-bg.png


BIN
src/views/member-center/new-images/icon-discount-gift.png


BIN
src/views/member-center/new-images/icon-equity-bg.png


BIN
src/views/member-center/new-images/icon-permanent.png


BIN
src/views/member-center/new-images/icon-permanent1.png


BIN
src/views/member-center/new-images/icon-share.png


BIN
src/views/member-center/new-images/icon-svip-big-icon.png


BIN
src/views/member-center/new-images/icon-svip-bottom-line.png


BIN
src/views/member-center/new-images/icon-svip-disabled.png


BIN
src/views/member-center/new-images/icon-svip-text.png


BIN
src/views/member-center/new-images/icon-svip.png


BIN
src/views/member-center/new-images/icon-title-1.png


BIN
src/views/member-center/new-images/icon-title-2.png


BIN
src/views/member-center/new-images/icon-title-3.png


BIN
src/views/member-center/new-images/icon-vip-big-icon.png


BIN
src/views/member-center/new-images/icon-vip-bottom-line.png


BIN
src/views/member-center/new-images/icon-vip-disabled.png


BIN
src/views/member-center/new-images/icon-vip-text.png


BIN
src/views/member-center/new-images/icon-vip.png


BIN
src/views/member-center/new-images/icon_discount-round.png


BIN
src/views/member-center/new-images/icon_discount-text.png


BIN
src/views/member-center/new-images/icon_discount.png


BIN
src/views/member-center/new-images/icon_discount2.png


BIN
src/views/member-center/new-images/svip-bottom-tip.png


BIN
src/views/member-center/new-images/svip-fun-1.png


BIN
src/views/member-center/new-images/svip-fun-2.png


BIN
src/views/member-center/new-images/svip-fun-3.png


BIN
src/views/member-center/new-images/svip-fun-4.png


BIN
src/views/member-center/new-images/svip-question-bg.png


BIN
src/views/member-center/new-images/vip-bottom-tip.png


BIN
src/views/member-center/new-images/vip-fun-1.png


BIN
src/views/member-center/new-images/vip-fun-2.png


BIN
src/views/member-center/new-images/vip-fun-3.png


BIN
src/views/member-center/new-images/vip-question-bg.png


+ 27 - 24
src/views/music/album-detail/index.tsx

@@ -269,7 +269,7 @@ export default defineComponent({
     }
 
     const buyVip = computed(() => {
-      const album = albumDetail.value?.musicPaymentTypes
+      const album = albumDetail.value?.paymentType
       return album && album.includes('VIP')
     })
 
@@ -456,9 +456,11 @@ export default defineComponent({
                 <div
                   class={[
                     'btnGroup',
-                    buyVip.value && !state.user.data.isVip && 'btnMore'
+                    buyVip.value &&
+                      !(state.user.data.userVip?.vipType !== 'NOT_VIP') &&
+                      'btnMore'
                   ]}
-                  style={{ paddingTop: '12px' }}
+                  style={{ padding: '0' }}
                 >
                   <Button
                     block
@@ -469,27 +471,28 @@ export default defineComponent({
                   >
                     购买专辑
                   </Button>
-                  {buyVip.value && !state.user.data.isVip && (
-                    <Button
-                      block
-                      round
-                      type="primary"
-                      style={{ fontSize: '16px' }}
-                      onClick={() => {
-                        router.push({
-                          path: '/memberCenter',
-                          query: {
-                            ...route.query
-                          }
-                        })
-                      }}
-                    >
-                      {studentActivityId.value > 0 && (
-                        <div class={[styles.buttonDiscount]}>专属优惠</div>
-                      )}
-                      开通会员
-                    </Button>
-                  )}
+                  {buyVip.value &&
+                    !(state.user.data.userVip?.vipType !== 'NOT_VIP') && (
+                      <Button
+                        block
+                        round
+                        type="primary"
+                        style={{ fontSize: '16px' }}
+                        onClick={() => {
+                          router.push({
+                            path: '/memberCenter',
+                            query: {
+                              ...route.query
+                            }
+                          })
+                        }}
+                      >
+                        {studentActivityId.value > 0 && (
+                          <div class={[styles.buttonDiscount]}>专属优惠</div>
+                        )}
+                        开通会员
+                      </Button>
+                    )}
                 </div>
               </ColSticky>
             )}

+ 44 - 1
src/views/order-detail/index.module.less

@@ -72,6 +72,7 @@
     :global {
       .van-button {
         padding: 0 18px;
+        flex-shrink: 0;
       }
     }
 
@@ -83,6 +84,13 @@
       color: #999999;
       line-height: 20px;
 
+      .goodsNum {
+        font-size: 12px;
+        color: #777777;
+        padding-right: 6px;
+        font-weight: 400;
+      }
+
       .price {
         display: inline-block;
         font-size: 28px;
@@ -111,4 +119,39 @@
 .qrcodePopup {
   width: 90%;
   overflow: initial;
-}
+}
+
+// 弹窗样式
+.dialogContainer {
+  width: 287px;
+  box-sizing: border-box;
+  background: #FFFFFF;
+  border-radius: 12px;
+  padding: 16px 24px 22px;
+  text-align: center;
+
+  .dialogTitle {
+    font-weight: 500;
+    font-size: 18px;
+    color: #333333;
+    line-height: 25px;
+  }
+
+  .dialogContent {
+    padding: 16px 0 21px;
+    font-size: 15px;
+    color: #777777;
+    line-height: 26px;
+  }
+
+  .dialogBtnGroup {
+    padding: 0 16px;
+  }
+
+  .dialogBtn {
+    font-weight: 500;
+    font-size: 16px;
+    color: #FFFFFF;
+    line-height: 22px;
+  }
+}

+ 111 - 25
src/views/order-detail/index.tsx

@@ -18,7 +18,7 @@ import qs from 'query-string'
 import Payment from './payment'
 import UrlPayment from '../adapay/payment'
 import ColHeader from '@/components/col-header'
-import { state } from '@/state'
+import { setLogin, state } from '@/state'
 import {
   beforeSubmit,
   orderInfos,
@@ -47,6 +47,10 @@ export default defineComponent({
     const query = this.$route.query
     return {
       loading: false, // 是否加载中,为了处理0元订单()
+      dialogVisiable: false,
+      dialogContent: '',
+      dialogBtnText: '确定',
+      dialogType: 'back' as 'back' | 'refresh',
       orderType: query.orderType as string,
       recomUserId: query.recomUserId, // 推荐人id
       activityId: query.activityId, // 活动编号
@@ -57,6 +61,7 @@ export default defineComponent({
       orderAmount: 0, // 订单金额,用于使用优惠券,余额,优惠等
       orderPrice: 0, // 支付金额,最后支付金额
       dataLoading: true,
+      disabledCoupon: false, // 是否禁用优惠券
       exists: false, // 是否签署过用户注册协议
       bottomHeight: 0,
       paymentVendor: '', //支付厂商
@@ -84,6 +89,18 @@ export default defineComponent({
       // 商品列表
       const orderObject = orderStatus.orderObject
       return orderObject.orderList || []
+    },
+    goodsNum() {
+      const orderList = orderStatus.orderObject.orderList || []
+      let num = 0
+      orderList.forEach((item: any) => {
+        if (item.num) {
+          num += item.num
+        } else {
+          num += 1
+        }
+      })
+      return num
     }
   },
   async mounted() {
@@ -124,6 +141,8 @@ export default defineComponent({
 
     this.orderAmount = orderStatus.orderObject.actualPrice || 0
     this.orderPrice = orderStatus.orderObject.actualPrice || 0
+
+    this.disabledCoupon = orderStatus.orderObject.orderNo ? true : false
     this.dataLoading = false
     // 0元支付特别处理
     if (this.orderPrice === 0 && orderStatus.orderObject.orderType) {
@@ -139,14 +158,10 @@ export default defineComponent({
     })
 
     if (!orderStatus.orderObject.orderType) {
-      Dialog.alert({
-        title: '提示',
-        message: '商品信息已更新,请返回后重新购买',
-        confirmButtonText: '确定',
-        confirmButtonColor: '#2dc7aa'
-      }).then(() => {
-        this.$router.back()
-      })
+      this.dialogVisiable = true
+      this.dialogContent = '产品信息已更新,请重新选择'
+      this.dialogBtnText = '确定'
+      this.dialogType = 'back'
       return
     }
   },
@@ -264,14 +279,12 @@ export default defineComponent({
             }
           }
         }
-
         return
       }
 
       // 正常支付
       try {
         const orderObject = orderStatus.orderObject
-
         if (this.paymentVersion === 'V1') {
           const url =
             state.platformType === 'TEACHER'
@@ -290,6 +303,13 @@ export default defineComponent({
             }
           })
           const result = res.data || {}
+          if (res.code === 998 || res.code === 999) {
+            this.dialogVisiable = true
+            this.dialogContent = res.msg
+            this.dialogBtnText = '刷新'
+            this.dialogType = 'back'
+            return
+          }
           // 支付成功
           if (result.status == 'PAID') {
             this.$router.replace({
@@ -323,15 +343,11 @@ export default defineComponent({
           })
           const result = res.data || {}
           // 支付成功
-          if (res.code === 999) {
-            Dialog.alert({
-              title: '提示',
-              message: '商品信息已更新,请返回后重新购买',
-              confirmButtonText: '确定',
-              confirmButtonColor: '#2dc7aa'
-            }).then(() => {
-              this.$router.back()
-            })
+          if (res.code === 999 || res.code === 998) {
+            this.dialogVisiable = true
+            this.dialogContent = res.msg
+            this.dialogBtnText = '确定'
+            this.dialogType = 'back'
             return
           }
           if (result.status == 'PAID') {
@@ -362,6 +378,24 @@ export default defineComponent({
         }
       }
     },
+    async onDialogConfirm() {
+      this.dialogVisiable = false
+      if (this.dialogType === 'back') {
+        this.$router.back()
+      } else if (this.dialogType === 'refresh') {
+        // 更新会员天数
+        const userInfo = await request.get(
+          state.platformType === 'TEACHER'
+            ? '/api-teacher/teacher/queryUserInfo'
+            : '/api-student/student/queryUserInfo'
+        )
+        setLogin(userInfo.data)
+        const vipEndDays = userInfo.data.userVip.vipEndDays || 0
+        orderStatus.orderObject.orderList.forEach((item: any) => {
+          item.vipEndDays = vipEndDays
+        })
+      }
+    },
     onBackOut() {
       // 关闭订单后需要重置数据
       resestState()
@@ -377,12 +411,12 @@ export default defineComponent({
         (Number(this.orderAmount) - Number(discountCount)).toFixed(2)
       )
       this.orderPrice = lastAmount >= 0 ? lastAmount : 0
-
       // 设置优惠券编号
       const couponIds = (item || []).map((item: any) => {
         return item.couponIssueId
       })
       orderStatus.orderObject.couponId = couponIds.join(',') || ''
+      orderStatus.orderObject.couponDiscountPrice = discountCount
     },
     onConfirm(val: any) {
       const config: any = this.orderInfo.paymentConfig || {}
@@ -456,6 +490,9 @@ export default defineComponent({
       }, 5000)
     }
   },
+  beforeUnmount() {
+    resestState()
+  },
   render() {
     return (
       <div
@@ -475,8 +512,33 @@ export default defineComponent({
                 return <OrderLive item={item} />
               } else if (item.orderType === 'PRACTICE') {
                 return <OrderPractice item={item} />
-              } else if (item.orderType === 'VIP') {
-                return <OrderVip item={item} />
+              } else if (
+                item.orderType === 'VIP' ||
+                item.orderType === 'SVIP'
+              ) {
+                return (
+                  <OrderVip
+                    item={item}
+                    disabled={this.disabledCoupon}
+                    onPriceChange={(price: number) => {
+                      console.log(
+                        price,
+                        this.orderAmount,
+                        orderStatus.orderObject.couponDiscountPrice,
+                        'orderStatus.orderObject.couponDiscountPrice'
+                      )
+                      // 重置金额
+                      this.orderAmount = Number(price)
+                      const lastAmount = Number(
+                        (
+                          Number(this.orderAmount) -
+                          Number(orderStatus.orderObject.couponDiscountPrice)
+                        ).toFixed(2)
+                      )
+                      this.orderPrice = lastAmount >= 0 ? lastAmount : 0
+                    }}
+                  />
+                )
               } else if (item.orderType === 'MUSIC') {
                 return <OrderMusic item={item} />
               } else if (item.orderType === 'PIANO_ROOM') {
@@ -497,7 +559,7 @@ export default defineComponent({
                 orderType={this.orderType}
                 orderAmount={this.orderAmount}
                 onCouponSelect={this.onCouponSelect}
-                disabled={orderStatus.orderObject.orderNo ? true : false}
+                disabled={this.disabledCoupon}
               />
             )}
 
@@ -519,7 +581,8 @@ export default defineComponent({
 
               <div class={styles.btnGroup}>
                 <div class={styles.priceSection}>
-                  支付金额:
+                  <span class={styles.goodsNum}>共{this.goodsNum || 1}件</span>
+                  合计:
                   <div class={styles.price}>
                     <span class={styles.priceUnit}>¥</span>
                     <span class={styles.priceNum}>
@@ -596,6 +659,29 @@ export default defineComponent({
             // orderType={orderType.value}
           />
         </Popup>
+
+        <Popup
+          v-model:show={this.dialogVisiable}
+          style={{ background: 'transparent' }}
+          closeOnClickOverlay={false}
+        >
+          <div class={styles.dialogContainer}>
+            <div class={styles.dialogTitle}>提示</div>
+            <div class={styles.dialogContent}>{this.dialogContent}</div>
+
+            <div class={styles.dialogBtnGroup}>
+              <Button
+                round
+                type="primary"
+                block
+                class={styles.dialogBtn}
+                onClick={this.onDialogConfirm}
+              >
+                {this.dialogBtnText}
+              </Button>
+            </div>
+          </div>
+        </Popup>
       </div>
     )
   }

+ 2 - 0
src/views/order-detail/order-music/index.module.less

@@ -71,6 +71,8 @@
     padding-top: 7px;
     display: flex;
     align-items: center;
+    flex-wrap: wrap;
+    gap: 5px;
     --van-tag-default-color: #FFEAF2;
     --van-tag-text-color: #FE2451;
 

+ 59 - 9
src/views/order-detail/order-vip/index.module.less

@@ -9,6 +9,9 @@
 
 .titleClass {
   padding-left: 15px;
+  display: flex;
+  flex-direction: column;
+  justify-content: space-between;
 }
 
 .title {
@@ -37,9 +40,13 @@
 .timerTitle {
   display: flex;
   align-items: center;
-  font-size: 14px;
-  font-weight: 500;
-  color: #333333;
+  // font-size: 14px;
+  // font-weight: 500;
+  // color: #333333;
+
+  color: var(--van-cell-text-color) !important;
+  font-size: var(--van-cell-font-size) !important;
+  line-height: var(--van-cell-line-height) !important;
   line-height: 20px;
   padding-right: 12px;
 }
@@ -56,11 +63,11 @@
   align-items: center;
   justify-content: space-between;
 
-  span {
-    font-size: 16px;
-    font-weight: 600;
-    color: #131415;
-  }
+  // span {
+  //   font-size: 16px;
+  //   font-weight: 600;
+  //   color: #131415;
+  // }
 }
 
 .cellGroup {
@@ -74,4 +81,47 @@
       padding: 15px;
     }
   }
-}
+}
+
+.discountTips {
+  background: linear-gradient(203deg, rgba(254, 237, 197, 0.5) 0%, rgba(255, 198, 179, 0.5) 100%);
+  border-radius: 6px;
+  padding: 6px 3px 6px 8px;
+  font-weight: 500;
+  font-size: 12px;
+  line-height: 17px;
+  color: #6B4429;
+  margin-bottom: 12px;
+
+  span {
+    color: #FF491A;
+  }
+}
+
+.addNum {
+  display: flex;
+  justify-content: flex-end;
+  --van-stepper-input-height: 22px;
+  --van-stepper-button-round-theme-color: #2DC7AA;
+
+  :global {
+    .van-stepper--round .van-stepper__minus {
+      // width: 22px;
+      // height: 22px;
+      border-color: #F7F8F9;
+      background-color: #F7F8F9;
+      color: #333333;
+    }
+
+    .van-stepper--round .van-stepper__input {
+      background: #F7F8F9;
+      border-radius: 6px;
+      margin: 0 8px;
+    }
+
+    .van-stepper--round .van-stepper__plus--disabled,
+    .van-stepper--round .van-stepper__minus--disabled {
+      opacity: 0.6;
+    }
+  }
+}

+ 139 - 32
src/views/order-detail/order-vip/index.tsx

@@ -1,18 +1,61 @@
-import { Cell, CellGroup, Icon, Image } from 'vant'
+import { Cell, CellGroup, Icon, Image, Stepper } from 'vant'
 import { defineComponent } from 'vue'
 import styles from './index.module.less'
-import { orderStatus } from '../orderStatus'
+// import { orderStatus } from '../orderStatus'
 
 import iconMember from '@common/images/icon_member.png'
-import iconTimer from '@common/images/icon_timer.png'
-import request from '@/helpers/request'
+import iconMemberSvip from '@common/images/icon_member_svip.png'
+import dayjs from 'dayjs'
+import { memberSimpleType } from '@/constant'
+// import iconTimer from '@common/images/icon_timer.png'
+// import request from '@/helpers/request'
 
 export default defineComponent({
   name: 'OrderVideo',
   props: {
     item: {
       type: Object,
-      default: {}
+      default: () => ({})
+    },
+    disabled: {
+      type: Boolean,
+      default: false
+    }
+  },
+  emits: ['priceChange'],
+  computed: {
+    needBuyNums() {
+      const item = this.item
+      if (item.vipEndDays > 0) {
+        const endTime = dayjs(item.startTime).add(item.vipEndDays, 'day')
+        const unit = item.period === 'YEAR' ? 'years' : 'months'
+        const months = endTime.diff(dayjs(item.startTime), unit)
+        if (item.period === 'MONTH') {
+          return months + 1
+        } else if (item.period === 'QUARTERLY') {
+          return Math.ceil((months + 1) / 3)
+        } else if (item.period === 'YEAR_HALF') {
+          return Math.ceil((months + 1) / 6)
+        } else if (item.period === 'YEAR') {
+          return months + 1
+        } else {
+          return 1
+        }
+      }
+      return 1
+    },
+    startTime() {
+      const item = this.item
+      if (this.disabled) {
+        return item.startTime
+      }
+      if (item.svipEndDays > 0 && item.orderType === 'SVIP') {
+        return dayjs(item.startTime).add(1, 'day').format('YYYY-MM-DD')
+      }
+      if (item.vipEndDays > 0 && item.orderType === 'VIP') {
+        return dayjs(item.startTime).add(1, 'day').format('YYYY-MM-DD')
+      }
+      return item.startTime
     }
   },
   render() {
@@ -24,41 +67,105 @@ export default defineComponent({
             // center
             titleClass={styles.titleClass}
             v-slots={{
-              icon: () => <Image class={styles.memberLogo} src={iconMember} />,
+              icon: () => (
+                <Image
+                  class={styles.memberLogo}
+                  src={item.orderType === 'SVIP' ? iconMemberSvip : iconMember}
+                />
+              ),
               title: () => (
-                <div class={styles.container}>
-                  <div class={styles.title}>小酷Ai{item.title}</div>
-                  <div class={styles.price}>
-                    <i>¥</i>
-                    {(this as any).$filters.moneyFormat(item.price)}
+                <>
+                  <div class={styles.container}>
+                    <div class={styles.title}>
+                      {item.goodsName || item.goodName}
+                    </div>
+                    <div class={styles.price}>
+                      <i>¥ </i>
+                      {(this as any).$filters.moneyFormat(item.price)}
+                    </div>
+                  </div>
+                  <div class={styles.addNum}>
+                    <Stepper
+                      disableInput
+                      disabled={item.period === 'PERPETUAL' || this.disabled}
+                      v-model={item.num}
+                      theme="round"
+                      min={1}
+                      max={99}
+                      onChange={() => {
+                        let endTime = new Date()
+                        if (item.period === 'MONTH') {
+                          endTime = dayjs(item.startTime)
+                            .add(1 * item.num, 'month')
+                            .toDate()
+                        } else if (item.period === 'QUARTERLY') {
+                          endTime = dayjs(item.startTime)
+                            .add(3 * item.num, 'month')
+                            .toDate()
+                        } else if (item.period === 'YEAR_HALF') {
+                          endTime = dayjs(item.startTime)
+                            .add(6 * item.num, 'month')
+                            .toDate()
+                        } else if (item.period === 'YEAR') {
+                          endTime = dayjs(item.startTime)
+                            .add(1 * item.num, 'year')
+                            .toDate()
+                        }
+                        item.endTime = dayjs(endTime).format('YYYY-MM-DD')
+                        // 价格变化
+                        this.$emit(
+                          'priceChange',
+                          (item.price * item.num).toFixed(2)
+                        )
+                      }}
+                    ></Stepper>
                   </div>
-                </div>
+                </>
               )
             }}
           />
         </CellGroup>
 
-        <CellGroup
-          class={['mb12', styles.cellGroup, styles.cellGroupTimer]}
-          border={false}
-        >
-          <Cell
-            center
-            v-slots={{
-              title: () => (
-                <div class={styles.timerCell}>
-                  <div class={styles.timerTitle}>
-                    {/* <Icon name={iconTimer} size={18} /> */}
-                    <span style={{ paddingLeft: '5px' }}>生效时间</span>
-                  </div>
-                  <div class={styles.timer}>
-                    {item.startTime} 至 {item.endTime}
+        {item.orderType === 'SVIP' && item.vipEndDays > 0 && (
+          <div class={styles.discountTips}>
+            {item.num >= this.needBuyNums ? (
+              <>
+                当前购买SVIP已达免费升级标准,
+                <span>VIP({item.vipEndDays}天)可免费升级为SVIP</span>
+              </>
+            ) : (
+              <>
+                购买{this.needBuyNums}个{memberSimpleType[item.period]}
+                SVIP会员,
+                <span>剩余VIP({item.vipEndDays}天)可免费升级为SVIP</span>
+              </>
+            )}
+          </div>
+        )}
+
+        {item.period !== 'PERPETUAL' && (
+          <CellGroup
+            class={['mb12', styles.cellGroup, styles.cellGroupTimer]}
+            border={false}
+          >
+            <Cell
+              center
+              v-slots={{
+                title: () => (
+                  <div class={styles.timerCell}>
+                    <div class={styles.timerTitle}>
+                      {/* <Icon name={iconTimer} size={18} /> */}
+                      <span>生效时间</span>
+                    </div>
+                    <div class={styles.timer}>
+                      {this.startTime} 至 {item.endTime}
+                    </div>
                   </div>
-                </div>
-              )
-            }}
-          />
-        </CellGroup>
+                )
+              }}
+            />
+          </CellGroup>
+        )}
       </div>
       // 视频课
     )

+ 43 - 2
src/views/order-detail/orderStatus.ts

@@ -4,12 +4,14 @@ import { state } from '@/state'
 import request from '@/helpers/request'
 import { browser } from '@/helpers/utils'
 import { Dialog } from 'vant'
+import dayjs from 'dayjs'
 type orderType =
   | 'VIDEO'
   | 'LIVE'
   | 'PRACTICE'
   | 'GOODS'
   | 'VIP'
+  | 'SVIP'
   | 'MUSIC'
   | 'PIANO_ROOM'
   | 'ACTI_REGIST'
@@ -37,6 +39,7 @@ const original = () => {
       orderList: [] as Array<any>, // 商品信息
       activityId: '' as any, // 活动编号
       couponId: '' as string, // 优惠券编号
+      couponDiscountPrice: 0 as number, // 优惠券扣减金额
       discountPrice: 0 as number // 优惠
     } as any
     // orderObject: {
@@ -69,6 +72,29 @@ export const resestState = () => {
   Object.assign(orderStatus, original())
 }
 
+
+// 购买会员多少数量满足条件
+export const memberNeedNumber = (item: any) => {
+  if (item.vipEndDays > 0) {
+    const endTime = dayjs(item.startTime).add(item.vipEndDays, 'day')
+    const unit = item.period === 'YEAR' ? 'years' : 'months'
+    const months = endTime.diff(dayjs(item.startTime), unit)
+    if (item.period === 'MONTH') {
+      return months + 1
+    } else if (item.period === 'QUARTERLY') {
+      return Math.ceil((months + 1) / 3)
+    } else if (item.period === 'YEAR_HALF') {
+      return Math.ceil((months + 1) / 6)
+    } else if (item.period === 'YEAR') {
+      return months + 1
+    } else {
+      return 1
+    }
+  }
+  return 1
+}
+
+
 export const orderInfos = () => {
   // 商品列表
   const orderList = orderStatus.orderObject.orderList || []
@@ -78,7 +104,7 @@ export const orderInfos = () => {
       goodName: item.goodsName,
       recomUserId: item.recomUserId, // 推荐人id
       bizContent: {}
-    }
+    } as any
     if (item.orderType === 'VIDEO') {
       params.bizContent = {
         videoLessonGroupId: item.courseGroupId,
@@ -110,6 +136,14 @@ export const orderInfos = () => {
       }
     } else if (item.orderType === 'VIP') {
       params.bizContent = item.id
+      params.goodsNum = item.num
+      params.bizPrice = item.salePrice
+    } else if (item.orderType === "SVIP") {
+      params.bizContent = item.id
+      const needNumber = memberNeedNumber(item)
+      params.vipEndDays = item.num > needNumber ? item.vipEndDays : null
+      params.goodsNum = item.num
+      params.bizPrice = item.salePrice
     } else if (item.orderType === 'MUSIC') {
       params.bizContent = {
         musicSheetId: item.id,
@@ -148,10 +182,17 @@ export const orderTenantInfos = () => {
       goodName: item.goodsName,
       goodNum: 1,
       bizContent: {}
-    }
+    } as any
     if (item.orderType === 'VIP') {
       params.bizContent = item.id
       params.bizId = item.id
+      params.goodsNum = item.num
+    } else if (item.orderType === "SVIP") {
+      params.bizContent = item.id
+      // params.vipEndDays = item.vipEndDays
+      const needNumber = memberNeedNumber(item)
+      params.vipEndDays = item.num > needNumber ? item.vipEndDays : null
+      params.goodsNum = item.num
     } else if (item.orderType === 'MUSIC') {
       params.bizContent = {
         musicSheetId: item.id,

+ 8 - 1
src/views/order-detail/payment/index.tsx

@@ -25,6 +25,7 @@ import inactiveButtonIcon from '@common/images/icon_checkbox_default.png'
 import activeButtonIconTenant from '@common/images/icon_checkbox-tenant.png'
 import iconWechat from '@common/images/icon-wechat.png'
 import iconAlipay from '@common/images/icon-alipay.png'
+import { browser } from '@/helpers/utils'
 
 interface IOrderInfo {
   orderNo: string | number
@@ -108,7 +109,13 @@ export default defineComponent({
       //   return
       // }
 
-      !noBack && this.$router.go(-1)
+      if (!noBack) {
+        if (browser().isApp) {
+          postMessage({ api: 'goBack' })
+        } else {
+          this.$router.go(-1)
+        }
+      }
       this.onBackOut && this.onBackOut()
     },
     async onSubmit() {

+ 1 - 0
src/views/order-detail/use-coupons/index.tsx

@@ -11,6 +11,7 @@ import styles from './index.module.less'
 export const couponEnum = {
   UNIVERSAL: 'UNIVERSAL',
   VIP: 'VIP',
+  SVIP: 'SVIP',
   PIANO_ROOM: 'PIANO',
   GOODS: 'MALL',
   MUSIC: 'MUSIC',

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

Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor