xiaogang 3 năm trước cách đây
mục cha
commit
40f8cb1044

+ 1 - 1
app/Http/Controllers/Api/DynamicController.php

xqd
@@ -95,7 +95,7 @@ class DynamicController extends Controller
                 $banner[$k]['img_url'] = "https://".$oss_config['bucket'].'.'.$oss_config['endpoint'].'/'.$v['img_url'];
             }
             $res['banner'] = $banner;
-            $res['tag'] = DB::table("dynamic_tag")->orderBy('hot','desc')->limit(10)->get();
+            $res['tag'] = DB::table("dynamic_tag")->where('type',0)->orderBy('hot','desc')->limit(10)->get();
             $res['fx'] = SystemConfig::query()->where('id',1)->value("value");
         }catch (\Exception $exception){
             return $this->response->errorForbidden($exception->getMessage());

+ 2 - 1
app/Services/DynamicService.php

xqd
@@ -69,7 +69,8 @@ class DynamicService
                         }else{
                             $id = DB::table('dynamic_tag')->insertGetId([
                                 "title"=>htmlspecialchars($v['title']),
-                                "hot"=>1
+                                "hot"=>1,
+                                "type"=>1
                             ]);
                         }
                     }else{