public function actionCloudCode() { $cloudCodeModel = new BmobCloudCode('leagueScoreSingle'); $res = $cloudCodeModel->get(array('leagueId' => '52a05804d7')); var_dump($res); exit; }
/** * @desc 调用云端代码更新联赛射手榜数据 */ public function actionUpdateShooterData() { $leagueId = Yii::app()->request->getPost('leagueid'); $cloudCodeModel = new BmobCloudCode('userGoalAssist'); $res = $cloudCodeModel->get(array('leagueId' => "{$leagueId}")); if (empty($res)) { CommonFunction::ajaxResult(State::$SHOOTER_RANGE_ERROR_CODE, State::$SHOOTER_RANGE_ERROR_MSG); } else { //更新射手榜发送推送 $baiduPushModel = new BaiduPushModel(); $baiduPushModel->sendMessageForAllLeague(4, 21, $leagueId, "更新了射手榜"); CommonFunction::ajaxResult(State::$SUSSION_CODE, State::$SUSSION_MSG, array('response' => $res)); } }