refactor:dashboard
This commit is contained in:
23
src/mock/transaction.js
Normal file
23
src/mock/transaction.js
Normal file
@@ -0,0 +1,23 @@
|
||||
import Mock from 'mockjs'
|
||||
|
||||
const List = []
|
||||
const count = 20
|
||||
|
||||
for (let i = 0; i < count; i++) {
|
||||
List.push(Mock.mock({
|
||||
order_no: '@guid()',
|
||||
timestamp: +Mock.Random.date('T'),
|
||||
username: '@name()',
|
||||
price: '@float(1000, 15000, 0, 2)',
|
||||
'status|1': ['success', 'pending']
|
||||
}))
|
||||
}
|
||||
|
||||
export default {
|
||||
getList: () => {
|
||||
return {
|
||||
total: List.length,
|
||||
items: List
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user