|
@@ -11,7 +11,7 @@ const state = {
|
|
}
|
|
}
|
|
|
|
|
|
const getters = {
|
|
const getters = {
|
|
- online_total: state => state.bannerlist,
|
|
|
|
|
|
+ online_total: state => state.online_total,
|
|
dynamic: state => state.dynamic,
|
|
dynamic: state => state.dynamic,
|
|
recommend: state => state.recommend,
|
|
recommend: state => state.recommend,
|
|
ranking: state => state.ranking,
|
|
ranking: state => state.ranking,
|
|
@@ -25,7 +25,7 @@ const actions = {
|
|
commit(TYPE.LIVE_REQUEST)
|
|
commit(TYPE.LIVE_REQUEST)
|
|
liveApi.live().then((response) => {
|
|
liveApi.live().then((response) => {
|
|
rootState.requesting = false
|
|
rootState.requesting = false
|
|
- commit(TYPE.LIVE_SUCCESS, response)
|
|
|
|
|
|
+ commit(TYPE.LIVE_SUCCESS, response.data)
|
|
}, (error) => {
|
|
}, (error) => {
|
|
rootState.requesting = false
|
|
rootState.requesting = false
|
|
commit(TYPE.LIVE_FAILURE)
|
|
commit(TYPE.LIVE_FAILURE)
|
|
@@ -35,11 +35,15 @@ const actions = {
|
|
|
|
|
|
const mutations = {
|
|
const mutations = {
|
|
[TYPE.LIVE_REQUEST] (state) {
|
|
[TYPE.LIVE_REQUEST] (state) {
|
|
-
|
|
|
|
|
|
+
|
|
},
|
|
},
|
|
- [TYPE.LIVE_SUCCESS] (state, response) {
|
|
|
|
- state.online_total = 0
|
|
|
|
- state.dynamic = 0
|
|
|
|
|
|
+ [TYPE.LIVE_SUCCESS] (state, live) {
|
|
|
|
+ state.online_total = live.online_total
|
|
|
|
+ state.dynamic = live.dynamic
|
|
|
|
+ state.recommend = live.recommend
|
|
|
|
+ state.ranking = live.ranking
|
|
|
|
+ state.preview = live.preview
|
|
|
|
+ state.recommendAnchor = live.preview
|
|
},
|
|
},
|
|
[TYPE.LIVE_FAILURE] (state) {
|
|
[TYPE.LIVE_FAILURE] (state) {
|
|
|
|
|