|
@@ -1,24 +1,24 @@
|
1
|
1
|
<template>
|
2
|
2
|
<div class="app-container">
|
3
|
3
|
<el-table :data="list" v-loading.body="listLoading" element-loading-text="Loading" border fit highlight-current-row>
|
4
|
|
- <el-table-column align="center" label='ID' width="95">
|
|
4
|
+ <el-table-column label="場" align="center">
|
5
|
5
|
<template slot-scope="scope">
|
6
|
|
- {{scope.$index}}
|
|
6
|
+ {{scope.row.game}}
|
7
|
7
|
</template>
|
8
|
8
|
</el-table-column>
|
9
|
|
- <el-table-column label="名稱">
|
|
9
|
+ <el-table-column label="點數" align="center">
|
10
|
10
|
<template slot-scope="scope">
|
11
|
|
- {{scope.row.name}}
|
|
11
|
+ <span>{{scope.row.chips}}</span>
|
12
|
12
|
</template>
|
13
|
13
|
</el-table-column>
|
14
|
|
- <el-table-column label="點數" width="110" align="center">
|
|
14
|
+ <el-table-column label="輸贏" align="center">
|
15
|
15
|
<template slot-scope="scope">
|
16
|
|
- <span>{{scope.row.chips}}</span>
|
|
16
|
+ <span>{{scope.row.earned}}</span>
|
17
|
17
|
</template>
|
18
|
18
|
</el-table-column>
|
19
|
|
- <el-table-column align="center" prop="created_at" label="操作" width="200">
|
|
19
|
+ <el-table-column label="時間" align="center">
|
20
|
20
|
<template slot-scope="scope">
|
21
|
|
- <!-- <span>{{scope.row.display_time}}</span> -->
|
|
21
|
+ <span>{{scope.row.createdAt}}</span>
|
22
|
22
|
</template>
|
23
|
23
|
</el-table-column>
|
24
|
24
|
</el-table>
|
|
@@ -28,7 +28,7 @@
|
28
|
28
|
<script>
|
29
|
29
|
|
30
|
30
|
import { mapGetters, mapActions } from 'vuex'
|
31
|
|
-// import { getList } from '@/api/table'
|
|
31
|
+import { fetchHistory } from '@/api/gambleMember'
|
32
|
32
|
|
33
|
33
|
export default {
|
34
|
34
|
data() {
|
|
@@ -38,19 +38,21 @@ export default {
|
38
|
38
|
}
|
39
|
39
|
},
|
40
|
40
|
created() {
|
41
|
|
- // this.fetchData()
|
|
41
|
+ this.fetchData()
|
42
|
42
|
},
|
|
43
|
+ props: ['member'],
|
43
|
44
|
methods: {
|
44
|
45
|
...mapActions([
|
45
|
46
|
'SetVisble'
|
46
|
47
|
]),
|
47
|
|
- // fetchData() {
|
48
|
|
- // this.listLoading = true
|
49
|
|
- // getList(this.listQuery).then(response => {
|
50
|
|
- // this.list = response.data
|
51
|
|
- // this.listLoading = false
|
52
|
|
- // })
|
53
|
|
- // }
|
|
48
|
+ fetchData() {
|
|
49
|
+ this.listLoading = true
|
|
50
|
+ fetchHistory(this.member).then(response => {
|
|
51
|
+ this.list = response.data
|
|
52
|
+ console.log(response.data)
|
|
53
|
+ this.listLoading = false
|
|
54
|
+ })
|
|
55
|
+ }
|
54
|
56
|
},
|
55
|
57
|
destroyed() {
|
56
|
58
|
this.SetVisble(true)
|