Quellcode durchsuchen

修改调查问卷前段接口;去掉网站筛选

15313670163 vor 5 Tagen
Ursprung
Commit
cde8128ca5
1 geänderte Dateien mit 6 neuen und 6 gelöschten Zeilen
  1. 6 6
      app/JsonRpc/NewsService.php

+ 6 - 6
app/JsonRpc/NewsService.php

@@ -619,7 +619,7 @@ class NewsService implements NewsServiceInterface
                 return Result::error("暂无此网站",0);
                 return Result::error("暂无此网站",0);
             }
             }
             if(isset($data['sur_id']) && !empty($data['sur_id'])){
             if(isset($data['sur_id']) && !empty($data['sur_id'])){
-                $survey = ArticleSurvey::where('sur_id',$data['sur_id'])->where('website_id',$data['website_id'])->where('is_other',1)->where('other_id',0)->first(); 
+                $survey = ArticleSurvey::where('sur_id',$data['sur_id'])->where('is_other',1)->where('other_id',0)->first(); 
                 if(empty($survey)){
                 if(empty($survey)){
                     return Result::error("此调查问卷不可添加选项",0); 
                     return Result::error("此调查问卷不可添加选项",0); 
                 }
                 }
@@ -677,7 +677,7 @@ class NewsService implements NewsServiceInterface
                     }
                     }
                     $data['choice_id'] = array_map('intval', $data['choice_id']);
                     $data['choice_id'] = array_map('intval', $data['choice_id']);
                     $other = ArticleSurvey::whereIn('id',$data['choice_id'])
                     $other = ArticleSurvey::whereIn('id',$data['choice_id'])
-                    ->where('website_id',$data['website_id'])
+                    // ->where('website_id',$data['website_id'])
                     ->where('is_other',1)
                     ->where('is_other',1)
                     ->where('other_id',0)
                     ->where('other_id',0)
                     ->first();
                     ->first();
@@ -685,7 +685,7 @@ class NewsService implements NewsServiceInterface
                         return Result::error("请选择已有的选项!",0);
                         return Result::error("请选择已有的选项!",0);
                     }
                     }
                     $choice['other'] = ArticleSurvey::whereIn('id',$data['choice_id'])
                     $choice['other'] = ArticleSurvey::whereIn('id',$data['choice_id'])
-                    ->where('website_id',$data['website_id'])
+                    // ->where('website_id',$data['website_id'])
                     ->where('is_other',1)
                     ->where('is_other',1)
                     ->where('other_id','!=',0)
                     ->where('other_id','!=',0)
                     ->first();
                     ->first();
@@ -707,13 +707,13 @@ class NewsService implements NewsServiceInterface
                     }
                     }
                     // return Result::success($data);
                     // return Result::success($data);
                     $choice = ArticleSurvey::whereIn('id',$data['choice_id'])
                     $choice = ArticleSurvey::whereIn('id',$data['choice_id'])
-                    ->where('website_id',$data['website_id'])
+                    // ->where('website_id',$data['website_id'])
                     ->increment('results', 1);                 
                     ->increment('results', 1);                 
                     if(empty($choice)){
                     if(empty($choice)){
                         return Result::error("请选择已有的选项!",0);
                         return Result::error("请选择已有的选项!",0);
                     }
                     }
                     $survey['data'] = ArticleSurvey::where('sur_id',$data['sur_id'])
                     $survey['data'] = ArticleSurvey::where('sur_id',$data['sur_id'])
-                    ->where('website_id',$data['website_id'])
+                    // ->where('website_id',$data['website_id'])
                     ->where('other_id', 0)
                     ->where('other_id', 0)
                     ->get();
                     ->get();
                     $survey['choice'] = $choice_id;
                     $survey['choice'] = $choice_id;
@@ -1328,7 +1328,7 @@ class NewsService implements NewsServiceInterface
 
 
     }
     }
      /**
      /**
-     *获取头条类新闻模块-合集
+     *获取头条类新闻模块-合集(暂时用不到)
      * @param array $data
      * @param array $data
      * @return array
      * @return array
      */
      */