This commit is contained in:
evoxwht 2023-06-30 16:36:54 +08:00
parent ff67c6f55d
commit 439b756fa3
2 changed files with 12 additions and 3 deletions

View File

@ -202,8 +202,11 @@ class UserMoneyServices extends BaseServices
/** @var UserServices $userServices */
$userServices = app()->make(UserServices::class);
$data['now_balance'] = $userServices->sum(['status' => 1], 'now_money', true);
$data['add_balance'] = $this->dao->sum(['pm' => 1], 'number', true);
$data['sub_balance'] = $this->dao->sum(['pm' => 0], 'number', true);
$data['add_balance'] = $this->dao->sum([
['pm', '=', 1],
['type', 'in', ['system_add', 'recharge', 'extract', 'lottery_add', 'register_system_add']]
], 'number', false);
$data['sub_balance'] = bcsub($data['add_balance'], $data['now_balance'], 2);
return $data;
}

View File

@ -99,7 +99,8 @@
loading: false
}
},
onLoad() {
onShow() {
this.clear();
this.getIndex();
this.getList();
// this.$scroll(this.$refs.container, () => {
@ -107,6 +108,11 @@
// });
},
methods: {
clear(){
this.loaded = false;
this.list = []
this.where.page = 1;
},
getIndex: function() {
var that = this;
getStatisticsInfo().then(