|
@@ -23,6 +23,7 @@ import ColResult from '@/components/col-result'
|
|
|
import MusicGrid from '../component/music-grid'
|
|
|
import { useEventTracking } from '@/helpers/hooks'
|
|
|
import ColSticky from '@/components/col-sticky'
|
|
|
+import { moneyFormat } from '@/helpers/utils'
|
|
|
|
|
|
const noop = () => {}
|
|
|
|
|
@@ -123,6 +124,49 @@ export default defineComponent({
|
|
|
favoriteLoading.value = false
|
|
|
}
|
|
|
|
|
|
+ const onBuy = async () => {
|
|
|
+ // const member: any = this.selectMember
|
|
|
+ // // 判断是否有会员
|
|
|
+ // const startTime = this.userInfo.memberRankSettingId
|
|
|
+ // ? dayjs(this.userInfo.membershipEndTime).toDate()
|
|
|
+ // : new Date()
|
|
|
+ // let endTime = new Date()
|
|
|
+ // if (member.period === 'MONTH') {
|
|
|
+ // endTime = dayjs(startTime).add(1, 'month').toDate()
|
|
|
+ // } else if (member.period === 'QUARTERLY') {
|
|
|
+ // endTime = dayjs(startTime).add(3, 'month').toDate()
|
|
|
+ // } else if (member.period === 'YEAR_HALF') {
|
|
|
+ // endTime = dayjs(startTime).add(6, 'month').toDate()
|
|
|
+ // } else if (member.period === 'YEAR') {
|
|
|
+ // endTime = dayjs(startTime).add(1, 'year').toDate()
|
|
|
+ // }
|
|
|
+ // orderStatus.orderObject.orderType = 'VIP'
|
|
|
+ // orderStatus.orderObject.orderName = '小酷Ai' + member.title
|
|
|
+ // orderStatus.orderObject.orderDesc = '小酷Ai' + member.title
|
|
|
+ // orderStatus.orderObject.actualPrice = this.calcSalePrice(member)
|
|
|
+ // orderStatus.orderObject.recomUserId = this.recomUserId
|
|
|
+ // orderStatus.orderObject.activityId = this.activityId
|
|
|
+ // orderStatus.orderObject.orderNo = ''
|
|
|
+ // orderStatus.orderObject.orderList = [
|
|
|
+ // {
|
|
|
+ // orderType: 'VIP',
|
|
|
+ // goodsName: '小酷Ai' + member.title,
|
|
|
+ // id: member.id,
|
|
|
+ // title: member.title,
|
|
|
+ // price: this.calcSalePrice(member),
|
|
|
+ // startTime: dayjs(startTime).format('YYYY-MM-DD'),
|
|
|
+ // endTime: dayjs(endTime).format('YYYY-MM-DD'),
|
|
|
+ // recomUserId: this.recomUserId
|
|
|
+ // }
|
|
|
+ // ]
|
|
|
+ // this.$router.push({
|
|
|
+ // path: '/orderDetail',
|
|
|
+ // query: {
|
|
|
+ // orderType: 'VIP'
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ }
|
|
|
+
|
|
|
return () => {
|
|
|
return (
|
|
|
<div class={styles.detail}>
|
|
@@ -145,7 +189,12 @@ export default defineComponent({
|
|
|
<div class={styles.bg}>
|
|
|
<div class={styles.alumWrap}>
|
|
|
<div class={styles.img}>
|
|
|
- <span class={styles.albumType}>付费</span>
|
|
|
+ {albumDetail.value?.paymentType && (
|
|
|
+ <span class={styles.albumType}>
|
|
|
+ {albumDetail.value?.paymentType === 'FREE' && '免费'}
|
|
|
+ {albumDetail.value?.paymentType === 'CHARGE' && '付费'}
|
|
|
+ </span>
|
|
|
+ )}
|
|
|
<Image
|
|
|
class={styles.image}
|
|
|
width="100%"
|
|
@@ -190,7 +239,9 @@ export default defineComponent({
|
|
|
|
|
|
<div class={styles.albumTips}>
|
|
|
<span>此专辑为收费类型,购买即可自由练习该专辑</span>
|
|
|
- <span class={styles.albumPrice}>¥19.9</span>
|
|
|
+ <span class={styles.albumPrice}>
|
|
|
+ ¥{moneyFormat(albumDetail.value?.albumPrice)}
|
|
|
+ </span>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class={styles.alumnContainer}>
|
|
@@ -247,24 +298,41 @@ export default defineComponent({
|
|
|
)}
|
|
|
</div>
|
|
|
|
|
|
- <ColSticky position="bottom" background="white">
|
|
|
- <div class={['btnGroup', 'btnMore']} style={{ paddingTop: '12px' }}>
|
|
|
- <Button block round type="primary" style={{ fontSize: '16px' }}>
|
|
|
- 购买专辑
|
|
|
- </Button>
|
|
|
- <Button
|
|
|
- block
|
|
|
- round
|
|
|
- type="primary"
|
|
|
- style={{ fontSize: '16px' }}
|
|
|
- onClick={() => {
|
|
|
- router.push('/memberCenter')
|
|
|
- }}
|
|
|
+ {albumDetail.value?.paymentType === 'CHARGE' && (
|
|
|
+ <ColSticky position="bottom" background="white">
|
|
|
+ <div
|
|
|
+ class={[
|
|
|
+ 'btnGroup',
|
|
|
+ albumDetail.value?.musicPaymentTypes.includes('CHARGE') &&
|
|
|
+ 'btnMore'
|
|
|
+ ]}
|
|
|
+ style={{ paddingTop: '12px' }}
|
|
|
>
|
|
|
- 开通会员
|
|
|
- </Button>
|
|
|
- </div>
|
|
|
- </ColSticky>
|
|
|
+ <Button
|
|
|
+ block
|
|
|
+ round
|
|
|
+ type="primary"
|
|
|
+ style={{ fontSize: '16px' }}
|
|
|
+ onClick={onBuy}
|
|
|
+ >
|
|
|
+ 购买专辑
|
|
|
+ </Button>
|
|
|
+ {albumDetail.value?.musicPaymentTypes.includes('CHARGE') && (
|
|
|
+ <Button
|
|
|
+ block
|
|
|
+ round
|
|
|
+ type="primary"
|
|
|
+ style={{ fontSize: '16px' }}
|
|
|
+ onClick={() => {
|
|
|
+ router.push('/memberCenter')
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ 开通会员
|
|
|
+ </Button>
|
|
|
+ )}
|
|
|
+ </div>
|
|
|
+ </ColSticky>
|
|
|
+ )}
|
|
|
</div>
|
|
|
)
|
|
|
}
|