|
@@ -217,21 +217,11 @@ export default defineComponent({
|
|
|
const audio = ref<any>(null)
|
|
|
const freeRate = ref<any>(0)
|
|
|
const initAudio = async () => {
|
|
|
- const config = await request.get(
|
|
|
- '/api-student/sysConfig/queryByParamNameList',
|
|
|
- {
|
|
|
- params: {
|
|
|
- paramNames: 'music_sheet_free_rate'
|
|
|
- }
|
|
|
- }
|
|
|
- )
|
|
|
- freeRate.value = config.data[0]?.paramValue || 0
|
|
|
-
|
|
|
const controls = [
|
|
|
- // 'play-large',
|
|
|
+ 'play-large',
|
|
|
'play',
|
|
|
'progress',
|
|
|
- // 'captions',
|
|
|
+ 'captions',
|
|
|
// 'fullscreen',
|
|
|
'duration'
|
|
|
]
|
|
@@ -239,6 +229,16 @@ export default defineComponent({
|
|
|
controls: controls
|
|
|
})
|
|
|
|
|
|
+ const config = await request.get(
|
|
|
+ '/api-student/sysConfig/queryByParamNameList',
|
|
|
+ {
|
|
|
+ params: {
|
|
|
+ paramNames: 'music_sheet_free_rate'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ )
|
|
|
+ freeRate.value = config.data[0]?.paramValue || 0
|
|
|
+
|
|
|
player.value.on('timeupdate', () => {
|
|
|
// 允许播放时间
|
|
|
const players = player.value
|
|
@@ -633,7 +633,10 @@ export default defineComponent({
|
|
|
block
|
|
|
type="primary"
|
|
|
color="linear-gradient(180deg, #59E5D5 0%, #2DC7AA 100%)"
|
|
|
- onClick={() => musicBuy(musicDetail.value)}
|
|
|
+ onClick={() => {
|
|
|
+ player.value && player.value.stop()
|
|
|
+ musicBuy(musicDetail.value)
|
|
|
+ }}
|
|
|
>
|
|
|
立即练习
|
|
|
</Button>
|