AddPlanController.class.php 875 Bytes
<?php
/**
 * 【后台】新增照片墙接口
 * AddPlanController.class.php
 * User: caijianhua
 * Date: 2017/8/29
 * Time: 下午5:15
 */

namespace Apicp\Controller\Pic;

use Common\Service\PlanService;

class AddPlanController extends \Apicp\Controller\AbstractController
{
    /** @var  PlanService 照片表 */
    protected $plan_service;

    public function before_action($action = '')
    {
        if (!parent::before_action($action)) {
            return false;
        }
        $this->plan_service = new PlanService();
        return true;
    }

    /**
     * 【后台】新增照片墙接口
     *
     * @author 蔡建华
     */
    public function Index_post()
    {
        $params = I('post.');
        // 新增照片墙以及照片数据
        $this->_result['plan_id'] = $this->plan_service->add_pic_plan($params);

        return true;
    }
}