be477444 by yangjianbin

init

1 parent d960a6ec
......@@ -36,6 +36,9 @@ class CheckLogin
$session->repaymentPlans = $this->getRepaymentPlans();
}
if(!$session->repaymentPlanSource){
$session->repaymentPlanSource = getRepaymentPlanSource();
}
/*if (preg_match("/admin|base/i", uri_string())) {
......@@ -128,4 +131,15 @@ class CheckLogin
}
}
private function getRepaymentPlanSource(){
try {
$url = $this->CI->config->item('apiBaseUrl') . 'enum/repaymentPlan/source';
$res = json_decode(file_get_contents($url));
$products = $res->data;
return $products;
} catch (Exception $e) {
return array();
}
}
}
\ No newline at end of file
......
......@@ -36,9 +36,8 @@
<span class="select-box">
<select class="select table_search" size="1">
<option value="" selected>是否逾期</option>
<option value="1">菜单一</option>
<option value="2">菜单二</option>
<option value="3">菜单三</option>
<option value="0"></option>
<option value="1"></option>
</select>
</span>
</div>
......@@ -46,9 +45,9 @@
<span class="select-box">
<select class="select table_search" size="1">
<option value="" selected>来源</option>
<option>李四</option>
<option>菜单二</option>
<option>菜单三</option>
<?php foreach ($this->session->repaymentPlanSource as $k => $v): ?>
<option value="<?= $k ?>"><?= $v ?></option>
<?php endforeach; ?>
</select>
</span>
</div>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!