lex-xin 4 ماه پیش
والد
کامیت
bd56dbccf1

+ 1 - 1
src/student/teacher-dependent/components/live.tsx

@@ -83,7 +83,7 @@ export default defineComponent({
   render() {
     return (
       <>
-        <Tips class={styles.tips} title='什么是直播课?' content='直播课是现代教育领域中一种广受欢迎的课程形式,它集实时互动、多媒体展示和高度便利性于一体,为学习者带来了独特且丰富的学习体验。特别是在管乐直播课中,教师可以通过播放经典音乐作品,加深学生对音乐之美的感知与理解。对于那些需要具体操作演示的教学内容,直播课能够提供清晰直观的视角,让教师的每一个动作细节都展现在学生面前,确保学习效果。直播课程的内容围绕特定主题精心设计,旨在满足不同学习者的需求,促进知识与技能的有效传递。' />
+        <Tips type="LIVE" class={styles.tips} title='什么是直播课?' content='直播课是现代教育领域中一种广受欢迎的课程形式,它集实时互动、多媒体展示和高度便利性于一体,为学习者带来了独特且丰富的学习体验。特别是在管乐直播课中,教师可以通过播放经典音乐作品,加深学生对音乐之美的感知与理解。对于那些需要具体操作演示的教学内容,直播课能够提供清晰直观的视角,让教师的每一个动作细节都展现在学生面前,确保学习效果。直播课程的内容围绕特定主题精心设计,旨在满足不同学习者的需求,促进知识与技能的有效传递。' />
         {this.dataShow ? (
           <List
             class={styles.liveList}

+ 11 - 4
src/student/teacher-dependent/components/practice.tsx

@@ -41,6 +41,7 @@ export default defineComponent({
       subjectInfo: {
         subjectPrice: 0,
         courseMinutes: 0,
+        freeMinutes: 0,
         id: null,
         subjectName: '',
         subjectId: 0
@@ -64,7 +65,8 @@ export default defineComponent({
         '/api-student/courseSchedule/getTeacherSubjectPrice',
         {
           params: {
-            teacherId: this.teacherId
+            teacherId: this.teacherId,
+            groupType: 'PRACTICE'
           }
         }
       )
@@ -77,10 +79,11 @@ export default defineComponent({
         })
         // 判断是否有跟学生相同的科目,如果没有则默认取第一个
         const tempRes = findItem || result[0]
-        const { subjectName, subjectPrice, courseMinutes, subjectId, id } = tempRes
+        const { subjectName, subjectPrice, courseMinutes, subjectId, id, freeMinutes } = tempRes
         this.subjectInfo = {
           subjectPrice,
           id,
+          freeMinutes,
           courseMinutes,
           subjectName,
           subjectId
@@ -231,6 +234,7 @@ export default defineComponent({
           '/api-student/courseGroup/lockCourseToCache',
           {
             data: {
+              courseFreeMinutes: this.subjectInfo.freeMinutes,
               courseNum: this.courseNum,
               courseType: 'PRACTICE',
               loop: this.selectType === 'noEnough' ? 1 : 0,
@@ -325,6 +329,7 @@ export default defineComponent({
             courseIntroduce: subjectInfo.subjectName + '趣纠课',
             subjectId: subjectInfo.subjectId,
             singleCourseMinutes: subjectInfo.courseMinutes,
+            teacherSubjectPriceId: subjectInfo.id,
             courseNum: this.courseNum,
             coursePrice: (this.courseNum * subjectInfo.subjectPrice).toFixed(2),
             teacherName:
@@ -384,7 +389,7 @@ export default defineComponent({
           (this.settingStatus ? (
             <>
               <div class={styles.practice}>
-                <Tips title="什么是趣纠课?" content="趣纠课以一对一专属、高度针对性的形式进行,每次课程时长为25分钟。本课程专为解决学生日常练习中的疑问与误区设计,尤其适合那些在自我练习后感到困惑或不确定自己方法是否正确的学生。不同于传统的教学模式,趣纠课不侧重于新知识或新技能的传授,而是全心全意致力于检查学生现有的练习成果,并及时纠正其中出现的问题。这种方式不仅有助于学生巩固已掌握的知识和技能,还能有效防止错误习惯的形成和发展,为他们今后的学习打下更加坚实的基础。" />
+                <Tips type="PRACTICE" title="什么是趣纠课?" content="趣纠课以一对一专属、高度针对性的形式进行,每次课程时长为25分钟。本课程专为解决学生日常练习中的疑问与误区设计,尤其适合那些在自我练习后感到困惑或不确定自己方法是否正确的学生。不同于传统的教学模式,趣纠课不侧重于新知识或新技能的传授,而是全心全意致力于检查学生现有的练习成果,并及时纠正其中出现的问题。这种方式不仅有助于学生巩固已掌握的知识和技能,还能有效防止错误习惯的形成和发展,为他们今后的学习打下更加坚实的基础。" />
 
                 <CellGroup class={styles.group} border={false}>
                   <Cell
@@ -546,11 +551,13 @@ export default defineComponent({
                       subjectPrice,
                       courseMinutes,
                       id,
-                      subjectId
+                      subjectId,
+                      freeMinutes
                     } = item
                     this.subjectInfo = {
                       subjectPrice,
                       id,
+                      freeMinutes,
                       courseMinutes,
                       subjectName,
                       subjectId

+ 50 - 11
src/student/teacher-dependent/components/tips/index.tsx

@@ -1,5 +1,5 @@
 import { Icon } from 'vant'
-import { defineComponent } from 'vue'
+import { defineComponent, onMounted, ref } from 'vue'
 import styles from './index.module.less'
 import icon3 from '../../images/icon3.png'
 
@@ -16,6 +16,11 @@ export default defineComponent({
       type: String,
       default: ''
     },
+    /** 类型 */
+    type: {
+      type: String,
+      default: ''
+    },
     btnTxt: {
       type: String,
       default: '不再提醒'
@@ -23,18 +28,52 @@ export default defineComponent({
   },
   emits: ['close', 'confirm'],
   setup(props, { emit }) {
+    const isStatus = ref(true)
+
+    console.log(props.type, '1212')
+
+    // 获取当前提示是否有缓存
+    const getTypeIsCatch = () => {
+      const localType = localStorage.getItem('teacher_home_local');
+      const formatLocalType = localType ? JSON.parse(localType) : {}
+      console.log(formatLocalType[props.type])
+      if(formatLocalType[props.type]) {
+        return true
+      } else {
+        return false
+      }
+    }
+
+    // 设置已知道
+    const setTypeIsCatch = () => {
+      const localType = localStorage.getItem('teacher_home_local');
+      const formatLocalType = localType ? JSON.parse(localType) : {}
+      formatLocalType[props.type] = 1
+      localStorage.setItem('teacher_home_local', JSON.stringify(formatLocalType))
+    }
+
+    onMounted(() => {
+      isStatus.value = !getTypeIsCatch()
+    })
     return () => (
-      <div class={styles.tipSection}>
-        <Icon class={styles.iconCross} onClick={() => emit("close")} name="cross" />
-        <div class={styles.tipTitle}>
-          <img src={icon3} />
-          {props.title}
-        </div>
-        <div class={styles.tipContent}>
-          {props.content}
-        </div>
-        <div class={styles.tipFooter} onClick={() => emit("confirm")}>{props.btnTxt}</div>
+      isStatus.value ? <div class={styles.tipSection}>
+      <Icon class={styles.iconCross} onClick={() => {
+        emit('close')
+        isStatus.value = false
+      }} name="cross" />
+      <div class={styles.tipTitle}>
+        <img src={icon3} />
+        {props.title}
+      </div>
+      <div class={styles.tipContent}>
+        {props.content}
       </div>
+      <div class={styles.tipFooter} onClick={() => {
+        emit("confirm")
+        setTypeIsCatch()
+        isStatus.value = false
+      }}>{props.btnTxt}</div>
+    </div> : ''
     )
   }
 })

+ 1 - 1
src/student/teacher-dependent/components/video.tsx

@@ -68,7 +68,7 @@ export default defineComponent({
   render() {
     return (
       <> 
-        <Tips class={styles.tips} title='什么是视频课?' content='视频课是由教师事先精心准备并录制的课程内容。教师依据教学大纲和目标,系统规划每一节视频的主题与内容,确保教学的连贯性和完整性。在录制过程中,采用专业设备如高清摄像机和录屏软件,保障视频画质清晰、音频质量优良。视频课为学生提供了极大的学习灵活性,他们可以依据个人的时间安排自由选择学习时间,不受地点限制。特别适用于系统化学习体系的内容,视频课能够帮助学生按部就班地掌握知识,实现自主高效学习。' />
+        <Tips type="VIDEO" class={styles.tips} title='什么是视频课?' content='视频课是由教师事先精心准备并录制的课程内容。教师依据教学大纲和目标,系统规划每一节视频的主题与内容,确保教学的连贯性和完整性。在录制过程中,采用专业设备如高清摄像机和录屏软件,保障视频画质清晰、音频质量优良。视频课为学生提供了极大的学习灵活性,他们可以依据个人的时间安排自由选择学习时间,不受地点限制。特别适用于系统化学习体系的内容,视频课能够帮助学生按部就班地掌握知识,实现自主高效学习。' />
         {this.dataShow ? (
           <List
             class={styles.videoList}

+ 17 - 10
src/student/teacher-dependent/components/vip.tsx

@@ -25,7 +25,7 @@ import icon3 from '../images/icon3.png'
 import Tips from './tips'
 
 export default defineComponent({
-  name: 'vip',
+  name: 'VIP_COURSE',
   props: {
     userInfo: {
       type: Object,
@@ -40,6 +40,7 @@ export default defineComponent({
       teacherSubjectList: [],
       subjectStatus: false,
       subjectInfo: {
+        freeMinutes: 0,
         subjectPrice: 0,
         courseMinutes: 0,
         id: null,
@@ -65,7 +66,8 @@ export default defineComponent({
         '/api-student/courseSchedule/getTeacherSubjectPrice',
         {
           params: {
-            teacherId: this.teacherId
+            teacherId: this.teacherId,
+            groupType: 'VIP'
           }
         }
       )
@@ -78,9 +80,10 @@ export default defineComponent({
         })
         // 判断是否有跟学生相同的科目,如果没有则默认取第一个
         const tempRes = findItem || result[0]
-        const { subjectName, subjectPrice, courseMinutes, subjectId, id } = tempRes
+        const { subjectName, subjectPrice, courseMinutes, subjectId, id, freeMinutes } = tempRes
         this.subjectInfo = {
           subjectPrice,
+          freeMinutes,
           id,
           courseMinutes,
           subjectName,
@@ -232,8 +235,9 @@ export default defineComponent({
           '/api-student/courseGroup/lockCourseToCache',
           {
             data: {
+              courseFreeMinutes: this.subjectInfo.freeMinutes,
               courseNum: this.courseNum,
-              courseType: 'PRACTICE',
+              courseType: 'VIP',
               loop: this.selectType === 'noEnough' ? 1 : 0,
               teacherId: this.teacherId,
               timeList: [...times]
@@ -295,7 +299,7 @@ export default defineComponent({
           '/api-student/userOrder/getPendingOrder',
           {
             data: {
-              goodType: 'VIP',
+              goodType: 'VIP_COURSE',
               bizId: this.teacherId
             }
           }
@@ -311,7 +315,7 @@ export default defineComponent({
             item.startTime
           ).format('HH:mm')}~${dayjs(item.endTime).format('HH:mm')}`
         })
-        orderStatus.orderObject.orderType = 'VIP'
+        orderStatus.orderObject.orderType = 'VIP_COURSE'
         orderStatus.orderObject.orderName = subjectInfo.subjectName + 'VIP定制课'
         orderStatus.orderObject.orderDesc = subjectInfo.subjectName + 'VIP定制课'
         orderStatus.orderObject.actualPrice = Number(
@@ -320,12 +324,13 @@ export default defineComponent({
         orderStatus.orderObject.orderNo = ''
         orderStatus.orderObject.orderList = [
           {
-            orderType: 'VIP',
+            orderType: 'VIP_COURSE',
             goodsName: subjectInfo.subjectName + 'VIP定制课',
             courseGroupName: subjectInfo.subjectName + 'VIP定制课',
             courseIntroduce: subjectInfo.subjectName + 'VIP定制课',
             subjectId: subjectInfo.subjectId,
             singleCourseMinutes: subjectInfo.courseMinutes,
+            teacherSubjectPriceId: subjectInfo.id,
             courseNum: this.courseNum,
             coursePrice: (this.courseNum * subjectInfo.subjectPrice).toFixed(2),
             teacherName:
@@ -363,7 +368,7 @@ export default defineComponent({
       this.$router.push({
         path: '/orderDetail',
         query: {
-          orderType: 'VIP'
+          orderType: 'VIP_COURSE'
         }
       })
     },
@@ -385,7 +390,7 @@ export default defineComponent({
           (this.settingStatus ? (
             <>
               <div class={styles.practice}>
-                <Tips title='什么是VIP定制课?' content='VIP定制课程采用一对一专属授课模式,每节课时长为45分钟。课程内容根据学生的具体需求量身打造,旨在全面提升学生的个人技能与表现。不论是希望在乐器演奏技巧上取得突破,如提高指法精准度、气息控制能力或节奏掌握等;还是为即将到来的重要活动、比赛或考级做充分准备,我们都能提供高度匹配的教学方案。此外,教学进度将根据每位学员的学习吸收情况灵活调整,确保每个人都能在最适合自己的节奏中稳步前进,扎实提升个人能力。' />
+                <Tips type="LIVE_COURSE" title='什么是VIP定制课?' content='VIP定制课程采用一对一专属授课模式,每节课时长为45分钟。课程内容根据学生的具体需求量身打造,旨在全面提升学生的个人技能与表现。不论是希望在乐器演奏技巧上取得突破,如提高指法精准度、气息控制能力或节奏掌握等;还是为即将到来的重要活动、比赛或考级做充分准备,我们都能提供高度匹配的教学方案。此外,教学进度将根据每位学员的学习吸收情况灵活调整,确保每个人都能在最适合自己的节奏中稳步前进,扎实提升个人能力。' />
                 <CellGroup class={styles.group} border={false}>
                   <Cell
                     title="选择专业"
@@ -546,10 +551,12 @@ export default defineComponent({
                       subjectPrice,
                       courseMinutes,
                       id,
-                      subjectId
+                      subjectId,
+                      freeMinutes
                     } = item
                     this.subjectInfo = {
                       subjectPrice,
+                      freeMinutes,
                       id,
                       courseMinutes,
                       subjectName,

BIN
src/student/teacher-dependent/model/fans-list/images/fans-bg.png


BIN
src/student/teacher-dependent/model/fans-list/images/icon-close.png


+ 80 - 0
src/student/teacher-dependent/model/fans-list/index.module.less

@@ -0,0 +1,80 @@
+.fansSection {
+  width: 300px;
+  background: #ffffff;
+  border-radius: 10px;
+
+  .fansBg {
+    height: 113px;
+  }
+
+  .noFans {
+    padding: 22px 0 30px;
+    font-size: 14px;
+    color: #999999;
+    line-height: 20px;
+    text-align: center;
+  }
+
+  .fansList {
+    padding: 20px 15px 0;
+  }
+}
+
+.fansGroup {
+  padding: 0 0 20px !important;
+  display: flex;
+  align-items: center;
+
+  :global {
+    .van-cell__title {
+      flex: 1 auto;
+    }
+    .van-cell__value {
+      flex: 1 auto;
+      flex-shrink: 0;
+      // width: 68px;
+    }
+
+    .van-button {
+      --van-button-small-height: 26px;
+      min-width: 68px;
+    }
+    .van-button--disabled {
+      opacity: 1;
+      background: #F4F5F6;
+      color: #AAAAAA;
+      border-color: #F4F5F6;
+    }
+  }
+
+  p {
+    font-size: 14px;
+    color: #999999;
+    line-height: 20px;
+    width: 160px;
+  }
+}
+
+.fansImage {
+  width: 42px;
+  height: 42px;
+  border-radius: 50%;
+  overflow: hidden;
+  flex-shrink: 0;
+}
+
+.fansTitle {
+  
+  font-size: 16px;
+  color: #1a1a1a;
+  line-height: 22px;
+
+  .title {
+    max-width: 130px;
+    padding-left: 12px;
+  }
+  .introduce {
+    padding-left: 12px;
+    width: 140px;
+  }
+}

+ 84 - 0
src/student/teacher-dependent/model/fans-list/index.tsx

@@ -0,0 +1,84 @@
+import { defineComponent } from "vue";
+import {Button, Cell, Image} from 'vant'
+import { postMessage } from '@/helpers/native-message'
+import styles from './index.module.less'
+import fansBg from './images/fans-bg.png'
+import icon_fans from '../../images/icon_fans.png'
+
+export default defineComponent({
+  name: 'fans-list',
+  props: {
+    fansList: {
+      type: Array,
+      default: () => []
+    }
+  },
+  emits: ['confirm'],
+  setup(props, { emit }) {
+    const onDetail = async (item) => {
+      // 申请入群
+      if (!item.hasWaitAuditFlag && !item.existFlag) {
+        // this.chatStatus = true
+        // this.chatItem = item
+        emit('confirm', item)
+        return
+      }
+
+      // 进入群聊天
+      if (item.existFlag) {
+        postMessage({
+          api: 'joinChatGroup',
+          content: {
+            type: 'multi', // single 单人 multi 多人
+            id: item.id
+          }
+        })
+      }
+    }
+    return () => <div class={styles.fansSection}>
+      <img src={fansBg} class={styles.fansBg} />
+      {props.fansList && props.fansList.length > 0 ? (
+      <div class={styles.fansList}>
+        {props.fansList.map((item: any) => (
+          <Cell
+            center
+            class={styles.fansGroup}
+            border={false}
+            v-slots={{
+              icon: () => (
+                <Image
+                  src={item.img || icon_fans}
+                  fit="cover"
+                  class={styles.fansImage}
+                />
+              ),
+              title: () => (
+                <div class={styles.fansTitle}>
+                  <div class={[styles.title, 'van-ellipsis']}>
+                    {item.name}
+                  </div>
+                  <p class={["van-ellipsis", styles.introduce]}>{item.introduce}</p>
+                </div>
+              ),
+              default: () => (
+                <Button
+                  type="primary"
+                  size="small"
+                  round
+                  disabled={item.hasWaitAuditFlag}
+                  onClick={() => onDetail(item)}
+                >
+                  {item.existFlag ? '去聊天' : ''}
+                  {item.hasWaitAuditFlag ? '审核中' : ''}
+                  {!item.hasWaitAuditFlag && !item.existFlag
+                    ? '申请入群'
+                    : ''}
+                </Button>
+              )
+            }}
+          />
+        ))}
+      </div>
+    ) : <div class={styles.noFans}>您还没有粉丝群哦!</div>}</div>
+  }
+})

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

@@ -236,8 +236,8 @@ export default defineComponent({
                 class={[styles.btn, styles.btnStar]}
                 onClick={this.onStart}
               >
-                {/* {this.userInfo.isStar  <img src={getAssetsHomeFile('icon-add.png')} />} */}
-                <img src={getAssetsHomeFile('icon-add.png')} />
+                {!this.userInfo.isStar ? <img src={getAssetsHomeFile('icon-add.png')} /> : ''}
+                {/* <img src={getAssetsHomeFile('icon-add.png')} /> */}
                 {this.userInfo.isStar ? '已关注' : '关注'}
               </Button>
               <Button

+ 11 - 0
src/student/teacher-dependent/teacher-home.module.less

@@ -106,4 +106,15 @@
     padding: 12px;
     text-align: justify;
   }
+}
+
+.fansPopup {
+  background: transparent;
+
+  :global {
+    .van-popup__close-icon {
+      font-size: 18px;
+      color: #CCCCCC;
+    }
+  }
 }

+ 56 - 7
src/student/teacher-dependent/teacher-home.tsx

@@ -1,7 +1,7 @@
 import ColHeader from '@/components/col-header'
 import { defineComponent } from 'vue'
 import styles from './teacher-home.module.less'
-import { Tab, Tabs } from 'vant'
+import { Popup, Tab, Tabs } from 'vant'
 import Practice from './components/practice'
 import Live from './components/live'
 import VideoList from './components/video'
@@ -13,6 +13,9 @@ import TeacherHeader from './model/teacher-header'
 import { useRect } from '@vant/use'
 import { useEventTracking } from '@/helpers/hooks'
 import Vip from './components/vip'
+import Single from './components/single'
+import JoinChat from './model/join-chat'
+import FansList from './model/fans-list'
 
 export const getAssetsHomeFile = (fileName: string) => {
   const path = `./images/${fileName}`
@@ -34,7 +37,11 @@ export default defineComponent({
       headColor: '#fff',
       height: 'auto' as any,
       backIconColor: 'white',
-      homeContaiterHeight: ''
+      homeContaiterHeight: '',
+      fansStatus: false,
+      fansList: [],
+      chatItem: {},
+      chatStatus: false,
     }
   },
   async created() {},
@@ -70,6 +77,17 @@ export default defineComponent({
         })
         this.userInfo = res.data
       } catch {}
+    },
+    async getFansList() {
+      try {
+        const res = await request.post('/api-student/imGroup/queryTeacherGroup', {
+          data: {
+            type: 'FAN',
+            createUserId: this.teacherId
+          }
+        })
+        this.fansList = res.data || []
+      } catch {}
     }
   },
   render() {
@@ -86,7 +104,6 @@ export default defineComponent({
               this.$nextTick(() => {
                 const { height } = useRect((this as any).$refs.headers)
                 this.height = height
-                // this.homeContaiterHeight = `calc(100vh - var(--van-tabs-line-height) - ${height}px - 15px)`
               })
             }}
           />
@@ -109,15 +126,21 @@ export default defineComponent({
                 <img src={getAssetsHomeFile('icon1.png')} />
                 个人风采
               </div>
-              <div class={styles.btn2}>
+              <div class={styles.btn2} onClick={async () => {
+                if(this.fansList.length <= 0) {
+                  await this.getFansList()
+                }
+                this.fansStatus = true
+              }}>
                 <img src={getAssetsHomeFile('icon2.png')} />
                 粉丝群
               </div>
             </div>
 
-            <div class={styles.singleContent}>
-              毕业于中央音乐学员长笛专业,师从央音长笛系。曾获得2016年锦绣杯长笛大赛冠军。自2018年起研究长笛启蒙、考级到专业考试教育。总结出一套适合各个阶段需要的教学方式。所教学员考级通过率100%,专业院校复试率92%。
-            </div>
+              {this.userInfo.introduction && <div class={styles.singleContent}>
+              {this.userInfo.introduction}
+            </div>}
+            
           </div>
         </div>
         <Tabs
@@ -167,6 +190,32 @@ export default defineComponent({
             </div>
           </Tab>
         </Tabs>
+
+        <Popup show={this.fansStatus} class={styles.fansPopup} closeable onClose={() => this.fansStatus = false}>
+          <FansList fansList={this.fansList} onConfirm={(item: any) => {
+            this.chatStatus = true
+            this.chatItem = item
+          }} />
+        </Popup>
+
+        <Popup
+          show={this.chatStatus}
+          position="bottom"
+          round
+          closeable
+          safe-area-inset-bottom
+          onClose={() => (this.chatStatus = false)}
+        >
+          <JoinChat
+            item={this.chatItem}
+            onClose={(id: number) => {
+              this.fansList.forEach((item: any) => {
+                item.id === id && (item.hasWaitAuditFlag = true)
+              })
+              this.chatStatus = false
+            }}
+          />
+        </Popup>
       </div>
     )
   }

+ 6 - 6
src/student/trade/tradeOrder.ts

@@ -116,7 +116,7 @@ export const formatOrderDetail = async (item: any, amount?: IAmount) => {
     case 'DISCOUNT':
       {
         try {
-          const res = await getDiscountDetail()
+          const res = await getDiscountDetail(item.id)
           console.log(res, 'res', item, 'item')
           tempList = {
             orderType: item.goodType,
@@ -125,9 +125,9 @@ export const formatOrderDetail = async (item: any, amount?: IAmount) => {
             id: item.id,
             title: item.goodName || '',
             // 判断是否有优惠金额
-            price: res.salePrice,
-            startTime: dayjs(res.startTime).format('YYYY-MM-DD'),
-            endTime: dayjs(res.endTime).format('YYYY-MM-DD')
+            price: item.expectPrice,
+            startTime: dayjs(res?.discountStartTime || new Date()).format('YYYY-MM-DD'),
+            endTime: dayjs(res?.discountEndTime || new Date()).format('YYYY-MM-DD')
           }
         } catch (e: any) {
           throw new Error(e.message)
@@ -261,9 +261,9 @@ export const getAlbumDetail = async (id: any) => {
 }
 
 // 获取畅学卡详情
-export const getDiscountDetail = async () => {
+export const getDiscountDetail = async (id: any) => {
   try {
-    const {data} = await request.get(`${apiSuffix}/memberPriceSettings/getDiscount`)
+    const {data} = await request.get(`${apiSuffix}/memberPriceSettings/detail/` + id)
     return data
   } catch {
     throw new Error('获取畅学卡详情失败')

+ 4 - 1
src/views/order-detail/index.tsx

@@ -42,6 +42,7 @@ import QrcodePayment from './qrcode-payment'
 import OrderTennatAlbum from './order-tennat-album'
 import { orderType } from '@/constant'
 import OrderDiscount from './order-discount'
+import OrderVipCourse from './order-vip-course'
 
 export default defineComponent({
   name: 'order-detail',
@@ -366,7 +367,7 @@ export default defineComponent({
           this.orderInfo = result
           this.orderNo = result.orderNo
         }
-
+        console.log(orderStatus.orderObject, '111')
         this.paymentStatus = true
       } catch {
         this.loading = false
@@ -514,6 +515,8 @@ export default defineComponent({
                 return <OrderLive item={item} />
               } else if (item.orderType === 'PRACTICE') {
                 return <OrderPractice item={item} />
+              } else if (item.orderType === 'VIP_COURSE') {
+                return <OrderVipCourse item={item} />
               } else if (
                 item.orderType === 'VIP' ||
                 item.orderType === 'SVIP'

+ 68 - 0
src/views/order-detail/order-vip-course/index.module.less

@@ -0,0 +1,68 @@
+.videoOrder {
+  .tag {
+    margin-right: 5px;
+    padding: 2px 5px;
+    font-size: 11px;
+    font-weight: 500;
+    color: #FF6600;
+    line-height: 16px;
+    background: #FFEDD9;
+    border-radius: 4px;
+    vertical-align: middle;
+  }
+  .title {
+    font-size: 16px;
+    font-weight: 500;
+    color: #333333;
+  }
+
+  .collapseItem {
+    :global(.van-cell) {
+      background: #f7f8f9;
+      padding-top: 9px;
+      padding-bottom: 9px;
+    }
+  }
+
+  .teacher {
+    margin-left: 5px;
+    color: #1a1a1a;
+    font-size: 16px;
+    font-weight: 500;
+  }
+
+  .price {
+    font-size: 16px;
+    font-weight: 500;
+    color: #ff3535;
+    line-height: 20px;
+    i {
+      font-style: normal;
+      font-size: 14px;
+    }
+  }
+  .userLogo {
+    width: 28px;
+    height: 28px;
+    overflow: hidden;
+    border-radius: 50%;
+  }
+  .classItem {
+    font-size: 14px;
+    color: #333333;
+    line-height: 20px;
+    .time {
+      padding-bottom: 6px;
+    }
+    p {
+      color: var(--van-primary);
+    }
+  }
+  :global {
+    .van-cell-group {
+      margin-bottom: 10px;
+      border-radius: 8px;
+      overflow: hidden;
+    }
+  }
+}

+ 84 - 0
src/views/order-detail/order-vip-course/index.tsx

@@ -0,0 +1,84 @@
+import { Cell, CellGroup, Collapse, CollapseItem, Image, Rate } from 'vant'
+import { defineComponent } from 'vue'
+import styles from './index.module.less'
+
+import iconTeacher from '@common/images/icon_teacher.png'
+import { moneyFormat } from '@/helpers/utils'
+import dayjs from 'dayjs'
+
+export default defineComponent({
+  name: 'OrderPractice',
+  props: {
+    item: {
+      type: Object,
+      default: {}
+    }
+  },
+  data() {
+    return {
+      collapse: [1]
+    }
+  },
+  render() {
+    const item = this.item
+    console.log(item.classTime)
+    return (
+      <div class={styles.videoOrder}>
+        <CellGroup border={false}>
+          <Cell
+            center
+            v-slots={{
+              title: () => (
+                <div class={[styles.title, 'van-ellipsis']}>
+                  <span class={styles.tag}>VIP定制课</span>
+                  {item.courseGroupName}
+                </div>
+              )
+            }}
+          />
+          <Cell
+            center
+            border={false}
+            title={item.teacherName}
+            titleClass={styles.teacher}
+            v-slots={{
+              icon: () => (
+                <Image
+                  class={styles.userLogo}
+                  src={item.avatar || iconTeacher}
+                />
+              ),
+              default: () => (
+                <>
+                  <span class={styles.price}>
+                    <i>¥</i>
+                    {moneyFormat(item.coursePrice)}
+                  </span>
+                  /{item.classTime.length}课时
+                </>
+              )
+            }}
+          />
+          <Cell border={false}>
+            <Collapse border={false} v-model={this.collapse}>
+              <CollapseItem
+                title="课程详情"
+                name={1}
+                class={styles.collapseItem}
+              >
+                <div class={styles.classItem}>
+                  {item.classTime.map((item: any) => {
+                    const dateTime = `${item.classDate} ${dayjs(
+                      item.startTime
+                    ).format('HH:mm')}-${dayjs(item.endTime).format('HH:mm')}`
+                    return <div class={styles.time}>{dateTime}</div>
+                  })}
+                </div>
+              </CollapseItem>
+            </Collapse>
+          </Cell>
+        </CellGroup>
+      </div>
+    )
+  }
+})

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

@@ -15,6 +15,7 @@ type orderType =
   | 'MUSIC'
   | 'PIANO_ROOM'
   | 'ACTI_REGIST'
+  | 'VIP_COURSE'
   | 'ALBUM'
   | 'TENANT_ALBUM'
   | ''
@@ -112,7 +113,7 @@ export const orderInfos = () => {
       params.bizContent = {
         groupId: item.courseGroupId
       }
-    } else if (item.orderType === 'PRACTICE') {
+    } else if (item.orderType === 'PRACTICE' || item.orderType === "VIP_COURSE") {
       const tempTime = item.classTime || []
       const classCourse: any = []
       tempTime.forEach((time: any) => {
@@ -236,7 +237,7 @@ export const orderTenantInfos = () => {
         videoLessonGroupId: item.courseGroupId,
         payMoney: item.coursePrice || 0
       }
-    } else if (item.orderType === 'PRACTICE') {
+    } else if (item.orderType === 'PRACTICE' || item.orderType === 'VIP_COURSE') {
       const tempTime = item.classTime || []
       const classCourse: any = []
       tempTime.forEach((time: any) => {
@@ -249,6 +250,7 @@ export const orderTenantInfos = () => {
       params.bizContent = {
         courseGroupName: item.courseGroupName,
         courseIntroduce: item.courseIntroduce,
+        teacherSubjectPriceId: item.teacherSubjectPriceId,
         subjectId: item.subjectId,
         singleCourseMinutes: item.singleCourseMinutes,
         courseNum: item.courseNum,

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

@@ -15,6 +15,7 @@ export const couponEnum = {
   PIANO_ROOM: 'PIANO',
   GOODS: 'MALL',
   MUSIC: 'MUSIC',
+  VIP_COURSE: 'VIP_COURSE',
   DISCOUNT: 'DISCOUNT',
   PRACTICE: 'SPARRING',
   LIVE: 'LIVE',