User.php
2.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<?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'=>applyOrderVO
);
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));
}
}