<?php

/**
 * 星星兑换宝箱相关
 */
class StarExchange extends MY_Controller
{
    /**
     * @var array Post 数据
     */
    private $postData;

    public function __construct()
    {
        parent::__construct();

        $this->postData = $this->input->post();
    }

    //region 配置

    public function config()
    {
        $data = oo::commonOprModel('StarExchange')->configList();

        $this->load->view('starExchange/config', $data);
    }

    public function configUpdate()
    {
        oo::commonOprModel('StarExchange')->updateConfig($this->postData['good']);

        return $this->response(0, '操作成功');
    }

    //endregion
}
