zj
2024-06-03 89d48809779ae41f8712539584798d5900b64b78
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
<template>
  <el-container class="user-center">
    <el-header class="user-header">
      <home-header></home-header>
    </el-header>
    <el-container class="main-wrapper">
      <el-aside width="200px">
        <menu-box></menu-box>
      </el-aside>
      <el-main>
        <account-box></account-box>
        <!-- <home-footer :siteInfo="siteInfo"></home-footer> -->
      </el-main>
    </el-container>
  </el-container>
</template>
 
<script>
  import HomeHeader from '../../../components/HeaderOrder'
  import HomeFooter from '../../../components/Footer'
  import AccountBox from './table/list'
  import MenuBox from './menu'
  import * as api from '../../../axios/api'
 
  export default {
    components: {
      HomeHeader,
      HomeFooter,
      AccountBox,
      MenuBox
    },
    props: {},
    data () {
      return {
        timer: null,
        form: {
          stock: '',
          pageNum: 1,
          pageSize: 15
        },
        list: {
          list: []
        },
        loading: false,
        refresh: false, // 刷新中
        changeTextClass: {} // 表格中的数据变化
      }
    },
    watch: {},
    computed: {},
    created () {
      this.timer = setInterval(this.refreshList, 60000)
      this.$store.state.activeIndex = 'user'
    },
    beforeDestroy () {
      clearInterval(this.timer)
    },
    mounted () {
      this.getUserInfo()
    },
    methods: {
      async getUserInfo () {
        // 获取用户信息
        let data = await api.getUserInfo()
        if (data.status === 0) {
          // 判断是否登录
          this.$store.state.userInfo = data.data
        } else {
          this.haslogin = false
          this.$store.state.haslogin = false
        }
      },
      handleOptions (opts) {
        this.form = { ...this.form, ...opts }
      }
    }
  }
</script>
<style lang="less" scoped>
  .table-box {
    padding-top: 65px;
    padding-bottom: 100px;
    width: 1200px;
    margin: 0 auto;
  }
 
  .table-search {
    padding: 20px 0;
 
    /deep/ .el-input-group__append {
      background-color: #353747;
      border-color: #353747;
    }
 
    /deep/ .el-input__inner {
      color: #fff;
      border-color: #353747;
      background-color: #24252c;
    }
  }
 
  .user-center {
    background: #fff;
 
    .user-header {
      background: rgba(0, 0, 0, 0.8);
    }
  }
 
  .con-box {
    padding-left: 20px;
  }
</style>