764ed018 by yangjianbin

init

1 parent 0e762955
...@@ -28,6 +28,10 @@ class CheckLogin ...@@ -28,6 +28,10 @@ class CheckLogin
28 if (!$session->operatorManagers) { 28 if (!$session->operatorManagers) {
29 $session->operatorManagers = $this->getOperatorManagers(); 29 $session->operatorManagers = $this->getOperatorManagers();
30 } 30 }
31 if (!$session->repayments) {
32 $session->repayments = $this->getRepayment();
33 }
34
31 35
32 36
33 /*if (preg_match("/admin|base/i", uri_string())) { 37 /*if (preg_match("/admin|base/i", uri_string())) {
...@@ -97,4 +101,16 @@ class CheckLogin ...@@ -97,4 +101,16 @@ class CheckLogin
97 } 101 }
98 } 102 }
99 103
104 private function getRepayment()
105 {
106 try {
107 $url = $this->CI->config->item('apiBaseUrl') . 'config/enum/repayment';
108 $res = json_decode(file_get_contents($url));
109 $products = $res->data;
110 return $products;
111 } catch (Exception $e) {
112 return array();
113 }
114 }
115
100 } 116 }
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -36,7 +36,9 @@ ...@@ -36,7 +36,9 @@
36 <span class="form-control select-box"> 36 <span class="form-control select-box">
37 <select class="select" size="1" name="repaymentMode"> 37 <select class="select" size="1" name="repaymentMode">
38 <option>请选择</option> 38 <option>请选择</option>
39 <option value="1">1</option> 39 <?php foreach ($this->session->repayments as $k=>$v):?>
40 <option <?=$k == $data->repaymentMode ? 'selected' : '' ?> value="<?=$k?>"><?=$v?></option>
41 <?php endforeach;?>
40 </select> 42 </select>
41 </span> 43 </span>
42 </div> 44 </div>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!