|
@@ -1,5 +1,5 @@
|
|
import { Button, Dialog, Grid, GridItem, Popup, Toast } from 'vant'
|
|
import { Button, Dialog, Grid, GridItem, Popup, Toast } from 'vant'
|
|
-import { defineComponent, ref, toRefs } from 'vue'
|
|
|
|
|
|
+import { defineComponent, ref, toRefs, computed } from 'vue'
|
|
import qs from 'query-string'
|
|
import qs from 'query-string'
|
|
import appState from '/src/state'
|
|
import appState from '/src/state'
|
|
import detailState from '/src/pages/detail/state'
|
|
import detailState from '/src/pages/detail/state'
|
|
@@ -70,6 +70,7 @@ export default defineComponent({
|
|
/** 是否是单元测试 */
|
|
/** 是否是单元测试 */
|
|
const isUnitTest = search.unitId ? true : false
|
|
const isUnitTest = search.unitId ? true : false
|
|
const shareShow = ref(false)
|
|
const shareShow = ref(false)
|
|
|
|
+ const noSaveTipShow = ref(true)
|
|
const shareLoadedPngData = ref('')
|
|
const shareLoadedPngData = ref('')
|
|
const { data } = toRefs(props)
|
|
const { data } = toRefs(props)
|
|
const pathname = location.pathname
|
|
const pathname = location.pathname
|
|
@@ -140,6 +141,17 @@ export default defineComponent({
|
|
},
|
|
},
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ // 播放倍率不等于1,或者是选段评测,APP暂时不支持保存演奏,需要给出提示
|
|
|
|
+ const noSaveTips = computed(() => {
|
|
|
|
+ console.log('提示123',noSaveTipShow.value)
|
|
|
|
+ let tipContent = '';
|
|
|
|
+ if (isUnitTest || detailState.section.length === 2 || runtime.basePlayRate != 1 || !runtime.songs.background) {
|
|
|
|
+ tipContent = isUnitTest ? '单元测验暂不支持保存作品噢~' : !runtime.songs.background ? '该曲目暂不支持保存作品噢~' : detailState.section.length === 2 ? '选段后暂不支持保存作品噢~' : runtime.basePlayRate != 1 ? '调速后暂不支持保存作品噢~' : '';
|
|
|
|
+ }
|
|
|
|
+ return tipContent
|
|
|
|
+ })
|
|
|
|
+
|
|
return () => {
|
|
return () => {
|
|
const info = getLeveByScoreId(data.value?.score)
|
|
const info = getLeveByScoreId(data.value?.score)
|
|
return (
|
|
return (
|
|
@@ -250,7 +262,7 @@ export default defineComponent({
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- {(isUnitTest || detailState.section.length === 2 || runtime.basePlayRate != 1) ? null : !detailState.isHideEvaluatReportSaveBtn ? (
|
|
|
|
|
|
+ { !detailState.isHideEvaluatReportSaveBtn ? (
|
|
// <div class={styles.rigthBtns}>
|
|
// <div class={styles.rigthBtns}>
|
|
// <div class={styles.skepBtn} onClick={() => emit('upload')}>
|
|
// <div class={styles.skepBtn} onClick={() => emit('upload')}>
|
|
// <img src={iconUpload} />
|
|
// <img src={iconUpload} />
|
|
@@ -262,9 +274,21 @@ export default defineComponent({
|
|
// </div> */}
|
|
// </div> */}
|
|
// </div>
|
|
// </div>
|
|
<div class={styles.headerButton}>
|
|
<div class={styles.headerButton}>
|
|
- <div class={[styles.headBtn]} onClick={() => emit('upload')}>
|
|
|
|
- 保存演奏
|
|
|
|
|
|
+ <div class={[styles.headBtn, noSaveTips.value ? styles.headBtnDisable : '']} onClick={() => {
|
|
|
|
+ if (!noSaveTips.value) {
|
|
|
|
+ emit('upload')
|
|
|
|
+ }
|
|
|
|
+ }}>
|
|
|
|
+ 保存作品
|
|
</div>
|
|
</div>
|
|
|
|
+ {
|
|
|
|
+ noSaveTips.value && noSaveTipShow.value ?
|
|
|
|
+ <div class={[styles.noSaveTip]}>
|
|
|
|
+ <span class={styles.arrowIcon}></span>
|
|
|
|
+ {noSaveTips.value}
|
|
|
|
+ <i onClick={() => noSaveTipShow.value = false}></i>
|
|
|
|
+ </div> : null
|
|
|
|
+ }
|
|
</div>
|
|
</div>
|
|
) : null}
|
|
) : null}
|
|
</div>
|
|
</div>
|