浏览代码

:recycle: fixing destructure sort pass in episodes | some syntax clean-up

tags/0.9.0
J 4 年前
父节点
当前提交
e45e575909

+ 1
- 1
vue-theme/src/pages/index.vue 查看文件

78
                 }
78
                 }
79
             }
79
             }
80
         }
80
         }
81
-        await this.$store.dispatch('getRandomPosts', ['episode', 'exhibition', 'event', 'artist', 'post'])
81
+        await this.$store.dispatch('getRandomPosts', ['episode', 'exhibition', 'event', 'artist', 'artist', 'post'])
82
         this.checkAndSetHero('welcome')
82
         this.checkAndSetHero('welcome')
83
     },
83
     },
84
     methods: {
84
     methods: {

+ 1
- 1
vue-theme/src/store/modules/episode.js 查看文件

17
 }
17
 }
18
 
18
 
19
 const actions = {
19
 const actions = {
20
-    getAllEpisodes({ commit }, sortType) {
20
+    getAllEpisodes({ commit }, { sortType }) {
21
         commit('CLEAR_EPISODES')
21
         commit('CLEAR_EPISODES')
22
         commit('EPISODES_LOADED', false)
22
         commit('EPISODES_LOADED', false)
23
         return api.getByType({ type: 'episode', sort: sortType, cb: episodes => {
23
         return api.getByType({ type: 'episode', sort: sortType, cb: episodes => {

+ 1
- 1
vue-theme/src/store/modules/page.js 查看文件

15
 
15
 
16
 // actions
16
 // actions
17
 const actions = {
17
 const actions = {
18
-    async getAllPages({ commit }, sortType) {
18
+    async getAllPages({ commit }, { sortType }) {
19
         commit('PAGES_LOADED', false)
19
         commit('PAGES_LOADED', false)
20
         return await api.getByType({ type: 'page', sort: sortType, cb: pages => {
20
         return await api.getByType({ type: 'page', sort: sortType, cb: pages => {
21
                 commit('STORE_FETCHED_PAGES', { pages })
21
                 commit('STORE_FETCHED_PAGES', { pages })

+ 1
- 1
vue-theme/src/store/modules/post.js 查看文件

12
 }
12
 }
13
 
13
 
14
 const actions = {
14
 const actions = {
15
-    getAllPosts({ commit },{ sortType, params }) {
15
+    getAllPosts({ commit }, { sortType, params }) {
16
         commit('CLEAR_POSTS')
16
         commit('CLEAR_POSTS')
17
         commit('POSTS_LOADED', false)
17
         commit('POSTS_LOADED', false)
18
         return api.getByType({ type: 'post', sort: sortType, cb: posts => {
18
         return api.getByType({ type: 'post', sort: sortType, cb: posts => {

+ 1
- 1
vue-theme/src/store/modules/sticky.js 查看文件

11
 }
11
 }
12
 
12
 
13
 const actions = {
13
 const actions = {
14
-    getAllSticky({ commit }, sortType) {
14
+    getAllSticky({ commit }) {
15
         commit('CLEAR_STICKY')
15
         commit('CLEAR_STICKY')
16
         commit('STICKY_LOADED', false)
16
         commit('STICKY_LOADED', false)
17
         return api.getSticky(posts => {
17
         return api.getSticky(posts => {

正在加载...
取消
保存