|
@@ -1,4 +1,4 @@
|
|
|
-import { defineComponent, reactive, watch } from 'vue'
|
|
|
+import { defineComponent, PropType, reactive, watch } from 'vue'
|
|
|
import icon from './images/icon.png'
|
|
|
import classes from './index.module.less'
|
|
|
import detaile from './images/detaile.png'
|
|
@@ -18,6 +18,7 @@ type Props = {
|
|
|
titleImg: string
|
|
|
chargeType: string
|
|
|
auditStatus?: string
|
|
|
+ paymentType: []
|
|
|
}
|
|
|
const chargeTypes = {
|
|
|
CHARGE: '点播',
|
|
@@ -29,7 +30,7 @@ export default defineComponent({
|
|
|
name: 'music-item',
|
|
|
props: {
|
|
|
item: {
|
|
|
- type: Object as () => Props,
|
|
|
+ type: Object as () => Props ,
|
|
|
default: () => ({})
|
|
|
},
|
|
|
onClick: {
|
|
@@ -71,16 +72,18 @@ export default defineComponent({
|
|
|
<div class={classes.textWrap}>
|
|
|
<p>
|
|
|
{state.item.musicSheetName}
|
|
|
- <div
|
|
|
- class={[
|
|
|
- classes.touchButton,
|
|
|
- classes[state.item.chargeType?.toLocaleLowerCase()]
|
|
|
- ]}
|
|
|
- >
|
|
|
- {chargeTypes[state.item.chargeType]
|
|
|
- ? chargeTypes[state.item.chargeType]
|
|
|
- : '点播'}
|
|
|
- </div>
|
|
|
+ {state.item.paymentType && state.item.paymentType.map((tag: string) => (
|
|
|
+ <div
|
|
|
+ class={[
|
|
|
+ classes.touchButton,
|
|
|
+ classes[tag?.toLocaleLowerCase()]
|
|
|
+ ]}
|
|
|
+ >
|
|
|
+ {chargeTypes[tag]
|
|
|
+ ? chargeTypes[tag]
|
|
|
+ : '点播'}
|
|
|
+ </div>
|
|
|
+ ))}
|
|
|
</p>
|
|
|
<div class={classes.authorInfo}>
|
|
|
<span>作曲: {state.item.composer}</span>
|