This commit is contained in:
@@ -173,4 +173,28 @@ class Receipt extends BaseController
|
||||
|
||||
return view("pages/article/receipt/detail", $this->data);
|
||||
}
|
||||
|
||||
|
||||
// 연락처 저장
|
||||
public function saveTel()
|
||||
{
|
||||
try {
|
||||
|
||||
$tel = $this->request->getPost('agent_tel');
|
||||
|
||||
$this->model->saveTel($tel);
|
||||
|
||||
|
||||
return $this->response->setJSON([
|
||||
'code' => '0',
|
||||
'msg' => 'success'
|
||||
]);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return $this->response->setJSON([
|
||||
'code' => '9',
|
||||
'msg' => $e->getMessage(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
40
app/Controllers/Interest/Rates.php
Normal file
40
app/Controllers/Interest/Rates.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
namespace App\Controllers\Interest;
|
||||
|
||||
use App\Controllers\BaseController;
|
||||
use App\Models\common\CodeModel;
|
||||
use App\Models\interest\RatesModel;
|
||||
|
||||
class Rates extends BaseController
|
||||
{
|
||||
private $model, $codeModel;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->model = new RatesModel();
|
||||
$this->codeModel = new CodeModel();
|
||||
}
|
||||
|
||||
public function lists(): string
|
||||
{
|
||||
|
||||
$codes = $this->codeModel->getCodeLists(['BANK', 'INSURANCE', 'LOAN_PLACE']); // 코드조회
|
||||
|
||||
$placeArr = [];
|
||||
foreach ($codes as $c) {
|
||||
if ($c['category'] == "LOAN_PLACE") {
|
||||
array_push($placeArr, $c);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$data = $this->model->getLists();
|
||||
|
||||
|
||||
$this->data['place'] = $placeArr;
|
||||
$this->data['data'] = $data;
|
||||
|
||||
return view("pages/interest/list", $this->data);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user