a39e00fe by Zelig

Merge branch 'develop' of http://g.28ms.com:8000/yangjianbin/page into develop

2 parents 0ae3b0ae 0421b0dc
...@@ -58,7 +58,7 @@ $autoload['packages'] = array(); ...@@ -58,7 +58,7 @@ $autoload['packages'] = array();
58 | 58 |
59 | $autoload['libraries'] = array('user_agent' => 'ua'); 59 | $autoload['libraries'] = array('user_agent' => 'ua');
60 */ 60 */
61 $autoload['libraries'] = array(); 61 $autoload['libraries'] = array('session');
62 62
63 /* 63 /*
64 | ------------------------------------------------------------------- 64 | -------------------------------------------------------------------
......
...@@ -100,7 +100,7 @@ $config['charset'] = 'UTF-8'; ...@@ -100,7 +100,7 @@ $config['charset'] = 'UTF-8';
100 | setting this variable to TRUE (boolean). See the user guide for details. 100 | setting this variable to TRUE (boolean). See the user guide for details.
101 | 101 |
102 */ 102 */
103 $config['enable_hooks'] = FALSE; 103 $config['enable_hooks'] = TRUE;
104 104
105 /* 105 /*
106 |-------------------------------------------------------------------------- 106 |--------------------------------------------------------------------------
......
...@@ -11,3 +11,10 @@ defined('BASEPATH') OR exit('No direct script access allowed'); ...@@ -11,3 +11,10 @@ defined('BASEPATH') OR exit('No direct script access allowed');
11 | https://codeigniter.com/user_guide/general/hooks.html 11 | https://codeigniter.com/user_guide/general/hooks.html
12 | 12 |
13 */ 13 */
14 $hook['post_controller_constructor'] = array(
15 'class' => 'CheckLogin',
16 'function' => 'check',
17 'filename' => 'CheckLogin.php',
18 'filepath' => 'hooks',
19 'params' => array('beer', 'wine', 'snacks')
20 );
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -4,6 +4,11 @@ defined('BASEPATH') OR exit('No direct script access allowed'); ...@@ -4,6 +4,11 @@ defined('BASEPATH') OR exit('No direct script access allowed');
4 class Work extends CI_Controller 4 class Work extends CI_Controller
5 { 5 {
6 6
7 public function __construct(){
8 parent::__construct();
9 // $this->load->model();
10 }
11
7 /** 12 /**
8 * 控制台默认页面 13 * 控制台默认页面
9 */ 14 */
...@@ -85,7 +90,25 @@ class Work extends CI_Controller ...@@ -85,7 +90,25 @@ class Work extends CI_Controller
85 */ 90 */
86 public function detail($id = null) 91 public function detail($id = null)
87 { 92 {
88 $this->load->view('work/订单详情'); 93 $info = array();
94 $url = 'http://151.28ms.com:8088/order/detail/'.$id;
95
96 $context = stream_context_create(array(
97 'http' => array(
98 'method' => 'POST',
99 'header' => 'Content-type:application/x-www-form-urlencoded',
100 'content' => http_build_query($info),
101 'timeout' => 20
102 )
103 ));
104 $result = file_get_contents($url, false, $context);
105 $json = json_decode($result);
106 $ret = $json->data;
107 // var_dump($ret);exit;
108 $data = array(
109 'detail'=>$ret
110 );
111 $this->load->view('work/订单详情', $data);
89 } 112 }
90 113
91 /** 114 /**
...@@ -219,7 +242,7 @@ class Work extends CI_Controller ...@@ -219,7 +242,7 @@ class Work extends CI_Controller
219 $start = $_GET['start'] ? $_GET['start'] : 0; 242 $start = $_GET['start'] ? $_GET['start'] : 0;
220 $data['data'] = array(); 243 $data['data'] = array();
221 for ($i = 0; $i < 57; $i++) { 244 for ($i = 0; $i < 57; $i++) {
222 if ($i >= $start && $i < $start + 10){ 245 if ($i >= $start && $i < $start + 10) {
223 $arr = array( 246 $arr = array(
224 'id' => $i, 247 'id' => $i,
225 'name' => '小明' . $i 248 'name' => '小明' . $i
......
1 <?php
2
3 class CheckLogin
4 {
5 private $CI;
6
7 public function __construct()
8 {
9 $this->CI = &get_instance();
10 }
11
12 /** * 权限认证 */
13 public function check()
14 {
15 $session = $this->CI->session;
16 if (!$session->products) {
17 $session->products = $this->getProduct();
18 }
19 if (!$session->orderStatus) {
20 $session->orderStatus = $this->getOrderStatus();
21 }
22
23 /*if (preg_match("/admin|base/i", uri_string())) {
24 if(!$this->CI->session->isadmin){
25 redirect('login');
26 return;
27 }
28 }
29 if (preg_match('/ucenter/i', uri_string())) {
30 if (!$this->CI->session->islogin) {
31 redirect('login/app');
32 return;
33 }
34 }*/
35 }
36
37 private function getProduct()
38 {
39 $url = 'http://151.28ms.com:8088/config/products/';
40 $res = json_decode(file_get_contents($url));
41 $products = $res->data;
42 return $products;
43 }
44
45 private function getOrderStatus()
46 {
47 $url = 'http://151.28ms.com:8088/order/orderStatus/';
48 $res = json_decode(file_get_contents($url));
49 $products = $res->data;
50 return $products;
51 }
52
53 }
...\ No newline at end of file ...\ No newline at end of file
1 <?php
2
3 class Base_model extends CI_Model{
4
5 public function __construct(){
6 parent::__construct();
7 }
8
9 public function xx()
10 {
11 return 'xxx';
12 }
13
14
15 }
...\ No newline at end of file ...\ No newline at end of file
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
15 <div class="row cl mb-20"> 15 <div class="row cl mb-20">
16 <div class="col-xs-2"> 16 <div class="col-xs-2">
17 <span class="select-box"> 17 <span class="select-box">
18 <select class="select table_search" size="1" column="6"> 18 <select class="select table_search" name="departmentId" size="1" column="6">
19 <option value="" selected>网点</option> 19 <option value="" selected>网点</option>
20 <option value="1">菜单一</option> 20 <option value="1">菜单一</option>
21 <option value="2">菜单二</option> 21 <option value="2">菜单二</option>
...@@ -25,17 +25,17 @@ ...@@ -25,17 +25,17 @@
25 </div> 25 </div>
26 <div class="col-xs-2"> 26 <div class="col-xs-2">
27 <span class="select-box"> 27 <span class="select-box">
28 <select class="select table_search" size="1" column="7"> 28 <select class="select table_search" name="productId" size="1" column="7">
29 <option value="" selected>产品名称</option> 29 <option value="" selected>产品名称</option>
30 <option value="1">菜单一</option> 30 <?php foreach ($this->session->products as $k=>$v):?>
31 <option value="2">菜单二</option> 31 <option value="<?=$v->id?>"><?=$v->productName?></option>
32 <option value="3">菜单三</option> 32 <?php endforeach;?>
33 </select> 33 </select>
34 </span> 34 </span>
35 </div> 35 </div>
36 <div class="col-xs-2"> 36 <div class="col-xs-2">
37 <span class="select-box"> 37 <span class="select-box">
38 <select class="select table_search" size="1" column="10"> 38 <select class="select table_search" name="createUser" size="1" column="10">
39 <option value="" selected>客户经理</option> 39 <option value="" selected>客户经理</option>
40 <option>李四</option> 40 <option>李四</option>
41 <option>菜单二</option> 41 <option>菜单二</option>
...@@ -45,17 +45,17 @@ ...@@ -45,17 +45,17 @@
45 </div> 45 </div>
46 <div class="col-xs-2"> 46 <div class="col-xs-2">
47 <span class="select-box"> 47 <span class="select-box">
48 <select class="select table_search" size="1" column="11"> 48 <select class="select table_search" name="status" size="1" column="11">
49 <option value="" selected>流程节点</option> 49 <option value="" selected>流程节点</option>
50 <option>完成</option> 50 <?php foreach ($this->session->orderStatus as $k=>$v):?>
51 <option>菜单二</option> 51 <option value="<?=$k?>"><?=$v?></option>
52 <option>菜单三</option> 52 <?php endforeach;?>
53 </select> 53 </select>
54 </span> 54 </span>
55 </div> 55 </div>
56 <div class="col-xs-2"> 56 <div class="col-xs-2">
57 <span class="select-box"> 57 <span class="select-box">
58 <select class="select table_search" size="1" column="13"> 58 <select class="select table_search" name="modifyUser" size="1" column="13">
59 <option value="" selected>处理人</option> 59 <option value="" selected>处理人</option>
60 <option value="1">菜单一</option> 60 <option value="1">菜单一</option>
61 <option value="2">菜单二</option> 61 <option value="2">菜单二</option>
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
43 </div> 43 </div>
44 <div class="form-group col-sm-3 col-md-2"> 44 <div class="form-group col-sm-3 col-md-2">
45 <label>身份证</label> 45 <label>身份证</label>
46 <input type="text" class="form-control input-text" value="333333333333333331"> 46 <input type="text" class="form-control input-text" value="<?=$detail->clientInfoOutputVO ? $detail->clientInfoOutputVO->idCard : ''?>">
47 </div> 47 </div>
48 </div> 48 </div>
49 49
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!