|
@@ -9,6 +9,7 @@ import {
|
|
|
} from '@/helpers/native-message'
|
|
|
import deepClone from '@/helpers/deep-clone'
|
|
|
import iconSong from '../../images/icon-song.png'
|
|
|
+import iconSongDisabled from '../../images/icon-song-disabled.png'
|
|
|
import AnserTitle from '../anser-title'
|
|
|
import { QuestionType } from '../../unit'
|
|
|
import AnswerAnalysis from '../answer-analysis'
|
|
@@ -89,8 +90,7 @@ export default defineComponent({
|
|
|
*/
|
|
|
const onEvaluation = () => {
|
|
|
const info = questionExtendsInfo.value
|
|
|
- if (!info) return
|
|
|
- console.log(props.unitId)
|
|
|
+ if (!info || props.data.expired) return
|
|
|
postMessage({
|
|
|
api: 'openAccompanyWebView',
|
|
|
content: {
|
|
@@ -221,13 +221,18 @@ export default defineComponent({
|
|
|
<div class={[styles.unitAnswers]}>
|
|
|
{questionExtendsInfo.value && (
|
|
|
<Cell
|
|
|
- class={styles.playSection}
|
|
|
+ class={[styles.playSection, props.data.expired && styles.playSectionDisabled]}
|
|
|
center
|
|
|
titleClass={['van-ellipsis', styles.playTitle]}
|
|
|
labelClass={styles.playLabel}
|
|
|
>
|
|
|
{{
|
|
|
- icon: () => <Image class={styles.img} src={iconSong} />,
|
|
|
+ icon: () => (
|
|
|
+ <Image
|
|
|
+ class={styles.img}
|
|
|
+ src={props.data.expired ? iconSongDisabled : iconSong}
|
|
|
+ />
|
|
|
+ ),
|
|
|
title: () => <>{questionExtendsInfo.value.musicName}</>,
|
|
|
label: () => (
|
|
|
<span>
|
|
@@ -243,8 +248,14 @@ export default defineComponent({
|
|
|
onClick={onEvaluation}
|
|
|
disabled={props.readOnly}
|
|
|
>
|
|
|
- 点击评测
|
|
|
- <Icon name="play" />
|
|
|
+ {props.data.expired ? (
|
|
|
+ '资源已失效'
|
|
|
+ ) : (
|
|
|
+ <>
|
|
|
+ 点击评测
|
|
|
+ <Icon name="play" />
|
|
|
+ </>
|
|
|
+ )}
|
|
|
</Button>
|
|
|
)
|
|
|
}}
|