init
Showing
2 changed files
with
19 additions
and
6 deletions
| ... | @@ -36,6 +36,9 @@ class CheckLogin | ... | @@ -36,6 +36,9 @@ class CheckLogin |
| 36 | $session->repaymentPlans = $this->getRepaymentPlans(); | 36 | $session->repaymentPlans = $this->getRepaymentPlans(); |
| 37 | } | 37 | } |
| 38 | 38 | ||
| 39 | if(!$session->repaymentPlanSource){ | ||
| 40 | $session->repaymentPlanSource = getRepaymentPlanSource(); | ||
| 41 | } | ||
| 39 | 42 | ||
| 40 | 43 | ||
| 41 | /*if (preg_match("/admin|base/i", uri_string())) { | 44 | /*if (preg_match("/admin|base/i", uri_string())) { |
| ... | @@ -128,4 +131,15 @@ class CheckLogin | ... | @@ -128,4 +131,15 @@ class CheckLogin |
| 128 | } | 131 | } |
| 129 | } | 132 | } |
| 130 | 133 | ||
| 134 | private function getRepaymentPlanSource(){ | ||
| 135 | try { | ||
| 136 | $url = $this->CI->config->item('apiBaseUrl') . 'enum/repaymentPlan/source'; | ||
| 137 | $res = json_decode(file_get_contents($url)); | ||
| 138 | $products = $res->data; | ||
| 139 | return $products; | ||
| 140 | } catch (Exception $e) { | ||
| 141 | return array(); | ||
| 142 | } | ||
| 143 | } | ||
| 144 | |||
| 131 | } | 145 | } |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -36,9 +36,8 @@ | ... | @@ -36,9 +36,8 @@ |
| 36 | <span class="select-box"> | 36 | <span class="select-box"> |
| 37 | <select class="select table_search" size="1"> | 37 | <select class="select table_search" size="1"> |
| 38 | <option value="" selected>是否逾期</option> | 38 | <option value="" selected>是否逾期</option> |
| 39 | <option value="1">菜单一</option> | 39 | <option value="0">否</option> |
| 40 | <option value="2">菜单二</option> | 40 | <option value="1">是</option> |
| 41 | <option value="3">菜单三</option> | ||
| 42 | </select> | 41 | </select> |
| 43 | </span> | 42 | </span> |
| 44 | </div> | 43 | </div> |
| ... | @@ -46,9 +45,9 @@ | ... | @@ -46,9 +45,9 @@ |
| 46 | <span class="select-box"> | 45 | <span class="select-box"> |
| 47 | <select class="select table_search" size="1"> | 46 | <select class="select table_search" size="1"> |
| 48 | <option value="" selected>来源</option> | 47 | <option value="" selected>来源</option> |
| 49 | <option>李四</option> | 48 | <?php foreach ($this->session->repaymentPlanSource as $k => $v): ?> |
| 50 | <option>菜单二</option> | 49 | <option value="<?= $k ?>"><?= $v ?></option> |
| 51 | <option>菜单三</option> | 50 | <?php endforeach; ?> |
| 52 | </select> | 51 | </select> |
| 53 | </span> | 52 | </span> |
| 54 | </div> | 53 | </div> | ... | ... |
-
Please register or sign in to post a comment