jhzh
2024-03-23 b94e487fb76488bec6f78da1c820a634b199dd83
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
<template>
  <el-container class="user-center">
    <el-header class="user-header">
      <home-header></home-header>
    </el-header>
    <div class="usercot message">
      <el-container class="main-wrapper">
      <el-aside width="178px">
        <menu-box></menu-box>
      </el-aside>
      <el-main>
        <div class="wrapper">
          <div class="user-center-title" style="text-align:left;">
            <span class="iconfont icon-you" style="color:#C11815;font-size:18px;margin-right:10px"></span>
            站内消息
          </div>
          <el-table
            :data="list.list"
            style="width: 100%">
            <el-table-column
              prop="id"
              width="60px"
              label="id">
            </el-table-column>
            <el-table-column
              prop="typeName"
              width="90px"
              label="类型">
            </el-table-column>
            <el-table-column
              prop="status"
              width="100px"
              label="状态">
              <template slot-scope="scope">
                <el-tag :type="scope.row.status<=1?'danger':scope.row.status>1?'success':''">
                  <span v-if="scope.row.status == 2">已读</span>
                  <span v-else>未读</span>
                </el-tag>
              </template>
            </el-table-column>
            <el-table-column
              prop="content"
              label="内容">
            </el-table-column>
            <el-table-column
              prop="addTime"
              width="166px"
              label="时间">
              <template slot-scope="scope">
                <b v-if="scope.row.addTime">{{scope.row.addTime | timeFormat}}</b>
                <b v-else></b>
              </template>
            </el-table-column>
          </el-table>
          <el-pagination
            class="pull-right"
            @size-change="handleSizeChange"
            @current-change="handleCurrentChange"
            :current-page="list.pageNum"
            :page-sizes="[10, 20, 30, 40,50]"
            :page-size="list.pageSize"
            layout="sizes, prev, pager, next, jumper"
            :total="list.total">
          </el-pagination>
        </div>
        <!-- <home-footer :siteInfo="siteInfo"></home-footer> -->
      </el-main>
    </el-container>
    </div>
  </el-container>
 
</template>
 
<script>
  import HomeHeader from '../../../../components/HeaderOrder'
  import HomeFooter from '../../../../components/Footer'
  import MenuBox from '../menu'
  import * as api from '../../../../axios/api'
 
  export default {
    components: {
      HomeHeader,
      HomeFooter,
      MenuBox
    },
    props: {},
    data () {
      return {
        pageNum: 1,
        pageSize: 11,
        list: {
          list: []
        }
      }
    },
    watch: {},
    computed: {},
    created () {},
    mounted () {
      this.getlist()
      this.$store.state.userMenu = '2-13'
    },
    methods: {
      handleSizeChange (size) {
        this.pageSize = size
        this.getlist()
      },
      handleCurrentChange (page) {
        this.pageNum = page
        this.getlist()
      },
      async getlist () {
        // 获取 提现记录
        let opts = {
          pageNum: this.pageNum,
          pageSize: 10,
          userId: 0
        }
        let data = await api.getMessagelist(opts)
        if (data.status === 0) {
          this.list = data.data
          console.log(this.list)
          this.updateMessageStatus()
        } else {
          this.$message.error(data.msg)
        }
      },
      async updateMessageStatus () {
        // 获取 提现记录
        let opts = {}
        let data = await api.updateMessageStatus(opts)
        if (data.status === 0) {
        } else {
        }
      }
    }
  }
</script>
<style lang="less" scoped>
  .code {
    font-size: 12px;
    color: #999;
  }
 
  .main-wrapper {
    .wrapper {
      padding: 20px;
 
      .table-search {
        margin-bottom: 15px;
      }
    }
  }
</style>