UserWalletLog.php
591 字节
<?php
namespace addons\groupon\controller;
use addons\groupon\exception\Exception;
class UserWalletLog extends Base
{
protected $noNeedLogin = ['*'];
protected $noNeedRight = ['*'];
public function index()
{
$params = $this->request->get();
$wallet_type = $params['wallet_type'] ?? 'money';
if (!in_array($wallet_type, ['money', 'score'])) {
$this->error('参数错误');
}
$this->success(($wallet_type == 'money' ? '钱包记录' : '积分记录'), \addons\groupon\model\UserWalletLog::getList($params));
}
}