Browse Source

Update index.tsx

lex 2 years ago
parent
commit
aef7325359
1 changed files with 16 additions and 14 deletions
  1. 16 14
      src/views/music/album-detail/index.tsx

+ 16 - 14
src/views/music/album-detail/index.tsx

@@ -337,7 +337,8 @@ export default defineComponent({
                 <div
                   class={[
                     'btnGroup',
-                    albumDetail.value?.musicPaymentTypes.includes('VIP') &&
+                    albumDetail.value?.musicPaymentTypes &&
+                      albumDetail.value?.musicPaymentTypes.includes('VIP') &&
                       'btnMore'
                   ]}
                   style={{ paddingTop: '12px' }}
@@ -351,19 +352,20 @@ export default defineComponent({
                   >
                     购买专辑
                   </Button>
-                  {albumDetail.value?.musicPaymentTypes.includes('VIP') && (
-                    <Button
-                      block
-                      round
-                      type="primary"
-                      style={{ fontSize: '16px' }}
-                      onClick={() => {
-                        router.push('/memberCenter')
-                      }}
-                    >
-                      开通会员
-                    </Button>
-                  )}
+                  {albumDetail.value?.musicPaymentTypes &&
+                    albumDetail.value?.musicPaymentTypes.includes('VIP') && (
+                      <Button
+                        block
+                        round
+                        type="primary"
+                        style={{ fontSize: '16px' }}
+                        onClick={() => {
+                          router.push('/memberCenter')
+                        }}
+                      >
+                        开通会员
+                      </Button>
+                    )}
                 </div>
               </ColSticky>
             )}