添加了默认数据
This commit is contained in:
@@ -187,6 +187,33 @@ const loadBeansHistory = async () => {
|
||||
beansHistory.value = data.data.history
|
||||
pagination.total = data.data.total
|
||||
} catch (error) {
|
||||
beansHistory.value = [{
|
||||
id: 1,
|
||||
username: 'test1',
|
||||
type: 'register',
|
||||
beans: 100,
|
||||
balance_after: 100,
|
||||
description: '注册奖励',
|
||||
created_at: '2025-09-09 00:00:00'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
username: 'test2',
|
||||
type: 'purchase',
|
||||
beans: -100,
|
||||
balance_after: 0,
|
||||
description: '商品兑换',
|
||||
created_at: '2025-09-09 00:00:00'
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
username: 'test3',
|
||||
type: 'refund',
|
||||
beans: 100,
|
||||
balance_after: 100,
|
||||
description: '订单退款',
|
||||
created_at: '2025-09-09 00:00:00'
|
||||
}]
|
||||
ElMessage.error('加载融豆历史失败')
|
||||
} finally {
|
||||
loading.value = false
|
||||
|
||||
Reference in New Issue
Block a user