作者 lyh

GXgeo设置

@@ -30,8 +30,8 @@ class GeoQuestionResLogic extends BaseLogic @@ -30,8 +30,8 @@ class GeoQuestionResLogic extends BaseLogic
30 */ 30 */
31 public function getCount(){ 31 public function getCount(){
32 $total = $this->model->counts(['project_id'=>$this->user['project_id']]); 32 $total = $this->model->counts(['project_id'=>$this->user['project_id']]);
33 - $type_1 = $this->model->counts(['type'=>1,'project_id'=>$this->user['project_id']]);  
34 - $type_2 = $this->model->counts(['type'=>2,'project_id'=>$this->user['project_id']]); 33 + $type_1 = $this->model->counts(['type'=>$this->model::BRAND_TYPE,'project_id'=>$this->user['project_id']]);
  34 + $type_2 = $this->model->counts(['type'=>$this->model::MARKETING_TYPE,'project_id'=>$this->user['project_id']]);
35 return $this->success(['total'=>$total,'type_1'=>$type_1,'type_2'=>$type_2]); 35 return $this->success(['total'=>$total,'type_1'=>$type_1,'type_2'=>$type_2]);
36 } 36 }
37 37
@@ -22,6 +22,9 @@ use App\Models\Base; @@ -22,6 +22,9 @@ use App\Models\Base;
22 class GeoQuestionResult extends Base 22 class GeoQuestionResult extends Base
23 { 23 {
24 protected $table = 'gl_geo_question_result'; 24 protected $table = 'gl_geo_question_result';
  25 +
  26 + const BRAND_TYPE = 1;//品牌类型
  27 + const MARKETING_TYPE = 2;//营销类型
25 /** 28 /**
26 * @remark :geo提交关键字获取器 29 * @remark :geo提交关键字获取器
27 * @name :getUrlAttribute 30 * @name :getUrlAttribute