DengTao 8 년 전
부모
커밋
378cad771d
2개의 변경된 파일9개의 추가작업 그리고 4개의 파일을 삭제
  1. 7 3
      www/protected/modules/common/controllers/ActivityController.php
  2. 2 1
      www/protected/modules/o2o/models/Advisory.php

+ 7 - 3
www/protected/modules/common/controllers/ActivityController.php

@@ -45,7 +45,10 @@ class ActivityController extends O2oBaseController
   }
 //企业服务
   public function actionEnterprise(){
-    $this->render('Enterprise');
+      if (Yii::app()->request->getParam('success') == 1) {
+          CommonFn::requestAjax(true, '您的咨询已发送成功,请等待我们的企业管家与您联系,温馨提示,一般是一个工作日内,日间致电给您,请留意。');
+      }
+      $this->render('Enterprise');
   }
 
   public function actionSaveAdvisory(){
@@ -54,15 +57,16 @@ class ActivityController extends O2oBaseController
       $homeType = Yii::app()->request->getParam('homeType','');
       $num = Yii::app()->request->getParam('num','');
       $area = intval(Yii::app()->request->getParam('mobile'));
-
+      $tech_content = Yii::app()->request->getParam('tech_content','');
       $advisory = new Advisory();
       $advisory->user_name = $name;
       $advisory->area = $area;
       $advisory->homeType = $homeType;
       $advisory->num = $num;
       $advisory->area =$area;
+      $advisory->tech_content = $tech_content;
       if ($advisory->save()){
-          CommonFn::requestAjax(false,'你的咨询已提交成功');
+       $this->redirect('http://commontest.yiguanjia.me/index.php?r=common/Activity/SinglesDay&success=1');
       }
 
 

+ 2 - 1
www/protected/modules/o2o/models/Advisory.php

@@ -14,6 +14,7 @@ class Advisory extends MongoAr{
     public $homeType;
     public $num;
     public $sex;
+    public $tech_content;//服务内容
 
     public function __construct($scenario='insert'){
         $this->setMongoDBComponent(Yii::app()->getComponent('mongodb_o2o'));
@@ -52,7 +53,7 @@ class Advisory extends MongoAr{
         $newRow['homeType'] = CommonFn::get_val_if_isset($row,'homeType','');
         $newRow['num'] = CommonFn::get_val_if_isset($row,'num','');
         $newRow['sex'] = CommonFn::get_val_if_isset($row,'sex','');
-
+        $newRow['tech_content'] = CommonFn::get_val_if_isset($row,'tech_content','');
         if(APPLICATION=='admin'){
 
             $newRow['action_user'] = CommonFn::get_val_if_isset($row,'action_user',"");