阶段性上传
This commit is contained in:
26
App.vue
26
App.vue
@@ -20,6 +20,30 @@ export default {
|
||||
}
|
||||
})
|
||||
|
||||
// 取出初始播放信息
|
||||
uni.getStorage({
|
||||
key: 'playingInfo',
|
||||
success: function (res) {
|
||||
console.log(res,'playingInfo本地初始化')
|
||||
store.commit('setUserInfo',{'playingInfo': res.data})
|
||||
store.commit('setUserInfo',{
|
||||
'playTitle':res.data.chapterName,
|
||||
'fengImg':res.data.images
|
||||
})
|
||||
console.log(store.state.userInfo,'初始化')
|
||||
},
|
||||
fail:function(e){
|
||||
console.log(e,'playingInfo本地初始化失败')
|
||||
store.commit('setUserInfo',{'playingInfo': {
|
||||
'images':'../../static/icon/fengziIcon.jpg',
|
||||
'chapterName':'暂无播放信息',
|
||||
}})
|
||||
store.commit('setUserInfo',{
|
||||
'playTitle': '暂无播放信息',
|
||||
'fengImg': '../../static/icon/fengziIcon.jpg'
|
||||
})
|
||||
},
|
||||
})
|
||||
// 取出播放列表
|
||||
uni.getStorage({
|
||||
key: 'playData',
|
||||
@@ -39,7 +63,7 @@ export default {
|
||||
fail:function(e){ // 如果没有,就查询一下线上的播放记录
|
||||
console.log('本地无数据');
|
||||
music.setList([])
|
||||
store.commit('setUserInfo',{'playingInfo': {'bookid':0,'chapterId':0}});
|
||||
//store.commit('setUserInfo',{'playingInfo': {'bookid':0,'chapterId':0}});
|
||||
store.commit('setUserInfo',{'playVisible': false})
|
||||
// music.setCoverImg('../../static/icon/x1.jpg')
|
||||
store.commit('setUserInfo',{
|
||||
|
||||
Reference in New Issue
Block a user