764ed018 by yangjianbin

init

1 parent 0e762955
......@@ -28,6 +28,10 @@ class CheckLogin
if (!$session->operatorManagers) {
$session->operatorManagers = $this->getOperatorManagers();
}
if (!$session->repayments) {
$session->repayments = $this->getRepayment();
}
/*if (preg_match("/admin|base/i", uri_string())) {
......@@ -97,4 +101,16 @@ class CheckLogin
}
}
private function getRepayment()
{
try {
$url = $this->CI->config->item('apiBaseUrl') . 'config/enum/repayment';
$res = json_decode(file_get_contents($url));
$products = $res->data;
return $products;
} catch (Exception $e) {
return array();
}
}
}
\ No newline at end of file
......
......@@ -36,7 +36,9 @@
<span class="form-control select-box">
<select class="select" size="1" name="repaymentMode">
<option>请选择</option>
<option value="1">1</option>
<?php foreach ($this->session->repayments as $k=>$v):?>
<option <?=$k == $data->repaymentMode ? 'selected' : '' ?> 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!