正在显示
4 个修改的文件
包含
17 行增加
和
16 行删除
| @@ -28,18 +28,6 @@ use Mrgoon\AliSms\AliSms; | @@ -28,18 +28,6 @@ use Mrgoon\AliSms\AliSms; | ||
| 28 | class RatingController extends BaseController | 28 | class RatingController extends BaseController |
| 29 | { | 29 | { |
| 30 | /** | 30 | /** |
| 31 | - * @remark :获取问卷调查记录 | ||
| 32 | - * @name :getHistory | ||
| 33 | - * @author :lyh | ||
| 34 | - * @method :post | ||
| 35 | - * @time :2024/1/20 15:03 | ||
| 36 | - */ | ||
| 37 | - public function getHistory(ScoringSystem $scoringSystem){ | ||
| 38 | - $info = $scoringSystem->read($this->map); | ||
| 39 | - $this->response('success',Code::SUCCESS,$info); | ||
| 40 | - } | ||
| 41 | - | ||
| 42 | - /** | ||
| 43 | * @remark :问卷调查详情 | 31 | * @remark :问卷调查详情 |
| 44 | * @name :getProjectRead | 32 | * @name :getProjectRead |
| 45 | * @author :lyh | 33 | * @author :lyh |
| @@ -47,6 +35,11 @@ class RatingController extends BaseController | @@ -47,6 +35,11 @@ class RatingController extends BaseController | ||
| 47 | * @time :2024/1/20 14:11 | 35 | * @time :2024/1/20 14:11 |
| 48 | */ | 36 | */ |
| 49 | public function getProjectRead(RatingLogic $ratingLogic){ | 37 | public function getProjectRead(RatingLogic $ratingLogic){ |
| 38 | + $this->request->validate([ | ||
| 39 | + 'type' => 'required', | ||
| 40 | + ],[ | ||
| 41 | + 'type.required' => '问题类型不能为空', | ||
| 42 | + ]); | ||
| 50 | $info = $ratingLogic->getRatingRead(); | 43 | $info = $ratingLogic->getRatingRead(); |
| 51 | $this->response('success',Code::SUCCESS,$info); | 44 | $this->response('success',Code::SUCCESS,$info); |
| 52 | } | 45 | } |
| @@ -59,6 +52,13 @@ class RatingController extends BaseController | @@ -59,6 +52,13 @@ class RatingController extends BaseController | ||
| 59 | * @time :2024/1/20 14:43 | 52 | * @time :2024/1/20 14:43 |
| 60 | */ | 53 | */ |
| 61 | public function save(RatingLogic $ratingLogic){ | 54 | public function save(RatingLogic $ratingLogic){ |
| 55 | + $this->request->validate([ | ||
| 56 | + 'data' => 'required', | ||
| 57 | + 'mobile' => 'required', | ||
| 58 | + ],[ | ||
| 59 | + 'data.required' => '请填写完整', | ||
| 60 | + 'mobile.required' => '手机号码不能为空', | ||
| 61 | + ]); | ||
| 62 | $ratingLogic->ratingSave(); | 62 | $ratingLogic->ratingSave(); |
| 63 | $this->response('success'); | 63 | $this->response('success'); |
| 64 | } | 64 | } |
| @@ -36,7 +36,7 @@ class RatingLogic extends BaseLogic | @@ -36,7 +36,7 @@ class RatingLogic extends BaseLogic | ||
| 36 | 'mobile'=>$this->project['mobile'], | 36 | 'mobile'=>$this->project['mobile'], |
| 37 | 'uptime'=>$this->project['uptime'], | 37 | 'uptime'=>$this->project['uptime'], |
| 38 | 'domain'=>$this->user['domain'], | 38 | 'domain'=>$this->user['domain'], |
| 39 | - 'question'=>$this->model->list(), | 39 | + 'question'=>$this->model->list(['type'=>$this->param['type']]), |
| 40 | ]; | 40 | ]; |
| 41 | return $this->success($data); | 41 | return $this->success($data); |
| 42 | } | 42 | } |
| @@ -50,7 +50,7 @@ class RatingLogic extends BaseLogic | @@ -50,7 +50,7 @@ class RatingLogic extends BaseLogic | ||
| 50 | */ | 50 | */ |
| 51 | public function ratingSave(){ | 51 | public function ratingSave(){ |
| 52 | $param = [ | 52 | $param = [ |
| 53 | - 'data'=>$this->param['data'], | 53 | + 'data'=>json_encode($this->param['data']), |
| 54 | 'mobile'=>$this->param['mobile'], | 54 | 'mobile'=>$this->param['mobile'], |
| 55 | 'project_id'=>$this->user['project_id'], | 55 | 'project_id'=>$this->user['project_id'], |
| 56 | ]; | 56 | ]; |
| @@ -170,6 +170,7 @@ class UserLoginLogic | @@ -170,6 +170,7 @@ class UserLoginLogic | ||
| 170 | $info['upload_config'] = $project['upload_config']; | 170 | $info['upload_config'] = $project['upload_config']; |
| 171 | $info['main_lang_id'] = $project['main_lang_id']; | 171 | $info['main_lang_id'] = $project['main_lang_id']; |
| 172 | $info['image_max'] = $project['image_max']; | 172 | $info['image_max'] = $project['image_max']; |
| 173 | + $info['uptime'] = $project['uptime']; | ||
| 173 | $info['is_update_language'] = $project['is_update_language']; | 174 | $info['is_update_language'] = $project['is_update_language']; |
| 174 | $info['configuration'] = $project['deploy_build']['configuration']; | 175 | $info['configuration'] = $project['deploy_build']['configuration']; |
| 175 | $info['project_type'] = $project['type']; | 176 | $info['project_type'] = $project['type']; |
| @@ -208,6 +209,7 @@ class UserLoginLogic | @@ -208,6 +209,7 @@ class UserLoginLogic | ||
| 208 | $info['upload_config'] = $project['upload_config']; | 209 | $info['upload_config'] = $project['upload_config']; |
| 209 | $info['main_lang_id'] = $project['main_lang_id']; | 210 | $info['main_lang_id'] = $project['main_lang_id']; |
| 210 | $info['image_max'] = $project['image_max']; | 211 | $info['image_max'] = $project['image_max']; |
| 212 | + $info['uptime'] = $project['uptime']; | ||
| 211 | $info['is_update_language'] = $project['is_update_language']; | 213 | $info['is_update_language'] = $project['is_update_language']; |
| 212 | $info['configuration'] = $project['deploy_build']['configuration']; | 214 | $info['configuration'] = $project['deploy_build']['configuration']; |
| 213 | $info['project_type'] = $project['type']; | 215 | $info['project_type'] = $project['type']; |
| @@ -478,11 +478,10 @@ Route::middleware(['bloginauth'])->group(function () { | @@ -478,11 +478,10 @@ Route::middleware(['bloginauth'])->group(function () { | ||
| 478 | Route::any('/extendContent', [\App\Http\Controllers\Bside\CustomModule\CustomModuleExtentController::class, 'extendContent'])->name('custom_extend_extendContent'); | 478 | Route::any('/extendContent', [\App\Http\Controllers\Bside\CustomModule\CustomModuleExtentController::class, 'extendContent'])->name('custom_extend_extendContent'); |
| 479 | }); | 479 | }); |
| 480 | }); | 480 | }); |
| 481 | - //优化关键词,检索关键词 | 481 | + //评分系统 |
| 482 | Route::prefix('rating')->group(function () { | 482 | Route::prefix('rating')->group(function () { |
| 483 | Route::any('/read', [\App\Http\Controllers\Bside\Scoring\RatingController::class, 'getProjectRead'])->name('rating_getProjectRead'); | 483 | Route::any('/read', [\App\Http\Controllers\Bside\Scoring\RatingController::class, 'getProjectRead'])->name('rating_getProjectRead'); |
| 484 | Route::any('/save', [\App\Http\Controllers\Bside\Scoring\RatingController::class, 'save'])->name('rating_save'); | 484 | Route::any('/save', [\App\Http\Controllers\Bside\Scoring\RatingController::class, 'save'])->name('rating_save'); |
| 485 | - Route::any('/getHistory', [\App\Http\Controllers\Bside\Scoring\RatingController::class, 'getHistory'])->name('rating_getHistory'); | ||
| 486 | }); | 485 | }); |
| 487 | }); | 486 | }); |
| 488 | //无需登录验证的路由组 | 487 | //无需登录验证的路由组 |
-
请 注册 或 登录 后发表评论