许成详 6 年前
父节点
当前提交
b45ae5e874
共有 2 个文件被更改,包括 39 次插入89 次删除
  1. 33
    89
      src/pages/system/dataStatistics/frontEndUserList/index.vue
  2. 6
    0
      src/util/api.js

+ 33
- 89
src/pages/system/dataStatistics/frontEndUserList/index.vue 查看文件

@@ -3,147 +3,91 @@
3 3
     <div class="system-table-search">
4 4
       <div class="flex-h">
5 5
         <div class="flex-item flex-h"></div>
6
-        <tableSearch value="请输入用户名称" @exportSearchKey="searchList"></tableSearch>
6
+        <tableSearch value="请输入用户手机号" @exportSearchKey="searchList"></tableSearch>
7 7
       </div>
8 8
       <div class="moreFilter"></div>
9 9
     </div>
10 10
     <div class="system-table-box">
11 11
       <el-table
12
-        :data="tableData"
12
+        :data="currentList"
13 13
         stripe
14 14
         style="width: 100%">
15 15
         <el-table-column
16
-          prop="name"
16
+          prop="Name"
17 17
           label="姓名">
18 18
         </el-table-column>
19 19
         <el-table-column
20
-          prop="phone"
20
+          prop="Phone"
21 21
           label="手机号">
22 22
         </el-table-column>
23 23
         <el-table-column
24
-          prop="nickName"
24
+          prop="CustomerName"
25 25
           label="微信昵称">
26 26
         </el-table-column>
27 27
         <el-table-column
28
-          prop="recommendName"
28
+          prop="RecommendName"
29 29
           label="推荐人">
30 30
         </el-table-column>
31 31
         <el-table-column
32
-          prop="integral"
32
+          prop="Points"
33 33
           label="积分">
34
-          <template slot-scope="scope">
35
-            -
36
-          </template>
37 34
         </el-table-column>
38 35
         <el-table-column
39
-          prop="openId"
36
+          prop="OpenId"
40 37
           label="openId">
41 38
         </el-table-column>
42
-        <el-table-column
43
-          prop="creatTime"
44
-          label="创建时间">
45
-        </el-table-column>
46 39
       </el-table>
47 40
     </div>
48 41
     <el-pagination
49
-      @size-change="handleSizeChange"
50 42
       @current-change="handleCurrentChange"
51
-      :current-page.sync="currentPage"
52
-      :page-size="10"
43
+      :current-page.sync="postData.page"
44
+      :page-size="postData.pagesize"
53 45
       layout="prev, pager, next, jumper"
54
-      :total="100">
46
+      :total="total">
55 47
     </el-pagination>
56 48
   </div>
57 49
 </template>
58 50
 
59 51
 <script>
60 52
 import tableSearch from '@/components/tableSearch/index'
61
-import { createNamespacedHelpers } from 'vuex'
62
-
63
-const { mapState: mapCaseState } = createNamespacedHelpers('case')
64 53
 
65 54
 export default {
66 55
   name: '',
67 56
   data () {
68 57
     return {
69
-      currentPage: 0, // 当前页码
70
-      tableSearch: { // 表格搜索条件
71
-        key: '', // 搜索关键字
72
-        caseId: '', // 案场id
58
+      total: 0,
59
+      postData: { // 表格搜索条件
60
+        phone: '', // 手机号
61
+        page: 1, // 当前页码
62
+        pagesize: 10, // 请求数据量
73 63
       },
74
-      tableData: [{
75
-        name: 'xxx',
76
-        phone: 'xxx',
77
-        nickName: 'xxx',
78
-        recommendName: 'xxx',
79
-        integral: 'xxx',
80
-        openId: 'xxx',
81
-        creatTime: 'xxx'
82
-      }, {
83
-        name: 'xxx',
84
-        phone: 'xxx',
85
-        nickName: 'xxx',
86
-        recommendName: 'xxx',
87
-        integral: 'xxx',
88
-        openId: 'xxx',
89
-        creatTime: 'xxx'
90
-      }, {
91
-        name: 'xxx',
92
-        phone: 'xxx',
93
-        nickName: 'xxx',
94
-        recommendName: 'xxx',
95
-        integral: 'xxx',
96
-        openId: 'xxx',
97
-        creatTime: 'xxx'
98
-      }, {
99
-        name: 'xxx',
100
-        phone: 'xxx',
101
-        nickName: 'xxx',
102
-        recommendName: 'xxx',
103
-        integral: 'xxx',
104
-        openId: 'xxx',
105
-        creatTime: 'xxx'
106
-      }]
64
+      currentList: [],
107 65
     }
108 66
   },
109
-  computed: {
110
-    ...mapCaseState({
111
-      caseList: x => x.caseList,
112
-    })
113
-  },
114 67
   components: {
115 68
     tableSearch,
116 69
   },
70
+  created () {
71
+    this.getList()
72
+  },
117 73
   methods: {
118
-    handleSizeChange (val) {
119
-      console.log(`每页 ${val} 条`)
120
-    },
121 74
     handleCurrentChange (val) {
122
-      console.log(`当前页: ${val}`)
75
+      this.getList()
123 76
     },
124
-    handleEdit (index, row) { // 编辑
125
-      console.log(index, row)
77
+    searchList (key) { // 搜索列表
78
+      this.postData.phone = key
79
+      this.postData.page = 1
80
+      this.getList()
126 81
     },
127
-    handleDelete (index, row) { // 删除
128
-      console.log(index, row)
129
-      this.$confirm('确认删除此渠道?', '提示', {
130
-        confirmButtonText: '确定',
131
-        cancelButtonText: '取消',
132
-        type: 'warning'
133
-      }).then(() => {
134
-        this.$message({
135
-          type: 'success',
136
-          message: '删除成功!'
137
-        })
138
-      }).catch(() => {
139
-        this.$message({
140
-          type: 'info',
141
-          message: '已取消删除'
142
-        })
82
+    getList () {
83
+      this.$ajax(this.$api.dataStatistics.getCustomerList.url, {
84
+        method: this.$api.dataStatistics.getCustomerList.method,
85
+        queryData: this.postData
86
+      }).then(res => {
87
+        this.currentList = res.list
88
+        this.postData.page = res.page
89
+        this.total = res.pagenum
143 90
       })
144
-    },
145
-    searchList (key) { // 搜索列表
146
-      console.log(key)
147 91
     }
148 92
   }
149 93
 }

+ 6
- 0
src/util/api.js 查看文件

@@ -337,5 +337,11 @@ const $api = {
337 337
       url: `${baseUrl}${common}/role/:id`
338 338
     },
339 339
   },
340
+  dataStatistics: {
341
+    getCustomerList: { // 获取会员列表
342
+      method: 'get',
343
+      url: `${baseUrl}${common}/customer`
344
+    }
345
+  },
340 346
 }
341 347
 export default $api