正在显示
4 个修改的文件
包含
36 行增加
和
4 行删除
| @@ -72,7 +72,7 @@ class GeoQuestionResController extends BaseController | @@ -72,7 +72,7 @@ class GeoQuestionResController extends BaseController | ||
| 72 | 'project_id.required' => 'project_id不能为空', | 72 | 'project_id.required' => 'project_id不能为空', |
| 73 | 'type.required' => '品牌类型不能为空' | 73 | 'type.required' => '品牌类型不能为空' |
| 74 | ]); | 74 | ]); |
| 75 | - $data = $this->logic->getResultList($this->map,$this->page,$this->row); | 75 | + $data = $this->logic->getResultList($this->map,$this->page,$this->row,$this->order,$this->param['sort'] ?? 'desc'); |
| 76 | $this->response('success',Code::SUCCESS,$data); | 76 | $this->response('success',Code::SUCCESS,$data); |
| 77 | } | 77 | } |
| 78 | 78 |
| @@ -46,7 +46,7 @@ class GeoQuestionResLogic extends BaseLogic | @@ -46,7 +46,7 @@ class GeoQuestionResLogic extends BaseLogic | ||
| 46 | * @method :post | 46 | * @method :post |
| 47 | * @time :2025/7/4 9:48 | 47 | * @time :2025/7/4 9:48 |
| 48 | */ | 48 | */ |
| 49 | - public function getResultList($map = [],$page = 1,$row = 20){ | 49 | + public function getResultList($map = [],$page = 1,$row = 20,$order = 'created_at',$sort){ |
| 50 | $map['project_id'] = $this->user['project_id']; | 50 | $map['project_id'] = $this->user['project_id']; |
| 51 | $filed = ['id','project_id','question_id','platform','is_match','question','en_question','keywords','url','label','cosine','created_at','updated_at']; | 51 | $filed = ['id','project_id','question_id','platform','is_match','question','en_question','keywords','url','label','cosine','created_at','updated_at']; |
| 52 | if(!empty($map['created_at'])){ | 52 | if(!empty($map['created_at'])){ |
| @@ -64,7 +64,7 @@ class GeoQuestionResLogic extends BaseLogic | @@ -64,7 +64,7 @@ class GeoQuestionResLogic extends BaseLogic | ||
| 64 | // $q->whereRaw('JSON_LENGTH(keywords) > 0') | 64 | // $q->whereRaw('JSON_LENGTH(keywords) > 0') |
| 65 | // ->orWhereRaw('JSON_LENGTH(url) > 0'); | 65 | // ->orWhereRaw('JSON_LENGTH(url) > 0'); |
| 66 | // }); | 66 | // }); |
| 67 | - $data = $query->orderByRaw('CHAR_LENGTH(question) ASC')->paginate($row, $filed, 'page', $page);; | 67 | + $data = $query->orderByRaw('CHAR_LENGTH(question) ASC')->orderBy($order,$sort)->paginate($row, $filed, 'page', $page);; |
| 68 | return $this->success($data); | 68 | return $this->success($data); |
| 69 | } | 69 | } |
| 70 | 70 |
| @@ -178,6 +178,38 @@ class Project extends Base | @@ -178,6 +178,38 @@ class Project extends Base | ||
| 178 | } | 178 | } |
| 179 | 179 | ||
| 180 | /** | 180 | /** |
| 181 | + * @remark :项目进度 | ||
| 182 | + * @name :projectProgress | ||
| 183 | + * @author :lyh | ||
| 184 | + * @method :post | ||
| 185 | + * @time :2025/9/3 14:47 | ||
| 186 | + */ | ||
| 187 | + public static function projectProgress($search){ | ||
| 188 | + $data = [ | ||
| 189 | + 'build' => [ | ||
| 190 | + 1 => '建立微信群', | ||
| 191 | + 2 => '对接资料', | ||
| 192 | + 3 => '确定风格', | ||
| 193 | + 4 => '资料上传', | ||
| 194 | + 5 => '页面调整', | ||
| 195 | + 6 => '关键词确认', | ||
| 196 | + 7 => '正式网站上线' | ||
| 197 | + ], | ||
| 198 | + 'optimize' => [ | ||
| 199 | + 1 => '开始推广', | ||
| 200 | + 2 => 'SEO设置', | ||
| 201 | + 3 => '排名达标', | ||
| 202 | + 4 => '剩余服务时常' | ||
| 203 | + ] | ||
| 204 | + ]; | ||
| 205 | + | ||
| 206 | + if(!empty($search)){ | ||
| 207 | + return $data[$search]; | ||
| 208 | + } | ||
| 209 | + return $data; | ||
| 210 | + } | ||
| 211 | + | ||
| 212 | + /** | ||
| 181 | * @remark :新增搜索 | 213 | * @remark :新增搜索 |
| 182 | * @name :searchParam | 214 | * @name :searchParam |
| 183 | * @author :lyh | 215 | * @author :lyh |
| @@ -42,7 +42,7 @@ class GeoService | @@ -42,7 +42,7 @@ class GeoService | ||
| 42 | 'platform' => $platform, | 42 | 'platform' => $platform, |
| 43 | 'security_check' => true | 43 | 'security_check' => true |
| 44 | ]; | 44 | ]; |
| 45 | - $data = http_post($url,json_encode($message,true),$header); | 45 | + $data = http_post($url,json_encode($message,true),$header,true,180); |
| 46 | return $data; | 46 | return $data; |
| 47 | } | 47 | } |
| 48 | 48 |
-
请 注册 或 登录 后发表评论