优化程序初始化逻辑,修复无网络的情况下的初始化问题
parent
ce383769da
commit
fce8719432
|
@ -5,6 +5,7 @@
|
||||||
### 优化
|
### 优化
|
||||||
|
|
||||||
- 为可视化音频的频谱整体添加频谱均值加成,使频谱显示更有节奏感
|
- 为可视化音频的频谱整体添加频谱均值加成,使频谱显示更有节奏感
|
||||||
|
- 优化程序初始化逻辑,修复无网络的情况下的初始化问题
|
||||||
|
|
||||||
### 修复
|
### 修复
|
||||||
|
|
||||||
|
|
|
@ -153,8 +153,8 @@ export default ({
|
||||||
initListPosition(), // 列表位置记录
|
initListPosition(), // 列表位置记录
|
||||||
initListPrevSelectId(), // 上次选中的列表记录
|
initListPrevSelectId(), // 上次选中的列表记录
|
||||||
initUserApi(), // 自定义API
|
initUserApi(), // 自定义API
|
||||||
music.init(), // 初始化音乐sdk
|
|
||||||
]).catch(err => log.error(err))
|
]).catch(err => log.error(err))
|
||||||
|
music.init() // 初始化音乐sdk
|
||||||
await initList().catch(err => log.error(err)) // 初始化列表
|
await initList().catch(err => log.error(err)) // 初始化列表
|
||||||
await initPlayInfo(downloadList.value).catch(err => log.error(err)) // 初始化上次的歌曲播放信息
|
await initPlayInfo(downloadList.value).catch(err => log.error(err)) // 初始化上次的歌曲播放信息
|
||||||
await initSearchHistory(saveSearchHistoryListThrottle).catch(err => log.error(err)) // 初始化搜索历史记录
|
await initSearchHistory(saveSearchHistoryListThrottle).catch(err => log.error(err)) // 初始化搜索历史记录
|
||||||
|
|
|
@ -52,7 +52,7 @@ export default {
|
||||||
const scrollIndex = to.query.scrollIndex
|
const scrollIndex = to.query.scrollIndex
|
||||||
const isAnimation = from.query.id == to.query.id
|
const isAnimation = from.query.id == to.query.id
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.musicList.restoreScroll(scrollIndex, isAnimation)
|
this.$refs.musicList?.restoreScroll(scrollIndex, isAnimation)
|
||||||
})
|
})
|
||||||
return {
|
return {
|
||||||
path: '/list',
|
path: '/list',
|
||||||
|
@ -60,7 +60,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeRouteLeave(to, from) {
|
beforeRouteLeave(to, from) {
|
||||||
this.$refs.musicList.saveListPosition()
|
this.$refs.musicList?.saveListPosition()
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.listId = this.$route.query.id
|
this.listId = this.$route.query.id
|
||||||
|
|
Loading…
Reference in New Issue