|
@@ -122,23 +122,29 @@ export default defineComponent({
|
|
|
return partColumns.value.find((item: any) => item.value === staffData.selectedPartIndex)
|
|
return partColumns.value.find((item: any) => item.value === staffData.selectedPartIndex)
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
- // 硬编码 - 不显示下载按钮
|
|
|
|
|
- const downloadHidden = computed(() => {
|
|
|
|
|
|
|
+ // 是否能下载, true 可以下载, false 不能下载
|
|
|
|
|
+ const isDownload = computed(() => {
|
|
|
const users = state.user.data || {}
|
|
const users = state.user.data || {}
|
|
|
- return users.phone === '18888888888'
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ // 1、18888888888 这个账号不能下载
|
|
|
|
|
+ if(users.phone === '18888888888') {
|
|
|
|
|
+ return false
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- /** 当前用户会员状态 动态判断vip svip */
|
|
|
|
|
- const isTenantTeacherVip = computed(() => {
|
|
|
|
|
- const userInfo = state.user.data || {}
|
|
|
|
|
// 机构老师
|
|
// 机构老师
|
|
|
- if(state.platformType === 'TEACHER' && userInfo.tenantId > 0) {
|
|
|
|
|
- if(userInfo.userVip?.vipType === 'NOT_VIP' || !userInfo.userVip?.vipType) {
|
|
|
|
|
|
|
+ if(state.platformType === 'TEACHER' && users.tenantId > 0) {
|
|
|
|
|
+ // 判断是否从专辑过来,并且已购买
|
|
|
|
|
+ if(!!route.query?.tenantAlbumId && !!staffData.details.play) {
|
|
|
|
|
+ return true
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 2、机构老师,不是会员不能下载
|
|
|
|
|
+ if(users.userVip?.vipType === 'NOT_VIP' || !users.userVip?.vipType) {
|
|
|
return false
|
|
return false
|
|
|
} else {
|
|
} else {
|
|
|
return true;
|
|
return true;
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
|
|
+ // 3、平台老师,不管是不是会员都可以下载
|
|
|
return true
|
|
return true
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
@@ -785,8 +791,8 @@ export default defineComponent({
|
|
|
const getPreViewCloud = (musicId: string, partIndex: number, track: string) => {
|
|
const getPreViewCloud = (musicId: string, partIndex: number, track: string) => {
|
|
|
const Authorization = sessionStorage.getItem("Authorization") || "";
|
|
const Authorization = sessionStorage.getItem("Authorization") || "";
|
|
|
const musicScorePath = "/klx-music-score/";
|
|
const musicScorePath = "/klx-music-score/";
|
|
|
- const musicScoreUrl = getHttpOrigin() + musicScorePath;
|
|
|
|
|
- // const musicScoreUrl = "https://test.colexiu.com" + musicScorePath;
|
|
|
|
|
|
|
+ // const musicScoreUrl = getHttpOrigin() + musicScorePath;
|
|
|
|
|
+ const musicScoreUrl = "https://test.colexiu.com" + musicScorePath;
|
|
|
// const musicScoreUrl = 'http://192.168.3.68:3000/instrument.html';
|
|
// const musicScoreUrl = 'http://192.168.3.68:3000/instrument.html';
|
|
|
let href = `${musicScoreUrl}?t=${Date.now()}#/?id=${musicId}&Authorization=${Authorization}&isPreView=true&zoom=0.3&downPng=A4`;
|
|
let href = `${musicScoreUrl}?t=${Date.now()}#/?id=${musicId}&Authorization=${Authorization}&isPreView=true&zoom=0.3&downPng=A4`;
|
|
|
// // 老师端加上systemType=teacher
|
|
// // 老师端加上systemType=teacher
|
|
@@ -1075,12 +1081,12 @@ export default defineComponent({
|
|
|
<div
|
|
<div
|
|
|
class={[styles.functionItem, (loading.value ||
|
|
class={[styles.functionItem, (loading.value ||
|
|
|
(!staffData.musicPdfUrl && staffData.imgs.length <= 0)) ? styles.disabled : '',
|
|
(!staffData.musicPdfUrl && staffData.imgs.length <= 0)) ? styles.disabled : '',
|
|
|
- !downloadHidden.value && isTenantTeacherVip.value ? '' : styles.disabled]}
|
|
|
|
|
|
|
+ isDownload.value ? '' : styles.disabled]}
|
|
|
onClick={() => {
|
|
onClick={() => {
|
|
|
if((loading.value ||
|
|
if((loading.value ||
|
|
|
(!staffData.musicPdfUrl && staffData.imgs.length <= 0))) return
|
|
(!staffData.musicPdfUrl && staffData.imgs.length <= 0))) return
|
|
|
|
|
|
|
|
- if(downloadHidden.value || !isTenantTeacherVip.value) return
|
|
|
|
|
|
|
+ if(!isDownload.value) return
|
|
|
if (staffData.musicPdfUrl) {
|
|
if (staffData.musicPdfUrl) {
|
|
|
const songName =
|
|
const songName =
|
|
|
staffData.details?.name +
|
|
staffData.details?.name +
|