<?php
namespace app\index\controller;
use app\index\controller\Common;
use app\service\ApiService;
use app\service\SeoService;
use app\service\FormInputDataService;
* form表单数据
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-09-10
* @desc description
*/
class FormInputData extends Common
{
* 构造方法
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-11-30
* @desc description
*/
public function __construct()
{
parent::__construct();
if(!in_array($this->action_name, ['save']))
{
$this->IsLogin();
}
}
* 首页
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-09-10
* @desc description
*/
public function Index()
{
MyViewAssign('home_seo_site_title', SeoService::BrowserSeoTitle(MyLang('forminputdata.base_nav_title'), 1));
return MyView();
}
* 详情
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-09-10
* @desc description
*/
public function Detail()
{
MyViewAssign([
'data' => $this->data_detail,
'is_header' => 0,
'is_footer' => 0,
]);
return MyView();
}
* 保存
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-09-10
* @desc description
*/
public function Save()
{
$params = $this->data_request;
$params['user'] = $this->user;
return ApiService::ApiDataReturn(FormInputDataService::FormInputDataSave($params));
}
* 删除
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-09-10
* @desc description
*/
public function Delete()
{
$params = $this->data_request;
$params['user'] = $this->user;
return ApiService::ApiDataReturn(FormInputDataService::FormInputDataDelete($params));
}
}
?>