Browse Source

还原请求

yangc 7 years ago
parent
commit
f59e0938b5
2 changed files with 16 additions and 20 deletions
  1. 6 10
      pages/mobile/center/user/collect/message.vue
  2. 10 10
      pages/mobile/center/vendor/message.vue

+ 6 - 10
pages/mobile/center/user/collect/message.vue

@@ -6,16 +6,12 @@
   export default {
     middleware: 'authenticated',
     layout: 'mobileNoHeader',
-//    fetch ({ store }) {
-//      let user = store.state.option.user.data
-//      return Promise.all([
-//        // 获取消息列表
-//        store.dispatch('messageShow/getAllMessage', { receiverUu: user.userUU, receiverEnuu: user.enterprise.uu, consumerApp: 'MALL', count: 10, page: 1, sorting: {'createTime': 'DESC'} })
-//      ])
-//    },
-    created () {
-      let user = this.user.data
-      this.$store.dispatch('messageShow/getAllMessage', { receiverUu: user.userUU, receiverEnuu: user.enterprise.uu, consumerApp: 'MALL', count: 10, page: 1, sorting: {'createTime': 'DESC'} })
+    fetch ({ store }) {
+      let user = store.state.option.user.data
+      return Promise.all([
+        // 获取消息列表
+        store.dispatch('messageShow/getAllMessage', { receiverUu: user.userUU, receiverEnuu: user.enterprise.uu, consumerApp: 'MALL', count: 10, page: 1, sorting: {'createTime': 'DESC'} })
+      ])
     },
     components: {
       Message

+ 10 - 10
pages/mobile/center/vendor/message.vue

@@ -6,17 +6,17 @@
   export default {
     middleware: 'authenticated',
     layout: 'mobileNoHeader',
-//    fetch ({ store }) {
-//      let user = store.state.option.user.data
-//      return Promise.all([
-//        // 获取消息列表
-//        store.dispatch('messageShow/getAllMessage', { receiverUu: user.userUU, receiverEnuu: user.enterprise.uu, consumerApp: 'MALL', count: 10, page: 1, sorting: {'createTime': 'DESC'} })
-//      ])
-//    },
-    created () {
-      let user = this.user.data
-      this.$store.dispatch('messageShow/getAllMessage', { receiverUu: user.userUU, receiverEnuu: user.enterprise.uu, consumerApp: 'MALL', count: 10, page: 1, sorting: {'createTime': 'DESC'} })
+    fetch ({ store }) {
+      let user = store.state.option.user.data
+      return Promise.all([
+        // 获取消息列表
+        store.dispatch('messageShow/getAllMessage', { receiverUu: user.userUU, receiverEnuu: user.enterprise.uu, consumerApp: 'MALL', count: 10, page: 1, sorting: {'createTime': 'DESC'} })
+      ])
     },
+//    created () {
+//      let user = this.user.data
+//      this.$store.dispatch('messageShow/getAllMessage', { receiverUu: user.userUU, receiverEnuu: user.enterprise.uu, consumerApp: 'MALL', count: 10, page: 1, sorting: {'createTime': 'DESC'} })
+//    },
     components: {
       Message
     }