/**
  * Creates a new MOfficeCampaignScore model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  * @return mixed
  */
 public function actionCreate()
 {
     $model = new MOfficeCampaignScore();
     if ($model->load(Yii::$app->request->post()) && $model->save()) {
         return $this->redirect(['view', 'id' => $model->id]);
     } else {
         return $this->render('create', ['model' => $model]);
     }
 }
Пример #2
0
 public function actionHandleqdxcjspb()
 {
     $this->layout = false;
     $gh_id = U::getSessionParam('gh_id');
     $openid = U::getSessionParam('openid');
     Yii::$app->wx->setGhId($gh_id);
     $office_campaign_id = empty($_GET['office_campaign_id']) ? 0 : $_GET['office_campaign_id'];
     $staff_id = empty($_GET['staff_id']) ? 0 : $_GET['staff_id'];
     $score = empty($_GET['score']) ? 0 : $_GET['score'];
     $comment = empty($_GET['comment']) ? '' : $_GET['comment'];
     $model = new MOfficeCampaignScore();
     //$model->gh_id = $gh_id;
     //$model->openid = $openid;
     $model->office_campaign_id = $office_campaign_id;
     $model->staff_id = $staff_id;
     $model->score = $score;
     $model->comment = $comment;
     $model->save(false);
     return json_encode(['code' => 0]);
 }