lex-xin 4 months ago
parent
commit
b1bca0e732

+ 1 - 1
src/components/col-result/index.tsx

@@ -18,7 +18,7 @@ export default defineComponent({
       type: String
     },
     type: {
-      // 空 | 达人认证 | 音乐人认证 | 直播认证
+      // 空 | 老师认证 | 音乐人认证 | 直播认证
       type: String as PropType<
         | 'empty'
         | 'teacherCert'

+ 12 - 26
src/components/col-upload-video/index.tsx

@@ -85,13 +85,15 @@ export default defineComponent({
             acl: 'public-read',
             key: key
           }
-        })
+        }, true)
+        setTimeout(() => {
         Toast.loading({
-          message: '加载中...',
-          forbidClick: true,
-          loadingType: 'spinner',
-          duration: 0
-        })
+            message: '加载中...',
+            forbidClick: true,
+            loadingType: 'spinner',
+            duration: 0
+          })
+        }, 100);
         const obj = {
           policy: data.policy,
           signature: data.signature,
@@ -105,26 +107,8 @@ export default defineComponent({
           getOssUploadUrl(this.bucket),
           obj
         )
-        // const formData = new FormData()
-        // for (const key in obj) {
-        //   formData.append(key, obj[key])
-        // }
-        // formData.append('file', file.file)
-        // await umiRequest(getOssUploadUrl(this.bucket), {
-        //   method: 'POST',
-        //   data: formData
-        // })
-        // const uploadUrl = getOssUploadUrl(this.bucket) + key
-        Toast.clear()
+        Toast.clear() 
         this.$emit('update:modelValue', uploadUrl)
-        // this.onUploadChange(uploadUrl)
-        // let formData = new FormData()
-        // formData.append('file', file.file)
-        // let res = await request.post('/api-teacher/uploadFile', {
-        //   data: formData
-        // })
-        // const url = res.data.url
-        // this.$emit('update:modelValue', uploadUrl)
       } catch (error) {
         //
         console.log(error)
@@ -211,7 +195,9 @@ export default defineComponent({
                       ref="videoUpload"
                       class={styles.uploadImg}
                       src={this.modelValue + '#t=1,4'}
-                      // poster={this.posterUrl || ''}
+                      // onLoad={() => {
+                      //   Toast.clear()
+                      // }}
                     />
                   ) : (
                     <div class={styles.uploader}>

+ 2 - 2
src/helpers/hooks.ts

@@ -90,7 +90,7 @@ const eventTracks = {
   专辑: 'klx_album',
   视频课: 'klx_videoClass',
   直播课: 'klx_liveClass',
-  达人风采: 'klx_talentElegant',
+  老师风采: 'klx_talentElegant',
   热门资讯: 'klx_hotInformation',
   小酷AI功能埋点: 'klx_xiaokuAI',
   我的乐谱: 'klx_myMusic',
@@ -108,7 +108,7 @@ type eventName =
   | '专辑'
   | '视频课'
   | '直播课'
-  | '达人风采'
+  | '老师风采'
   | '热门资讯'
   | '小酷AI功能埋点'
   | '我的乐谱'

+ 1 - 1
src/router/routes-teacher.ts

@@ -90,7 +90,7 @@ export default [
         name: 'teacherCert',
         component: () => import('@/teacher/teacher-cert/index'),
         meta: {
-          title: '达人认证'
+          title: '老师认证'
         }
       },
       {

+ 0 - 1
src/student/discount-card/index.tsx

@@ -28,7 +28,6 @@ export default defineComponent({
     })
     const userInfo = computed(() => {
       const users = baseState.user.data
-      console.log(users, 'users')
       return {
         username: users?.username,
         phone: users?.phone,

+ 2 - 2
src/student/home/components/recommend-sage/index.tsx

@@ -13,7 +13,7 @@ export default defineComponent({
   props: {
     title: {
       type: String,
-      default: '推荐达人'
+      default: '推荐老师'
     },
     sage: {
       type: Array,
@@ -87,7 +87,7 @@ export default defineComponent({
                 {item.living && <span class={styles.living}>直播中</span>}
               </div>
               <p class={styles.username}>{item.username}</p>
-              <p class={styles.cert}>认证达人</p>
+              <p class={styles.cert}>认证老师</p>
 
               <Button
                 round

+ 1 - 1
src/student/home/components/talent-style/index.tsx

@@ -183,7 +183,7 @@ export default defineComponent({
           <ColResult
             btnStatus={false}
             classImgSize="SMALL"
-            tips="暂无达人风采"
+            tips="暂无老师风采"
           />
         )}
       </>

+ 3 - 3
src/student/home/index.tsx

@@ -46,7 +46,7 @@ export default defineComponent({
         newMusicSheet: [] as any,
         hotMusicSheet: [] as any
       },
-      sageList: [], // 推荐达人
+      sageList: [], // 推荐老师
       videoList: [], // 视频课
       headerHeight: 0,
       downloadStatus: false
@@ -228,7 +228,7 @@ export default defineComponent({
           <Music title="最新曲目" music={this.musicList?.newMusicSheet || []} />
           <Music title="最热曲目" music={this.musicList?.hotMusicSheet || []} />
 
-          {/* 推荐达人 */}
+          {/* 推荐老师 */}
           <RecommendSage sage={this.sageList} />
 
           {/* 精品视频课 */}
@@ -241,7 +241,7 @@ export default defineComponent({
             sticky
             offsetTop={this.headerHeight + 'px'}
           >
-            <Tab title="达人风采" name="sage">
+            <Tab title="老师风采" name="sage">
               <TalentStyle />
             </Tab>
             <Tab title="热门资讯" name="info">

+ 1 - 1
src/student/member-center/member-record.tsx

@@ -135,7 +135,7 @@ export default defineComponent({
                 </div>
               </div>
               //   <div class={[styles.certHeader, this.headStatus ? styles.certWhite : null]}>
-              //     达人认证
+              //     老师认证
               //   </div>
             )
           }}

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

@@ -112,22 +112,22 @@ export default defineComponent({
     const iconList = [
       {
         icon: 'cert_active.png',
-        title: '演奏Mlog达人',
+        title: '演奏Mlog老师',
         des: '个人风采中上传老师风采视频并通过审核'
       },
       {
         icon: 'video_active.png',
-        title: '教学视频达人',
+        title: '教学视频老师',
         des: '发布您制作的教学视频课程并通过审核'
       },
       {
         icon: 'live_active.png',
-        title: '直播up达人',
+        title: '直播up老师',
         des: '达到开通直播权限标准并开通直播功能'
       },
       {
         icon: 'music_active.png',
-        title: '乐谱歌单达人',
+        title: '乐谱歌单老师',
         des: '上传您制作的乐谱并通过审核'
       }
     ]

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

@@ -75,7 +75,7 @@ export default defineComponent({
         this.backIconColor = 'white'
       }
     })
-    useEventTracking('达人风采')
+    useEventTracking('老师风采')
   },
   methods: {
     stickyHeight() {

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

@@ -435,7 +435,7 @@ export const tradeOrder = async (result: any, callBack?: any) => {
       }
     })
     orderDetails[0] && (orderDetails[0].activityList = orderDetailsActivity)
-    console.log(orderDetails, 'orderDetails')
+    // console.log(orderDetails, 'orderDetails')
     orderDetails.forEach(async (item: any) => {
       const child = await formatOrderDetail(item, {
         couponAmount,

+ 3 - 0
src/teacher/layout/login-cert.tsx

@@ -31,6 +31,9 @@ export default defineComponent({
       return status
     }
   },
+  created() {
+    document.title = '酷乐秀学院老师入驻'
+  },
   mounted() {
     removeAuth()
     const userInfo = sessionStorage.getItem('login-cert-store')

+ 6 - 6
src/teacher/music-cert/index.tsx

@@ -41,10 +41,10 @@ export default defineComponent({
       postMessage({ api: 'setBarStatus', content: { status: 1 } })
     }
 
-    // 如果没有达人认证,则需要先去认证
+    // 如果没有老师认证,则需要先去认证
     if (!state.user.data?.entryFlag) {
       Dialog.alert({
-        message: '您尚未完成达人认证,达人认证后才可开通音乐人权限哦!',
+        message: '您尚未完成老师认证,老师认证后才可开通音乐人权限哦!',
         confirmButtonColor: '#2DC7AA'
       }).then(() => {
         this.$router.replace('/teacherCert')
@@ -97,7 +97,7 @@ export default defineComponent({
                   <div class={styles.content}>
                     <div class={styles.subTitle}>
                       <img src={getAssetsHomeFile('1.png')} />
-                      <span>教学视频分享达人</span>
+                      <span>教学视频分享老师</span>
                     </div>
                     <div class={styles.subConent}>
                       发布您制作的教学视频内容,展现不同类型的学习方式
@@ -113,7 +113,7 @@ export default defineComponent({
                   <div class={styles.content}>
                     <div class={styles.subTitle}>
                       <img src={getAssetsHomeFile('2.png')} />
-                      <span>演奏Mlog达人</span>
+                      <span>演奏Mlog老师</span>
                     </div>
                     <div class={styles.subConent}>
                       发布自己演奏的音乐Mlog,让学员深入了解您的专业技能,从而提升您的关注率
@@ -129,7 +129,7 @@ export default defineComponent({
                   <div class={styles.content}>
                     <div class={styles.subTitle}>
                       <img src={getAssetsHomeFile('3.png')} />
-                      <span>直播up达人</span>
+                      <span>直播up老师</span>
                     </div>
                     <div class={styles.subConent}>
                       利用平台专为器乐演奏研发的直播教室,可进行一对一或开启直播间在线分内容,技巧等
@@ -145,7 +145,7 @@ export default defineComponent({
                   <div class={styles.content}>
                     <div class={styles.subTitle}>
                       <img src={getAssetsHomeFile('4.png')} />
-                      <span>乐谱歌单达人</span>
+                      <span>乐谱歌单老师</span>
                     </div>
                     <div class={styles.subConent}>
                       上传您制作的MIDI乐谱,结合小酷Ai给音乐爱好者自主练习的途径

+ 1 - 1
src/teacher/open-live/index.tsx

@@ -58,7 +58,7 @@ export default defineComponent({
         }
       })
 
-      // 如果没有达人认证,则需要先去认证
+      // 如果没有老师认证,则需要先去认证
       if (!state.user.data?.entryFlag) {
         Dialog.alert({
           message: '您尚未完成老师认证,认证后才可开通直播权限哦!',

+ 1 - 1
src/teacher/piano-room/index.tsx

@@ -248,7 +248,7 @@ export default defineComponent({
       } catch {}
     },
     onTeacherAuth(callBack: any) {
-      // 是否达人认证
+      // 是否老师认证
       // 老师入驻状态 0、未申请 UNPAALY、未申请 DOING、审核中 PASS、通过 UNPASS、不通过,可用值:UNPAALY,DOING,PASS,UNPASS
       const data = state.user.data
       if (data.entryStatus === 'PASS') {

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

@@ -139,7 +139,7 @@ export default defineComponent({
               </div>
               <div>
                 <div class={styles.comentTitle}>
-                  快进入达人的直播间一起围观~
+                  快进入老师的直播间一起围观~
                 </div>
                 <div class={styles.comentDes}>
                   {this.teacher.realName || this.student.username} 为您推荐

+ 8 - 8
src/teacher/teacher-cert/cert-info.tsx

@@ -45,11 +45,11 @@ export default defineComponent({
           <div class={styles.section}>
             <div class={styles.title}>
               <img src={getAssetsHomeFile('1.png')} />
-              什么是酷乐秀音乐达人
+              什么是酷乐秀音乐老师
             </div>
 
             <p class={styles.content}>
-              酷乐秀音乐人是酷乐秀优质的内容创作提供者,包含乐谱歌单达人,教学视频分享达人,演奏MLog达人,直播up达人
+              酷乐秀音乐人是酷乐秀优质的内容创作提供者,包含乐谱歌单老师,教学视频分享老师,演奏MLog老师,直播up老师
             </p>
 
             <div class={styles.operation}>
@@ -67,7 +67,7 @@ export default defineComponent({
               </div>
               <div class={styles.item}>
                 <img src={getAssetsHomeFile('logo4.png')} />
-                <p>直播up达人</p>
+                <p>直播up老师</p>
               </div>
             </div>
           </div>
@@ -75,23 +75,23 @@ export default defineComponent({
           <div class={styles.section}>
             <div class={styles.title}>
               <img src={getAssetsHomeFile('2.png')} />
-              酷乐秀能为达人提供哪些服务?
+              酷乐秀能为老师提供哪些服务?
             </div>
 
             <p class={styles.content}>
-              酷乐秀提供现金激励,商业分成等福利政策,帮助达人内容变现,
-              提供流量扶持等政策,帮助达人推广优质內容。
+              酷乐秀提供现金激励,商业分成等福利政策,帮助老师内容变现,
+              提供流量扶持等政策,帮助老师推广优质內容。
             </p>
           </div>
 
           <div class={styles.section}>
             <div class={styles.title}>
               <img src={getAssetsHomeFile('3.png')} />
-              成为酷乐秀达人的意义是什么?
+              成为酷乐秀老师的意义是什么?
             </div>
 
             <p class={styles.content}>
-              酷乐秀给所有热爱音乐热爱分享热爱转播技能的达人一个分享交流创作的平台,让音乐圈无圈,让爱好者无界。
+              酷乐秀给所有热爱音乐热爱分享热爱转播技能的老师一个分享交流创作的平台,让音乐圈无圈,让爱好者无界。
             </p>
           </div>
         </div>

+ 80 - 84
src/teacher/teacher-cert/index.tsx

@@ -158,91 +158,87 @@ export default defineComponent({
   render() {
     return (
       <div class={styles['teacher-cert']}>
-        {!teacherState.authStatus ? (
-          <CertInfo />
-        ) : (
-          <div>
-            {teacherState.active != 4 ? (
-              <>
-                <ColHeader />
-                <Steps style={{ marginBottom: '12px' }} />
-              </>
-            ) : null}
-            {teacherState.active === 1 ? (
-              <>
-                <CertOne />
-                <div class={'btnGroup'}>
-                  <ColProtocol
-                    v-model={this.agreeStatus}
-                    prototcolType="REGISTER"
-                    style={{ paddingLeft: 0, paddingRight: 0 }}
-                  />
-                  <Button
-                    block
-                    round
-                    onClick={this.next}
-                    type="primary"
-                    text="下一步"
-                  />
-                </div>
-              </>
-            ) : null}
-            {teacherState.active === 2 ? (
-              <>
-                <CertTwo />
-                <div class={['btnGroup', 'btnMore']}>
-                  <Button block round type="primary" plain onClick={this.prev}>
-                    上一步
-                  </Button>
-                  <Button
-                    block
-                    round
-                    onClick={this.next2}
-                    type="primary"
-                    text="下一步"
-                  />
-                </div>
-              </>
-            ) : null}
-            {teacherState.active === 3 ? (
-              <>
-                <CertThree />
-                <div class={['btnGroup', 'btnMore']}>
-                  <Button block round type="primary" plain onClick={this.prev}>
-                    上一步
-                  </Button>
-                  <Button
-                    block
-                    round
-                    onClick={this.onSubmit}
-                    type="primary"
-                    text="提交审核"
-                  />
-                </div>
-              </>
-            ) : null}
-
-            {teacherState.active === 4 ? (
-              <>
-                <ColHeader />
-                <ColResult
-                  type="teacherCert"
-                  style={{ paddingTop: '60px' }}
-                  classImgSize="CERT"
-                  buttonText={browser().isApp ? '我知道了' : '下载酷乐秀学院'}
-                  tips="感谢您的申请,小酷将在24小时内完成审核,请留意APP消息及短信获取审核结果。"
-                  onClick={() => {
-                    if (browser().isApp) {
-                      postMessage({ api: 'back', content: {} })
-                    } else {
-                      window.open(location.origin + '/student/#/download?type=teacher')
-                    }
-                  }}
+        <div>
+          {teacherState.active != 4 ? (
+            <>
+              {browser().isApp ? <ColHeader /> : ''}
+              <Steps style={{ marginBottom: '12px' }} />
+            </>
+          ) : null}
+          {teacherState.active === 1 ? (
+            <>
+              <CertOne />
+              <div class={'btnGroup'}>
+                <ColProtocol
+                  v-model={this.agreeStatus}
+                  prototcolType="REGISTER"
+                  style={{ paddingLeft: 0, paddingRight: 0 }}
+                />
+                <Button
+                  block
+                  round
+                  onClick={this.next}
+                  type="primary"
+                  text="下一步"
+                />
+              </div>
+            </>
+          ) : null}
+          {teacherState.active === 2 ? (
+            <>
+              <CertTwo />
+              <div class={['btnGroup', 'btnMore']}>
+                <Button block round type="primary" plain onClick={this.prev}>
+                  上一步
+                </Button>
+                <Button
+                  block
+                  round
+                  onClick={this.next2}
+                  type="primary"
+                  text="下一步"
                 />
-              </>
-            ) : null}
-          </div>
-        )}
+              </div>
+            </>
+          ) : null}
+          {teacherState.active === 3 ? (
+            <>
+              <CertThree />
+              <div class={['btnGroup', 'btnMore']}>
+                <Button block round type="primary" plain onClick={this.prev}>
+                  上一步
+                </Button>
+                <Button
+                  block
+                  round
+                  onClick={this.onSubmit}
+                  type="primary"
+                  text="提交审核"
+                />
+              </div>
+            </>
+          ) : null}
+
+          {teacherState.active === 4 ? (
+            <>
+              <ColHeader />
+              <ColResult
+                type="teacherCert"
+                style={{ paddingTop: '60px' }}
+                classImgSize="CERT"
+                buttonText={browser().isApp ? '我知道了' : '下载酷乐秀学院'}
+                tips="感谢您的申请,小酷将在24小时内完成审核,请留意APP消息及短信获取审核结果。"
+                onClick={() => {
+                  if (browser().isApp) {
+                    postMessage({ api: 'back', content: {} })
+                  } else {
+                    window.open(location.origin + '/student/#/download?type=teacher')
+                  }
+                }}
+              />
+            </>
+          ) : null}
+        </div>
       </div>
     )
   }

+ 2 - 2
src/teacher/teacher-cert/teacher-cert-update/index.tsx

@@ -18,10 +18,10 @@ export default defineComponent({
   },
   async mounted() {
     try {
-      // 判断是否达人认证
+      // 判断是否老师认证
       if (!state.user.data?.entryFlag) {
         Dialog.alert({
-          message: '您尚未完成达人认证,达人认证后才可更新资料哦!',
+          message: '您尚未完成老师认证,老师认证后才可更新资料哦!',
           confirmButtonColor: '#2DC7AA'
         }).then(() => {
           this.$router.replace('/teacherCert')

+ 4 - 4
src/teacher/teacher-dependent/model/teacher-header.tsx

@@ -82,22 +82,22 @@ export default defineComponent({
     const iconList = [
       {
         icon: 'cert_active.png',
-        title: '演奏Mlog达人',
+        title: '演奏Mlog老师',
         des: '个人风采中上传老师风采视频并通过审核'
       },
       {
         icon: 'video_active.png',
-        title: '教学视频达人',
+        title: '教学视频老师',
         des: '发布您制作的教学视频课程并通过审核'
       },
       {
         icon: 'live_active.png',
-        title: '直播up达人',
+        title: '直播up老师',
         des: '达到开通直播权限标准并开通直播功能'
       },
       {
         icon: 'music_active.png',
-        title: '乐谱歌单达人',
+        title: '乐谱歌单老师',
         des: '上传您制作的乐谱并通过审核'
       }
     ]

+ 153 - 123
src/views/order-detail/index.tsx

@@ -121,7 +121,14 @@ export default defineComponent({
     },
     countDiscountPrice() {
       const orderObject = orderStatus.orderObject
-      return orderObject.couponAmount || numberToTwoDown(orderObject.couponDiscountPrice + orderObject.discountPrice + orderObject.discountCardPrice)
+      return (
+        orderObject.couponAmount ||
+        numberToTwoDown(
+          orderObject.couponDiscountPrice +
+            orderObject.discountPrice +
+            orderObject.discountCardPrice
+        )
+      )
     }
   },
   async mounted() {
@@ -161,7 +168,6 @@ export default defineComponent({
     // 初始化所有商品的类型
     const orderList = orderStatus.orderObject.orderList || []
     const tempGoodsType: any = []
-    console.log(orderList, 'orderList, ')
     orderList.forEach((order: any) => {
       tempGoodsType.push({
         orderType: order.orderType,
@@ -220,48 +226,49 @@ export default defineComponent({
     async getOrderPayType() {
       try {
         const orderObject = orderStatus.orderObject
-        // 单独处理其它支付类型下面用的bizId
-        let bizId =
-          orderObject.orderList.length > 0 ? orderObject.orderList[0].id : ''
-        if (orderObject.orderType === 'PRACTICE') {
-          bizId =
-            orderObject.orderList.length > 0
-              ? orderObject.orderList[0].teacherId
-              : ''
-        }
-        if (
-          orderObject.orderType === 'LIVE' ||
-          orderObject.orderType === 'VIDEO'
-        ) {
-          bizId =
-            orderObject.orderList.length > 0
-              ? orderObject.orderList[0].courseGroupId
-              : ''
-        }
-        const { data } = await request.post(
-          state.platformApi + '/userOrder/orderPayType',
-          {
-            data: {
-              goodType: orderObject.orderType,
-              bizId,
-              recomUserId: orderObject.recomUserId
-                ? orderObject.recomUserId
-                : null
-            }
-          }
-        )
-
         // 判断是否已经有支付方式了
         const paymentConfig = orderStatus.orderObject.paymentConfig || {}
         if (paymentConfig.paymentVersion && orderStatus.orderObject.orderNo) {
           this.paymentVersion = paymentConfig.paymentVersion || 'V1'
           this.paymentVendor = paymentConfig.paymentVendor
         } else {
+          // 单独处理其它支付类型下面用的bizId
+          const orderItem = orderObject.orderList.find(
+            (item: any) => item.orderType === this.orderType
+          )
+          let bizId = orderItem ? orderItem.id : ''
+          if (orderObject.orderType === 'PRACTICE') {
+            const orderItem = orderObject.orderList.find(
+              (item: any) => item.orderType === 'PRACTICE'
+            )
+            bizId = orderItem ? orderItem.teacherId : ''
+          }
+          if (
+            orderObject.orderType === 'LIVE' ||
+            orderObject.orderType === 'VIDEO'
+          ) {
+            const orderItem = orderObject.orderList.find(
+              (item: any) =>
+                item.orderType === 'VIDEO' || item.orderType === 'LIVE'
+            )
+            bizId = orderItem ? orderItem.courseGroupId : ''
+          }
+          const { data } = await request.post(
+            state.platformApi + '/userOrder/orderPayType',
+            {
+              data: {
+                goodType: orderObject.orderType,
+                bizId,
+                recomUserId: orderObject.recomUserId
+                  ? orderObject.recomUserId
+                  : null
+              }
+            }
+          )
           this.paymentVersion = data.paymentVersion || 'V1'
           this.paymentVendor = data.paymentVendor
+          this.paymentChannels = data.paymentChannels // 可以选择的支付类型
         }
-
-        this.paymentChannels = data.paymentChannels // 可以选择的支付类型
       } catch {
         //
       }
@@ -293,7 +300,7 @@ export default defineComponent({
         } else {
           this.orderInfo = orderStatus.orderObject || {}
           this.orderNo = orderStatus.orderObject.orderNo
-          const paymentChannel =  this.orderInfo.paymentConfig.paymentChannel
+          const paymentChannel = this.orderInfo.paymentConfig.paymentChannel
           // 判断是否为原生支付
           if (
             this.orderInfo.paymentVendor?.indexOf('wxpay') > -1 ||
@@ -363,13 +370,14 @@ export default defineComponent({
               : '/api-student/userOrder/executeOrder/v2'
 
           const goods: any = orderTenantInfos()
-          if(this.selectGoods && this.selectGoods.length > 0) {
+          if (this.selectGoods && this.selectGoods.length > 0) {
             goods.push(...orderTenantInfos(this.selectGoods))
           }
 
           const res = await request.post(url, {
             data: {
-              activityId: orderObject.activityId > 0 ? orderObject.activityId : null,
+              activityId:
+                orderObject.activityId > 0 ? orderObject.activityId : null,
               couponIds: orderObject.couponId,
               goodsInfos: goods,
               orderDesc: orderObject.orderDesc,
@@ -450,8 +458,8 @@ export default defineComponent({
       const lastAmount = Number(
         numberToTwoUp(
           Number(this.orderAmount) -
-          orderStatus.orderObject.discountCardPrice -
-          Number(discountCount)
+            orderStatus.orderObject.discountCardPrice -
+            Number(discountCount)
         )
       )
       this.orderPrice = lastAmount >= 0 ? lastAmount : 0
@@ -463,33 +471,33 @@ export default defineComponent({
       orderStatus.orderObject.couponDiscountPrice = discountCount
     },
     onConfirm(val: any) {
-        // debugger
-        const config: any = this.orderInfo.paymentConfig || {}
-        this.pay_channel = val.pay_channel
-        const params = qs.stringify({
-          pay_channel: val.pay_channel,
-          wxAppId: config.wxAppId,
-          alipayAppId: config.alipayAppId,
-          paymentType: this.orderInfo.paymentType,
-          body: config.body,
-          price: config.price,
-          orderNo: config.merOrderNo,
-          userId: config.userId
-        })
-        orderStatus.orderObject.paymentConfig.paymentChannel = val.pay_channel
-        if (val.payCode === 'payResult') {
-          window.location.href =
-            window.location.origin + state.payBackPath + '#/payResult?' + params
-        } else {
-          this.qrCodeUrl =
-            window.location.origin + state.payBackPath + '#/payDefine?' + params
-          this.showQrcode = true
-          this.paymentStatus = false
-
-          setTimeout(() => {
-            this.getPaymentOrderStatus()
-          }, 300)
-        }
+      // debugger
+      const config: any = this.orderInfo.paymentConfig || {}
+      this.pay_channel = val.pay_channel
+      const params = qs.stringify({
+        pay_channel: val.pay_channel,
+        wxAppId: config.wxAppId,
+        alipayAppId: config.alipayAppId,
+        paymentType: this.orderInfo.paymentType,
+        body: config.body,
+        price: config.price,
+        orderNo: config.merOrderNo,
+        userId: config.userId
+      })
+      orderStatus.orderObject.paymentConfig.paymentChannel = val.pay_channel
+      if (val.payCode === 'payResult') {
+        window.location.href =
+          window.location.origin + state.payBackPath + '#/payResult?' + params
+      } else {
+        this.qrCodeUrl =
+          window.location.origin + state.payBackPath + '#/payDefine?' + params
+        this.showQrcode = true
+        this.paymentStatus = false
+
+        setTimeout(() => {
+          this.getPaymentOrderStatus()
+        }, 300)
+      }
     },
     // 轮询查询订单状态
     async getPaymentOrderStatus() {
@@ -566,27 +574,29 @@ export default defineComponent({
                     item={item}
                     disabled={this.disabledCoupon}
                     onPriceChange={(price: number) => {
+                      
+                      // 畅学卡变更状态时需要重新选择优惠券
+                      orderStatus.orderObject.couponId = ''
+                      orderStatus.orderObject.couponDiscountPrice = 0
                       // 重置金额
                       this.orderAmount = Number(price)
                       const lastAmount = Number(
                         numberToTwoUp(
                           Number(this.orderAmount) -
-                          Number(orderStatus.orderObject.couponDiscountPrice)
+                            Number(item.discountPrice) -
+                            Number(orderStatus.orderObject.couponDiscountPrice)
                         )
                       )
                       this.orderPrice = lastAmount >= 0 ? lastAmount : 0
 
-                      this.orderGoodsType.forEach((child: any)=> {
-                        if(child.orderType === item.orderType) {
+                      this.orderGoodsType.forEach((child: any) => {
+                        if (child.orderType === item.orderType) {
                           child.price = Number(price)
                         }
                       })
-                      // 畅学卡变更状态时需要重新选择优惠券
-                      orderStatus.orderObject.couponId = ''
-                      orderStatus.orderObject.couponDiscountPrice = 0
                       // 更新优惠券列表
-                      const useCouponRef: any =  this.$refs.useCouponRef
-                      if(useCouponRef) {
+                      const useCouponRef: any = this.$refs.useCouponRef
+                      if (useCouponRef) {
                         useCouponRef.resetCouponList()
                       }
                     }}
@@ -608,27 +618,27 @@ export default defineComponent({
                     disabled={this.disabledCoupon}
                     item={item}
                     onPriceChange={(price: number) => {
+                      // 畅学卡变更状态时需要重新选择优惠券
+                      orderStatus.orderObject.couponId = ''
+                      orderStatus.orderObject.couponDiscountPrice = 0
                       // 重置金额
                       this.orderAmount = Number(price)
                       const lastAmount = Number(
                         numberToTwoUp(
                           Number(this.orderAmount) -
-                          Number(orderStatus.orderObject.couponDiscountPrice)
+                            Number(orderStatus.orderObject.couponDiscountPrice)
                         )
                       )
                       this.orderPrice = lastAmount >= 0 ? lastAmount : 0
 
-                      this.orderGoodsType.forEach((child: any)=> {
-                        if(child.orderType === item.orderType) {
+                      this.orderGoodsType.forEach((child: any) => {
+                        if (child.orderType === item.orderType) {
                           child.price = Number(price)
                         }
                       })
-                      // 畅学卡变更状态时需要重新选择优惠券
-                      orderStatus.orderObject.couponId = ''
-                      orderStatus.orderObject.couponDiscountPrice = 0
                       // 更新优惠券列表
-                      const useCouponRef: any =  this.$refs.useCouponRef
-                      if(useCouponRef) {
+                      const useCouponRef: any = this.$refs.useCouponRef
+                      if (useCouponRef) {
                         useCouponRef.resetCouponList()
                       }
                     }}
@@ -657,22 +667,24 @@ export default defineComponent({
                     item.discountPrice
                   )
 
-                  this.orderGoodsType.forEach((child: any)=> {
-                    if(child.orderType !== 'DISCOUNT') {
-                      child.price = numberToTwoUp(child.price - Number(item.discountPrice))
+                  this.orderGoodsType.forEach((child: any) => {
+                    if (child.orderType !== 'DISCOUNT') {
+                      child.price = numberToTwoUp(
+                        child.price - Number(item.discountPrice)
+                      )
                     }
                   })
 
                   // 更新优惠券列表
-                  const useCouponRef: any =  this.$refs.useCouponRef
-                  if(useCouponRef) {
+                  const useCouponRef: any = this.$refs.useCouponRef
+                  if (useCouponRef) {
                     useCouponRef.resetCouponList()
                   }
                   this.orderPrice = Number(
                     numberToTwoUp(
                       Number(this.orderAmount) -
-                      Number(item.discountPrice) -
-                      Number(orderStatus.orderObject.couponDiscountPrice)
+                        Number(item.discountPrice) -
+                        Number(orderStatus.orderObject.couponDiscountPrice)
                     )
                   )
                 }}
@@ -696,9 +708,11 @@ export default defineComponent({
                     orderStatus.orderObject.discountCardPrice = Number(
                       item.discountPrice
                     )
-                    this.orderGoodsType.forEach((child: any)=> {
-                      if(child.orderType !== 'DISCOUNT') {
-                        child.price = numberToTwoUp(child.price - Number(item.discountPrice))
+                    this.orderGoodsType.forEach((child: any) => {
+                      if (child.orderType !== 'DISCOUNT') {
+                        child.price = numberToTwoUp(
+                          child.price - Number(item.discountPrice)
+                        )
                       }
                     })
                     if (index === -1) {
@@ -709,8 +723,10 @@ export default defineComponent({
                         num: 1,
                         id: item.id
                       })
-                      const typeIndex = tempType.findIndex((child: any) => child.orderType === item.vipType)
-                      if(typeIndex === -1) {
+                      const typeIndex = tempType.findIndex(
+                        (child: any) => child.orderType === item.vipType
+                      )
+                      if (typeIndex === -1) {
                         tempType.push({
                           orderType: item.vipType,
                           price: item.salePrice
@@ -722,13 +738,15 @@ export default defineComponent({
                     if (index !== -1) {
                       this.selectGoods.splice(index, 1)
                       this.orderAmount = this.orderAmount - item.salePrice
-                      this.orderGoodsType.forEach((child: any)=> {
-                        if(child.orderType !== 'DISCOUNT') {
+                      this.orderGoodsType.forEach((child: any) => {
+                        if (child.orderType !== 'DISCOUNT') {
                           child.price = child.basePrice
                         }
                       })
-                      const typeIndex = tempType.findIndex((child: any) => child.orderType === item.vipType)
-                      if(typeIndex !== -1) {
+                      const typeIndex = tempType.findIndex(
+                        (child: any) => child.orderType === item.vipType
+                      )
+                      if (typeIndex !== -1) {
                         tempType.splice(typeIndex, 1)
                       }
                     }
@@ -736,16 +754,16 @@ export default defineComponent({
                   this.orderGoodsType = tempType
 
                   // 更新优惠券列表
-                  const useCouponRef: any =  this.$refs.useCouponRef
-                  if(useCouponRef) {
+                  const useCouponRef: any = this.$refs.useCouponRef
+                  if (useCouponRef) {
                     // console.log(useCouponRef, 'useCouponRef')
                     useCouponRef.resetCouponList()
                   }
                   this.orderPrice = Number(
                     numberToTwoUp(
                       Number(this.orderAmount) -
-                      Number(item.discountPrice) -
-                      Number(orderStatus.orderObject.couponDiscountPrice)
+                        Number(item.discountPrice) -
+                        Number(orderStatus.orderObject.couponDiscountPrice)
                     )
                   )
                   this.$forceUpdate()
@@ -757,23 +775,32 @@ export default defineComponent({
 
             {/* 只做显示用 - 不参与逻辑 */}
             {state.platformType === 'STUDENT' &&
-              !this.dataLoading &&
-              this.disabledCoupon && orderStatus.orderObject.discountCardPrice > 0 ? <CellGroup class={['mb12', styles.cellGroup]} border={false}>
-              <Cell
-                center
-                v-slots={{
-                  title: () => (
-                    <div class={styles.timerCell}>
-                      <div class={styles.timerTitle}>
-                        <span>畅学卡优惠</span>
+            !this.dataLoading &&
+            this.disabledCoupon &&
+            orderStatus.orderObject.discountCardPrice > 0 ? (
+              <CellGroup class={['mb12', styles.cellGroup]} border={false}>
+                <Cell
+                  center
+                  v-slots={{
+                    title: () => (
+                      <div class={styles.timerCell}>
+                        <div class={styles.timerTitle}>
+                          <span>畅学卡优惠</span>
+                        </div>
+                        <div class={styles.timer}>
+                          -¥
+                          {(this as any).$filters.moneyFormat(
+                            orderStatus.orderObject.discountCardPrice
+                          )}
+                        </div>
                       </div>
-                      <div class={styles.timer}>-¥{(this as any).$filters.moneyFormat(orderStatus.orderObject.discountCardPrice)}</div>
-                    </div>
-                  )
-                }}
-              />
-            </CellGroup> : '' }
-        
+                    )
+                  }}
+                />
+              </CellGroup>
+            ) : (
+              ''
+            )}
 
             {/* 优惠券使用 */}
             {!this.dataLoading && (
@@ -823,7 +850,13 @@ export default defineComponent({
                         </span>
                       </div>
                     </div>
-                    {this.countDiscountPrice > 0 ? <div class={styles.isDiscountPrice}>已优惠 ¥{moneyFormat(this.countDiscountPrice)}</div> : ''}
+                    {this.countDiscountPrice > 0 ? (
+                      <div class={styles.isDiscountPrice}>
+                        已优惠 ¥{moneyFormat(this.countDiscountPrice)}
+                      </div>
+                    ) : (
+                      ''
+                    )}
                   </div>
                 </div>
                 <Button
@@ -862,9 +895,6 @@ export default defineComponent({
               onBackOut={this.onBackOut}
             />
           ) : (
-            //      this.paymentVersion = data.paymentVersion || 'V1'
-            // this.paymentVendor = data.paymentVendor
-            // this.paymentChannels = data.paymentChannels // 可以选择的支付类型
             <UrlPayment
               paymentConfig={{
                 ...orderStatus.orderObject,

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

@@ -1,5 +1,5 @@
 .album {
-  margin: 12px 14px;
+  margin: 12px 0;
   padding: 10px;
   background-color: var(--music-list-item-background-color);
   border-radius: 10px;

+ 12 - 5
src/views/order-detail/use-coupons/choice-coupon.tsx

@@ -93,22 +93,29 @@ export default defineComponent({
           usedMap.set(item.couponCategory, (price || 0) + item.useLimit)
         })
 
+        usedMap.values()
         // 判断使用优惠券之后还有没有其它优惠券可用
         this.list.forEach((item: any) => {
           let disabled = true
           if(item.couponCategory === 'UNIVERSAL') {
+            // 订单总金额 
+            let allAmount = 0
             this.orderGoodsType.forEach((goods: any) => {
-              const useLastAmount = goods ? goods.price - (usedMap.get(item.couponCategory) || 0) : 0
-              if(Number(item.useLimit) <= useLastAmount && disabled) {
-                disabled = false
-              }
+              allAmount += goods.price
             })
+            // 已使用优惠券总金额
+            let useCouponMoney = 0
+            if(usedMap.size > 0) {
+              useCouponMoney = usedMap.values().reduce((a: any, b: any) => {
+                return a + b
+             })
+            }
+            disabled = item.useLimit > allAmount - useCouponMoney
           } else {
             const disItem: any = this.orderGoodsType.find((goods: any) => couponEnum[goods.orderType] === item.couponCategory)
             const useLastAmount = disItem ? disItem.price - (usedMap.get(item.couponCategory) || 0) : 0
             disabled = Number(item.useLimit) > useLastAmount
           }
-          
           if (!item.checked && (useList.length > 0  || disabled)) {
             item.disabled = true
           } else {

+ 3 - 5
src/views/order-detail/use-coupons/index.tsx

@@ -143,13 +143,11 @@ export default defineComponent({
         this.list.forEach((item: any) => {
           item.checked = false
           if(item.couponCategory === 'UNIVERSAL') {
-            let disabled = true;
+            let allAmount = 0
             this.orderGoodsType.forEach((goods: any) => {
-              if(item.useLimit <= goods.price && disabled) {
-                disabled = false
-              }
+              allAmount += Number(goods.price)
             })
-            item.disabled = disabled
+            item.disabled = item.useLimit <= allAmount ? false : true
           } else {
             const disItem: any = this.orderGoodsType.find((goods: any) => couponEnum[goods.orderType] === item.couponCategory)
             const useLastAmount = disItem.price || 0

+ 1 - 1
src/views/protocol/register.tsx

@@ -37,7 +37,7 @@ export default defineComponent({
           <br />
           4.酷乐秀是一个信息分享、传播及获取的平台,用户通过酷乐秀发表的信息为公开的信息,其他第三方均可以通过酷乐秀获取用户发表的信息,用户对任何信息的发表即认可该信息为公开的信息,并单独对此行为承担法律责任;任何用户不愿被其他第三人获知的信息都不应该在酷乐秀上进行发表。
           <br />
-          5.为了更好地维护乐谱,酷乐秀会将认证为“达人”的用户上传的高质量乐谱设置成VIP。
+          5.为了更好地维护乐谱,酷乐秀会将认证为“老师”的用户上传的高质量乐谱设置成VIP。
           <br />
           6.您的上传行为代表您同意您上传的作品在本站内的公开发布与传播并授权本站使用您上传的作品。任何第三方的转载行为与本站无关。
           <br />