Esempio n. 1
0
 protected function dispatchRequest()
 {
     if (!$this->isBrokerLogin()) {
         $this->outPut(0, '请先登入');
     }
     // 伪登陆操作限制
     $managerCookie = $this->request->get_cookie('manager_id');
     if (!empty($managerCookie) && $this->isLimitPseudo) {
         $this->outPut(0, '您没有操作权限');
     }
     if (!isset($this->params['act']) || empty($this->params['act'])) {
         $this->outPut(-1, '参数错误');
     }
     $action_method = 'do_' . $this->params['act'];
     if (!method_exists($this, $action_method)) {
         $this->outPut(-1, '功能不存在');
     }
     $this->checkInputValid($this->params['act']);
     return $this->{$action_method}();
 }
Esempio n. 2
0
 /**
  * 重新定价推广
  *
  * @param int $brokerId
  * @param  AJKRequest $request
  * @return array
  */
 public function startPlan($brokerId, $request)
 {
     $managerCookie = $request->get_cookie('manager_id');
     if (!empty($managerCookie)) {
         return array('status' => 'error', 'data' => '没有操作权限。');
     }
     $planId = $request->get_parameter('planId');
     if (Bll_Ppc_ServiceAPI::restartFixPlan($brokerId, $planId, 21181)) {
         return array('status' => 'ok');
     }
     return array('status' => 'error', 'data' => '调用API错误');
 }