| 1234567891011121314151617181920212223242526272829303132333435 |
- <?php
- namespace App\Services;
- use App\Http\Params\ProblemParam;
- use App\Models\UserProblemModel;
- use PHPUnit\Util\Exception;
- class UserService
- {
- /**
- * 问题反馈
- */
- public function problem(ProblemParam $param){
- if(empty($param->content)){
- throw new Exception("请输入问题");
- }
- $ins = array();
- $ins['user_id'] = $param->user_id;
- $ins['content'] = htmlspecialchars($param->content);
- $ins['img_url'] = $param->img_url;
- $ins['status'] = $param->status;
- UserProblemModel::query()->create($ins);
- return true;
- }
- /**
- * 看过我
- */
- public function looked_me($param){
- }
- }
|