|
|
@@ -44,9 +44,30 @@ class SignController extends Controller
|
|
|
// 查询用户签到次数.
|
|
|
$countWeek = $signModel->countSign($getSignWhere, $weekBetween);
|
|
|
$countMonth = $signModel->countSign($getSignWhere, $monthBetween);
|
|
|
- $return = [
|
|
|
- 'countWeek' => $countWeek,
|
|
|
- 'countMonth' => $countMonth,
|
|
|
+
|
|
|
+ // 查询签到设置.
|
|
|
+ $signSelect = [
|
|
|
+ 'sign_title',
|
|
|
+ 'sign_data',
|
|
|
+ 'sign_name',
|
|
|
+ 'sign_type',
|
|
|
+ ];
|
|
|
+ $getConfig = $signModel->signConfig($signSelect, '', '');
|
|
|
+ $weekConfig = [];
|
|
|
+ $monthConfig = [];
|
|
|
+ foreach ($getConfig as $v) {
|
|
|
+ if ($v['sign_type'] === 1) {
|
|
|
+ $weekConfig[] = $v;
|
|
|
+ } else if ($v['sign_type'] === 2) {
|
|
|
+ $monthConfig[] = $v;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ $return = [
|
|
|
+ 'countWeek' => $countWeek,
|
|
|
+ 'countMonth' => $countMonth,
|
|
|
+ 'weekConfig' => $weekConfig,
|
|
|
+ 'monthConfig' => $monthConfig,
|
|
|
];
|
|
|
|
|
|
return toJson(1, '成功', $return);
|