|
@@ -41,26 +41,31 @@ const ModeView = defineAsyncComponent(() =>
|
|
|
/** 校验是否能切换模式,会员的曲子,酷乐秀跟练模式、评测模式需要svip */
|
|
|
export const checkMusicBuy = (item: any, type?: string) => {
|
|
|
let checked = true;
|
|
|
- // 学生端或者老师端需要校验点播和会员曲目;通过专辑进入的,不需要校验点播和会员曲目,默认都可以使用
|
|
|
- if ((state.systemType === "student" || state.systemType === "teacher") && !state.tenantAlbumId) {
|
|
|
- // 如果是点播的曲子,并且还没有购买,需要弹窗提醒
|
|
|
- if (item.paymentType === "CHARGE" && !item.buyed) {
|
|
|
- permissionPopup.active = "demand"
|
|
|
- permissionPopup.musicId = item.id
|
|
|
- permissionPopup.musicPrice = item.musicPrice
|
|
|
- permissionPopup.show = true
|
|
|
- checked = false
|
|
|
- }
|
|
|
- /**
|
|
|
- * 如果是vip的曲子,当前用户不是会员时,需要弹窗提醒
|
|
|
- * 如果是vip的曲子,当前用户不是svip会员,点击跟练或评测时,需要弹窗提醒(会员曲子,跟练和评测需要开通svip会员才能使用)
|
|
|
- */
|
|
|
- if ( (state.vipType === "NOT_VIP" && item.paymentType !== "FREE") || (item.paymentType !== "FREE" && !state.vipType.includes("SVIP") && (type === "follow" || type === "evaluating")) ) {
|
|
|
- permissionPopup.active = item.paymentType.includes('CHARGE') ? "memberAndDemand" : "member"
|
|
|
- permissionPopup.musicId = item.id
|
|
|
- permissionPopup.musicPrice = item.musicPrice
|
|
|
- permissionPopup.show = true
|
|
|
- checked = false
|
|
|
+ // 购买过,不需要校验
|
|
|
+ if (item.buyed) {
|
|
|
+ checked = true
|
|
|
+ } else {
|
|
|
+ // 学生端或者老师端需要校验点播和会员曲目;通过专辑进入的,不需要校验点播和会员曲目,默认都可以使用
|
|
|
+ if ((state.systemType === "student" || state.systemType === "teacher") && !state.tenantAlbumId) {
|
|
|
+ // 如果是点播的曲子,并且还没有购买,需要弹窗提醒
|
|
|
+ if (item.paymentType === "CHARGE" && !item.buyed) {
|
|
|
+ permissionPopup.active = "demand"
|
|
|
+ permissionPopup.musicId = item.id
|
|
|
+ permissionPopup.musicPrice = item.musicPrice
|
|
|
+ permissionPopup.show = true
|
|
|
+ checked = false
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * 如果是vip的曲子,当前用户不是会员时,需要弹窗提醒
|
|
|
+ * 如果是vip的曲子,当前用户不是svip会员,点击跟练或评测时,需要弹窗提醒(会员曲子,跟练和评测需要开通svip会员才能使用)
|
|
|
+ */
|
|
|
+ if ( (state.vipType === "NOT_VIP" && item.paymentType !== "FREE") || (item.paymentType !== "FREE" && !state.vipType.includes("SVIP") && (type === "follow" || type === "evaluating")) ) {
|
|
|
+ permissionPopup.active = item.paymentType.includes('CHARGE') ? "memberAndDemand" : "member"
|
|
|
+ permissionPopup.musicId = item.id
|
|
|
+ permissionPopup.musicPrice = item.musicPrice
|
|
|
+ permissionPopup.show = true
|
|
|
+ checked = false
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
return checked;
|
|
@@ -838,7 +843,7 @@ export default defineComponent({
|
|
|
<div
|
|
|
id={state.platform === IPlatform.PC ? "teacherTop-1" : "studnetT-1"}
|
|
|
style={{ display: originBtn.value.display ? "" : "none" }}
|
|
|
- class={["driver-3", styles.btn, originBtn.value.disabled && styles.disabled, state.playType === "play" ? styles.playSource : styles.songSource]}
|
|
|
+ class={["driver-3", styles.btn, originBtn.value.disabled && styles.disabled, state.playType === "play" ? styles.playSource : styles.songSource, state.playSource === "background" ? styles.backgroundSongAct : styles.musicSongAct]}
|
|
|
onClick={() => {
|
|
|
const oldPlayType = state.playType;
|
|
|
const oldPlaySource = state.playSource;
|