|
@@ -98,25 +98,32 @@ export default defineComponent({
|
|
|
});
|
|
|
|
|
|
const openAccomapina = async (item: any) => {
|
|
|
- // 学生端或者老师端需要校验点播和会员曲目
|
|
|
- if (vipVerify.value) {
|
|
|
+ if (item.id === state.examSongId) return;
|
|
|
+ // 学生端或者老师端需要校验点播和会员曲目;通过专辑进入的,不需要校验点播和会员曲目,默认都可以使用
|
|
|
+ if (vipVerify.value && !state.tenantAlbumId) {
|
|
|
+ // 是否需要校验vip
|
|
|
+ let needCheckVip = true;
|
|
|
// 如果是点播的曲子,需要弹窗提醒
|
|
|
- if (item.paymentType === "CHARGE") {
|
|
|
+ if (item.paymentType.includes("CHARGE")) {
|
|
|
if (loading.value === true) return
|
|
|
loading.value = true
|
|
|
// 查询是否购买了
|
|
|
const { data } = await api_musicIsBuy(item.id)
|
|
|
loading.value = false
|
|
|
if (data.buyed === false) {
|
|
|
- permissionPopup.active = "demand"
|
|
|
+ permissionPopup.active = item.paymentType === "CHARGE" ? "demand" : "memberAndDemand"
|
|
|
permissionPopup.musicId = item.id
|
|
|
permissionPopup.musicPrice = item.musicPrice
|
|
|
permissionPopup.show = true
|
|
|
return
|
|
|
}
|
|
|
+ // 已经购买
|
|
|
+ if (data.buyed === true) {
|
|
|
+ needCheckVip = false;
|
|
|
+ }
|
|
|
}
|
|
|
// 如果是vip的曲子,当前用户不是会员时,需要弹窗提醒
|
|
|
- if (state.vipType === "NOT_VIP" && item.paymentType !== "FREE") {
|
|
|
+ if (state.vipType === "NOT_VIP" && item.paymentType !== "FREE" && needCheckVip) {
|
|
|
permissionPopup.active = item.paymentType.includes('CHARGE') ? "memberAndDemand" : "member"
|
|
|
permissionPopup.musicId = item.id
|
|
|
permissionPopup.musicPrice = item.musicPrice
|
|
@@ -124,7 +131,7 @@ export default defineComponent({
|
|
|
return
|
|
|
}
|
|
|
}
|
|
|
- if (item.id === state.examSongId) return;
|
|
|
+
|
|
|
// 暂停播放
|
|
|
togglePlay("paused");
|
|
|
postMessage({
|