正在显示
3 个修改的文件
包含
26 行增加
和
0 行删除
| @@ -46,6 +46,18 @@ class GeoQuestionResController extends BaseController | @@ -46,6 +46,18 @@ class GeoQuestionResController extends BaseController | ||
| 46 | } | 46 | } |
| 47 | 47 | ||
| 48 | /** | 48 | /** |
| 49 | + * @remark :获取统计数据 | ||
| 50 | + * @name :getCount | ||
| 51 | + * @author :lyh | ||
| 52 | + * @method :post | ||
| 53 | + * @time :2025/7/8 17:18 | ||
| 54 | + */ | ||
| 55 | + public function getCount(){ | ||
| 56 | + $data = $this->logic->getCount(); | ||
| 57 | + $this->response('success',Code::SUCCESS,$data); | ||
| 58 | + } | ||
| 59 | + | ||
| 60 | + /** | ||
| 49 | * @remark :获取列表数据 | 61 | * @remark :获取列表数据 |
| 50 | * @name :getList | 62 | * @name :getList |
| 51 | * @author :lyh | 63 | * @author :lyh |
| @@ -22,6 +22,19 @@ class GeoQuestionResLogic extends BaseLogic | @@ -22,6 +22,19 @@ class GeoQuestionResLogic extends BaseLogic | ||
| 22 | } | 22 | } |
| 23 | 23 | ||
| 24 | /** | 24 | /** |
| 25 | + * @remark :获取类型统计数据 | ||
| 26 | + * @name :getCount | ||
| 27 | + * @author :lyh | ||
| 28 | + * @method :post | ||
| 29 | + * @time :2025/7/8 17:16 | ||
| 30 | + */ | ||
| 31 | + public function getCount(){ | ||
| 32 | + $type_1 = $this->model->counts(['type'=>1,'project_id'=>$this->user['project_id']]); | ||
| 33 | + $type_2 = $this->model->counts(['type'=>2,'project_id'=>$this->user['project_id']]); | ||
| 34 | + return $this->success(['type_1'=>$type_1,'type_2'=>$type_2]); | ||
| 35 | + } | ||
| 36 | + | ||
| 37 | + /** | ||
| 25 | * @remark :获取列表页数据 | 38 | * @remark :获取列表页数据 |
| 26 | * @name :getResultList | 39 | * @name :getResultList |
| 27 | * @author :lyh | 40 | * @author :lyh |
| @@ -754,6 +754,7 @@ Route::middleware(['bloginauth'])->group(function () { | @@ -754,6 +754,7 @@ Route::middleware(['bloginauth'])->group(function () { | ||
| 754 | Route::any('/getList', [\App\Http\Controllers\Bside\Geo\GeoQuestionResController::class,'getList'])->name('geo_result_getList'); | 754 | Route::any('/getList', [\App\Http\Controllers\Bside\Geo\GeoQuestionResController::class,'getList'])->name('geo_result_getList'); |
| 755 | Route::any('/getInfo', [\App\Http\Controllers\Bside\Geo\GeoQuestionResController::class,'getInfo'])->name('geo_result_getInfo'); | 755 | Route::any('/getInfo', [\App\Http\Controllers\Bside\Geo\GeoQuestionResController::class,'getInfo'])->name('geo_result_getInfo'); |
| 756 | Route::any('/getType', [\App\Http\Controllers\Bside\Geo\GeoQuestionResController::class, 'getType'])->name('geo_result_getType');//geo设置类型 | 756 | Route::any('/getType', [\App\Http\Controllers\Bside\Geo\GeoQuestionResController::class, 'getType'])->name('geo_result_getType');//geo设置类型 |
| 757 | + Route::any('/getCount', [\App\Http\Controllers\Bside\Geo\GeoQuestionResController::class, 'getCount'])->name('geo_result_getCount');//geo设置类型统计数量 | ||
| 757 | }); | 758 | }); |
| 758 | }); | 759 | }); |
| 759 | //无需登录验证的路由组 | 760 | //无需登录验证的路由组 |
-
请 注册 或 登录 后发表评论