guhongwei 4 năm trước cách đây
mục cha
commit
4005e4be58
2 tập tin đã thay đổi với 74 bổ sung11 xóa
  1. 2 0
      src/store/index.js
  2. 72 11
      src/views/messageInfo/index.vue

+ 2 - 0
src/store/index.js

@@ -24,6 +24,7 @@ import leave from '@frame/store/leave';
 import group from '@frame/store/group';
 import uploadtask from '@frame/store/uploadtask';
 import setting from '@frame/store/setting';
+import notice from '@frame/store/notice';
 import * as ustate from '@frame/store/user/state';
 import * as umutations from '@frame/store/user/mutations';
 import * as dostate from '@frame/store/setting/state';
@@ -66,5 +67,6 @@ export default new Vuex.Store({
     group,
     uploadtask,
     setting,
+    notice,
   },
 });

+ 72 - 11
src/views/messageInfo/index.vue

@@ -1,30 +1,91 @@
 <template>
   <div id="index">
-    <p>通知信息详情</p>
+    <el-row>
+      <el-col :span="24" class="style">
+        <el-col :span="24" class="top">
+          <NavBar v-show="navShow" :title="title" :isleftarrow="isleftarrow"> </NavBar>
+        </el-col>
+        <el-col :span="24" class="main">
+          <messageInfo :messageInfos="messageInfos"></messageInfo>
+        </el-col>
+      </el-col>
+    </el-row>
   </div>
 </template>
 
 <script>
-import { mapState, createNamespacedHelpers } from 'vuex';
+import NavBar from '@/layout/common/topInfo.vue';
+import { mapState, createNamespacedHelpers, mapGetters } from 'vuex';
+import messageInfo from '@frame/parts/messageInfo.vue';
+const { mapActions: notice } = createNamespacedHelpers('notice');
 export default {
   name: 'index',
   props: {},
-  components: {},
+  components: {
+    NavBar,
+    messageInfo,
+  },
   data: function() {
-    return {};
+    return {
+      title: '',
+      isleftarrow: '',
+      navShow: true,
+      display: true,
+      // 通知详情
+      messageInfos: {},
+    };
+  },
+  created() {
+    this.searchInfo();
+  },
+  methods: {
+    ...notice(['fetch', 'lookFetch']),
+    async searchInfo() {
+      const res = await this.fetch(this.noticeid);
+      if (this.$checkRes(res)) {
+        this.$set(this, `messageInfos`, res.data);
+      }
+      let data = {};
+      data.noticeid = this.noticeid;
+      data.uid = this.uid;
+      const arr = await this.lookFetch(data);
+      console.log(arr);
+    },
   },
-  created() {},
-  methods: {},
   computed: {
     ...mapState(['user']),
-    pageTitle() {
-      return `${this.$route.meta.title}`;
+    noticeid() {
+      return this.$route.query.noticeid;
     },
+    uid() {
+      return this.$route.query.uid;
+    },
+  },
+  mounted() {
+    this.title = this.$route.meta.title;
+    this.isleftarrow = this.$route.meta.isleftarrow;
   },
-  metaInfo() {
-    return { title: this.$route.meta.title };
+  watch: {
+    $route(to, from) {
+      this.title = to.meta.title;
+      this.isleftarrow = to.meta.isleftarrow;
+    },
   },
 };
 </script>
 
-<style lang="less" scoped></style>
+<style lang="less" scoped>
+.style {
+  width: 100%;
+  min-height: 667px;
+  position: relative;
+  background-color: #f9fafc;
+}
+.top {
+  height: 46px;
+  overflow: hidden;
+}
+.main {
+  min-height: 570px;
+}
+</style>