lex-wxl 1 week ago
parent
commit
7b164da558
2 changed files with 8 additions and 17 deletions
  1. 5 14
      src/tenant/music/train-tool/index.tsx
  2. 3 3
      src/views/music/music-detail/index.tsx

+ 5 - 14
src/tenant/music/train-tool/index.tsx

@@ -19,8 +19,7 @@ import {
   Picker,
   DropdownMenu,
   DropdownItem,
-  Tag,
-  Toast
+  Tag
 } from 'vant'
 import styles from './index.module.less'
 import TheSticky from '@/components/the-sticky'
@@ -465,11 +464,6 @@ export default defineComponent({
       }, 0)
     }
     const onSubmit = async () => {
-      if(baseState.platformType === 'TEACHER') {
-        Toast('请联系平台客服开通权限')
-        return
-      }
-
       const album = state.details
       const details = state.details
       orderStatus.orderObject.orderType = 'TENANT_ALBUM'
@@ -753,8 +747,7 @@ export default defineComponent({
                     </div>
                   </div>
 
-                  {/* && baseState.platformType === 'STUDENT' */}
-                  {state.buy != '1'  && (
+                  {state.buy != '1' && baseState.platformType === 'STUDENT' && (
                     <div class={styles.albumPriceGroup}>
                       <div class={styles.albumTimer}>
                         <img
@@ -1134,8 +1127,7 @@ export default defineComponent({
                   </List>
                 </div>
               </div>
-              {/* baseState.platformType === 'STUDENT' &&  */}
-              {state.buy != '1' && (
+              {baseState.platformType === 'STUDENT' && state.buy != '1' && (
                 <TheSticky
                   position="bottom"
                   varName="--bottom-train-tool-height"
@@ -1149,11 +1141,10 @@ export default defineComponent({
                       onClick={onSubmit}
                     >
                       {/* 开通训练教程 */}
-                      {baseState.platformType === 'STUDENT' && <span >
+                      <span>
                         ¥{state.details?.actualPrice || 0}/
                         {state.details?.purchaseNum || 0}天
-                      </span>}
-
+                      </span>
                       <span>
                         {state.details?.albumStatus === 'NO_BUY'
                           ? '立即开通'

+ 3 - 3
src/views/music/music-detail/index.tsx

@@ -1187,10 +1187,10 @@ export default defineComponent({
                     </>
                   )}
                 </div>
-                {/* 判断是否是免费的,或者已经购买过,是否从专辑过来的 */}
+                {/* 判断是否是免费的,或者已经购买过,是否从专辑过来的 ||
+                (state.platformType === 'TEACHER' */}
                 {buyState.value.play ||
-                (state.platformType === 'TEACHER' &&
-                  buyState.value.hasTenantAlbum) ? (
+                  buyState.value.hasTenantAlbum ? (
                   <Button
                     round
                     block