Explorar el Código

Merge branch 'dev_wf' of wufeng/fuse into version1.5

wufeng hace 2 años
padre
commit
de08966d14
Se han modificado 3 ficheros con 8 adiciones y 1 borrados
  1. 3 0
      app/admin/logic/AdminLogic.php
  2. 1 1
      app/admin/logic/VideoLogic.php
  3. 4 0
      public/nginx.htaccess

+ 3 - 0
app/admin/logic/AdminLogic.php

@@ -91,6 +91,7 @@ class AdminLogic extends BaseLogic
     //删除运营账号
     public static function delete(int $id = 0): Json
     {
+        if ($id == self::$uid) throw new ValidateException('不能删除当前账号');
 
         $rs = AdminModel::where(['id' => $id, 'is_del' => CommonModel::$del_normal])
             ->save([
@@ -105,6 +106,8 @@ class AdminLogic extends BaseLogic
     //启禁用运营账号
     public static function status(array $data = []): Json
     {
+        if ($data['id'] == self::$uid) throw new ValidateException('不能对当前账号进行操作');
+
         $data = array_merge($data, ['updatetime' => date('Y-m-d H:i:s')]);
 
         $rs = AdminModel::where(['id' => $data['id'], 'is_del' => CommonModel::$del_normal])

+ 1 - 1
app/admin/logic/VideoLogic.php

@@ -27,7 +27,7 @@ class VideoLogic extends BaseLogic
             ->select()
             ->toArray();
 
-        return json_show(CommonModel::$success, '获取成功', ['video' => $video, 'count' => $count]);
+        return json_show(CommonModel::$success, '获取成功', ['list' => $video, 'count' => $count]);
     }
 
     //添加视频

+ 4 - 0
public/nginx.htaccess

@@ -0,0 +1,4 @@
+if (!-e $request_filename) {
+   rewrite  ^/(.*)$  /index.php/$1  last;
+   break;
+}