|
|
@@ -8,7 +8,7 @@ namespace app\admin\controller;
|
|
|
|
|
|
class Settings extends Base
|
|
|
{
|
|
|
- // 功能菜单列表
|
|
|
+ // 访客端入口列表
|
|
|
public function index()
|
|
|
{
|
|
|
if(request()->isAjax()){
|
|
|
@@ -59,7 +59,7 @@ class Settings extends Base
|
|
|
return $this->fetch();
|
|
|
}
|
|
|
|
|
|
- // 添加功能菜单
|
|
|
+ // 添加访客端入口
|
|
|
public function add()
|
|
|
{
|
|
|
if(request()->isPost()){
|
|
|
@@ -111,7 +111,7 @@ class Settings extends Base
|
|
|
return $this->fetch('add');
|
|
|
}
|
|
|
|
|
|
- // 编辑功能菜单
|
|
|
+ // 编辑访客端入口
|
|
|
public function edit()
|
|
|
{
|
|
|
if(request()->isAjax()){
|
|
|
@@ -165,7 +165,7 @@ class Settings extends Base
|
|
|
return $this->fetch('edit');
|
|
|
}
|
|
|
|
|
|
- // 删除功能菜单
|
|
|
+ // 删除访客端入口
|
|
|
public function del()
|
|
|
{
|
|
|
if(request()->isAjax()){
|
|
|
@@ -230,4 +230,21 @@ class Settings extends Base
|
|
|
return json(['code' => 1, 'data' => $this->redirect('settings/index'), 'msg' => '自动邀请设置成功']);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ //访客端入口上边距设置
|
|
|
+ public function margin(){
|
|
|
+ if(request()->isPost()){
|
|
|
+
|
|
|
+ $param = input('post.');
|
|
|
+
|
|
|
+ $info['margin_top'] = $param['margin-top'];
|
|
|
+
|
|
|
+ try{
|
|
|
+ db('settings')->where('id', $param['id'])->update($info);
|
|
|
+ }catch(\Exception $e){
|
|
|
+ return json(['code' => -6, 'data' => 'settings/index', 'msg' => $e->getMessage()]);
|
|
|
+ }
|
|
|
+ return json(['code' => 1, 'data' => $this->redirect('settings/index'), 'msg' => '自动邀请设置成功']);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|