AddController.class.php 639 Bytes
<?php
/**
 * 【考试中心-后台】新增激励规则
 * AddController.class.php
 * User: 何岳龙
 * Date: 2017年6月1日14:46:56
 */

namespace Apicp\Controller\Encourage;

class AddController extends AbstractController
{
    public function Index_post()
    {

        $params = I('post.');

        // 添加激励验证
        if (!$this->medal_service->add_medal_validation($params)) {

            return false;
        }

        // 添加激励
        if (!$this->medal_service->add_medal($params)) {

            return false;
        }

        // 返回数据
        $this->_result = [];

        return true;
    }

}