dlh_test_server/app/admin/controller/procurement/Treaty.php
2024-08-03 10:04:14 +08:00

32 lines
762 B
PHP
Executable File

<?php
namespace app\admin\controller\procurement;
use app\admin\logic\procurement\TreatyLogic;
use app\common\basics\AdminBase;
use app\common\server\JsonServer;
/**
* 入驻协议
* Class Treaty
* @package app\admin\controller\shop
*/
class Treaty extends AdminBase
{
public function index()
{
if ($this->request->isAjax()) {
$post = $this->request->post();
$res = TreatyLogic::set($post);
if ($res === false) {
$error = TreatyLogic::getError() ?: '更新失败';
return JsonServer::error($error);
}
return JsonServer::success('更新成功');
}
return view('', [
'detail' => TreatyLogic::detail()
]);
}
}