|
@@ -1,4 +1,4 @@
|
|
|
-import { defineComponent, onMounted, reactive, watch } from "vue";
|
|
|
+import { computed, defineComponent, onMounted, reactive, watch } from "vue";
|
|
|
import styles from "./index.module.less";
|
|
|
import { api_musicSheetPage } from "../../api";
|
|
|
import state, { togglePlay } from "/src/state";
|
|
@@ -9,7 +9,7 @@ import searImg from "./imgs/searImg.png"
|
|
|
import huoimg from "./imgs/huo.png"
|
|
|
import emptyImg from "./imgs/empty.png"
|
|
|
import { getQuery } from "/src/utils/queryString";
|
|
|
-import { vipData, isVip } from "../vip"
|
|
|
+import { vipData } from "../vip"
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: "TheMusicList-list",
|
|
@@ -75,13 +75,8 @@ export default defineComponent({
|
|
|
});
|
|
|
|
|
|
const openAccomapina = (item: any) => {
|
|
|
- // 学生端 没有开会员查看会员曲目
|
|
|
- if(item.paymentType === "VIP" && state.systemType === "student" && !isVip.value){
|
|
|
- vipData.show = true
|
|
|
- return
|
|
|
- }
|
|
|
- // 学校查看会员曲目
|
|
|
- if(item.paymentType === "VIP" && state.systemType === "web" && state.isSchool){
|
|
|
+ // 学生端 没有开会员查看会员曲目 // 学校查看会员曲目
|
|
|
+ if(item.useStatus === "LOCK" && vipVerify.value){
|
|
|
vipData.show = true
|
|
|
return
|
|
|
}
|
|
@@ -111,6 +106,9 @@ export default defineComponent({
|
|
|
? (num / 10000).toFixed(1).replace(/\.0$/, '') + "万"
|
|
|
: num.toString();
|
|
|
}
|
|
|
+ const vipVerify = computed(() => {
|
|
|
+ return state.systemType === "student" || (state.systemType === "web" && state.isSchool)
|
|
|
+ })
|
|
|
return () => (
|
|
|
<div class={styles.wrap}>
|
|
|
<div class={[styles.searchBox,data.isFocus && styles.isFocus]}>
|
|
@@ -131,16 +129,26 @@ export default defineComponent({
|
|
|
return (
|
|
|
<div class={[styles.item, state.examSongId == item.id && styles.itemActive]} onClick={() => openAccomapina(item)}>
|
|
|
<div class={styles.titleImg}>
|
|
|
- <i class={[styles.iconType, styles[item.paymentType]]}></i>
|
|
|
+ {
|
|
|
+ item.useStatus==='LOCK'&&vipVerify.value && <div class={styles.lock}></div>
|
|
|
+ }
|
|
|
<Image src={item.titleImg} class={styles.img} />
|
|
|
</div>
|
|
|
<div class={styles.content}>
|
|
|
- <p class={styles.name}>{item.musicSheetName}</p>
|
|
|
- {
|
|
|
- item.composer &&
|
|
|
+ <div class={styles.name}>{item.musicSheetName}</div>
|
|
|
+ {
|
|
|
+ ((["FREE","LOCK"].includes(item.useStatus)&&vipVerify.value) || item.composer) &&
|
|
|
<div class={styles.detail}>
|
|
|
{/* {item.usedNum && <div class={styles.usedNum}><img src={huoimg}/><div>{formatNumber(item.usedNum)}</div></div>} */}
|
|
|
- <p class={styles.author}>{item.composer}</p>
|
|
|
+ {
|
|
|
+ item.useStatus==='FREE'&&vipVerify.value && <div class={[styles.freeIcon]}>试用</div>
|
|
|
+ }
|
|
|
+ {
|
|
|
+ item.useStatus==='LOCK'&&vipVerify.value && <div class={[styles.lockIcon]}>未解锁</div>
|
|
|
+ }
|
|
|
+ {
|
|
|
+ item.composer && <div class={styles.author}>{item.composer}</div>
|
|
|
+ }
|
|
|
</div>
|
|
|
}
|
|
|
</div>
|