lex-xin 1 week ago
parent
commit
448e5ef62c
1 changed files with 7 additions and 7 deletions
  1. 7 7
      src/tenant/music/music-detail/new-index.tsx

+ 7 - 7
src/tenant/music/music-detail/new-index.tsx

@@ -89,7 +89,8 @@ export default defineComponent({
      /** 当前用户会员状态 动态判断vip svip */
     const userMemberStatus = computed(() => {
       const userInfo = state.user.data || {}
-      const status = userInfo.userVip?.vipType === 'NOT_VIP' || !userInfo.userVip?.vipType || userInfo.phone === '18888888888'
+      // userInfo.userVip?.vipType === 'NOT_VIP' || !userInfo.userVip?.vipType || 
+      const status = userInfo.phone === '18888888888'
       return status
     })
 
@@ -386,9 +387,9 @@ export default defineComponent({
       return {
         hasTenantAlbum: route.query?.tenantAlbumId ? true : false, // 是否从专辑来的
         play: music.play ? true : false, // 是否可以播放
-        free: music?.paymentType.includes('FREE'),
-        charge: music?.paymentType.includes('CHARGE'),
-        vip: music?.paymentType.includes('VIP'),
+        free: music?.paymentType?.includes('FREE'),
+        charge: music?.paymentType?.includes('CHARGE'),
+        vip: music?.paymentType?.includes('VIP'),
         buy: music?.orderStatus === 'PAID' // 是否已买
       }
     })
@@ -881,21 +882,20 @@ export default defineComponent({
           </div>
           <div class={[styles.alumCollect]}>
             {/* 是会员 */}
-            
             {!hideTenantDownload.value && <div
               class={[
                 styles.alumCollectItem,
                 staffData.imgs.length <= 0 && !staffData.musicPdfUrl
                   ? styles.alumCollectItemActive
                   : '',
-                userMemberStatus.value ? styles.alumCollectItemActive : ''
+                userMemberStatus.value || !buyState.value.play ? styles.alumCollectItemActive : ''
               ]}
               onClick={() => {
                 if (browser().isApp) {
                   if (staffData.imgs.length <= 0 && !staffData.musicPdfUrl)
                     return
 
-                  if(userMemberStatus.value) return
+                  if(userMemberStatus.value || !buyState.value.play) return
                   if (staffData.musicPdfUrl) {
                     const songName =
                       staffData.details?.name +