User.php 2.55 KB
<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class User extends CI_Controller {

    /**
     * 控制台默认页面
     */
    public function index()
    {
        $this->load->view('user/index');
    }

    public function info($id,$state = null)
    {
        $res = json_decode(file_get_contents($this->config->item('apiBaseUrl') . 'client/client/' . $id));
        $data = $res->data;
        $arr = array(
            'clientInfoOutputVO'=>$data->clientInfoOutputVO,
            'clientUnitOutputVO'=>$data->clientUnitOutputVO,
            'clientContactOutputVOS'=>$data->clientContactOutputVOS,
            'applyOrderVO'=>$data->applyOrderVO,
            'id'=>$data->applyOrderVo->id
        );
        switch ($state) {
            case '1':
                $this->load->view('user/资料清单', $arr);
                break;
            case '2':
                $this->load->view('user/基本信息', $arr);
                break;
            case '3':
                $this->load->view('user/人脉圈', $arr);
                break;
            case '4':
                $this->load->view('user/风险识别', $arr);
                break;
            case '5':
                $this->load->view('user/交易记录', $arr);
                break;
            default:
                $this->load->view('user/资料清单', $arr);
                break;
        }
    }

    public function data($format = 'days')
    {
        $data = array();
        switch ($format) {
            case 'days':
                $data['labels'] = array(31, 1, 2, 3, 4, 5, 6);
                $data['datasets'] = [
                    ['label' => '用户量趋势图', 'data' => [30, 50, 30, 60, 32, 54, 43]]
                ];
                break;
            case 'weeks':
                $data['labels'] = [7, 1, 2, 3, 4, 5, 6];
                $data['datasets'] = [
                    ['label' => '用户量趋势图', 'data' => [30, 50, 30, 60, 32, 54, 43]]
                ];
            case 'months':
                $data['labels'] = [7, 1, 2, 3, 4, 5, 6];
                $data['datasets'] = [
                    ['label' => '用户量趋势图', 'data' => [30, 50, 30, 60, 32, 54, 43]]
                ];
            case 'years':
                $data['labels'] = [7, 1, 2, 3, 4, 5, 6];
                $data['datasets'] = [
                    ['label' => '用户量趋势图', 'data' => [30, 50, 30, 60, 32, 54, 43]]
                ];
                break;
        }

        $this->output->set_content_type('application/json')->set_output(json_encode($data));
    }
}