|
@@ -50,26 +50,29 @@ class ScoreLogLogic
|
|
|
|
|
|
/**
|
|
|
* 积分记录
|
|
|
- * @param mixed $page
|
|
|
- * @param mixed $limit
|
|
|
- * @param mixed $where
|
|
|
+ * @param $page
|
|
|
+ * @param $limit
|
|
|
+ * @param $where
|
|
|
* @param array $sort
|
|
|
* @return array
|
|
|
* @throws \think\db\exception\DataNotFoundException
|
|
|
* @throws \think\db\exception\DbException
|
|
|
* @throws \think\db\exception\ModelNotFoundException
|
|
|
*/
|
|
|
- public static function scoreLog(mixed $page, mixed $limit, mixed $where, array $sort)
|
|
|
+ public static function scoreLog($page, $limit, $where, $sort)
|
|
|
{
|
|
|
$model = new ScoreLogModel();
|
|
|
$count = $model
|
|
|
->where($where)
|
|
|
->count();
|
|
|
- $type_conf = config('type.score');
|
|
|
+ $type_conf = config('type.scoreAll');
|
|
|
$list = $model
|
|
|
->where($where)
|
|
|
->withAttr('type', function ($value, $data) use ($type_conf) {
|
|
|
- return $type_conf[$value];
|
|
|
+ if (array_key_exists($value, $type_conf)) {
|
|
|
+ return $type_conf[$value];
|
|
|
+ }
|
|
|
+ return '';
|
|
|
})
|
|
|
->withAttr('score', function ($value, $data) {
|
|
|
if ($data['state'] == 2)
|