3cdab7e4 by yangjianbin

init

1 parent 5327bd0a
...@@ -32,6 +32,10 @@ class CheckLogin ...@@ -32,6 +32,10 @@ class CheckLogin
32 $session->repayments = $this->getRepayment(); 32 $session->repayments = $this->getRepayment();
33 } 33 }
34 34
35 if (!$session->repaymentPlans) {
36 $session->repaymentPlans = $this->getRepaymentPlans();
37 }
38
35 39
36 40
37 /*if (preg_match("/admin|base/i", uri_string())) { 41 /*if (preg_match("/admin|base/i", uri_string())) {
...@@ -113,4 +117,15 @@ class CheckLogin ...@@ -113,4 +117,15 @@ class CheckLogin
113 } 117 }
114 } 118 }
115 119
120 private function getRepaymentPlans(){
121 try {
122 $url = $this->CI->config->item('apiBaseUrl') . 'enum/repaymentPlan/status';
123 $res = json_decode(file_get_contents($url));
124 $products = $res->data;
125 return $products;
126 } catch (Exception $e) {
127 return array();
128 }
129 }
130
116 } 131 }
...\ No newline at end of file ...\ No newline at end of file
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!