Browse Source

fix:权限

super-yimizi 1 month ago
parent
commit
b74e13aa78

+ 1 - 1
application/admin/controller/lottery/DrawRecord.php

@@ -150,7 +150,7 @@ class DrawRecord extends Backend
         }
         
         $this->view->assign("row", $row);
-        return $this->view->fetch('lottery/draw_record/detail');
+        return $this->view->fetch();
     }
 
     /**

+ 3 - 2
application/admin/view/lottery/draw_record/index.html

@@ -14,8 +14,9 @@
                         <a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a> -->
                     </div>
                     <table id="table" class="table table-striped table-bordered table-hover table-nowrap"
-                           data-operate-detail="{:$auth->check('lottery/drawrecord/detail')}"
-                           data-operate-del="{:$auth->check('lottery/drawrecord/del')}"
+                           data-operate-detail="{:$auth->check('lottery/draw_record/detail')}"
+                           data-operate-del="{:$auth->check('lottery/draw_record/del')}"
+                           data-operate-deliver="{:$auth->check('lottery/draw_record/deliver')}"
                            width="100%">
                     </table>
                 </div>

+ 29 - 0
application/api/controller/Version.php

@@ -0,0 +1,29 @@
+<?php
+
+namespace app\api\controller;
+
+use app\common\controller\Api;
+
+/**
+ * 示例接口
+ */
+class Version extends Base
+{
+
+    //如果$noNeedLogin为空表示所有接口都需要登录才能请求
+    //如果$noNeedRight为空表示所有接口都需要验证权限才能请求
+    //如果接口已经设置无需登录,那也就无需鉴权了
+    //
+    // 无需登录的接口,*表示全部
+    protected $noNeedLogin = ['getVersion'];
+    // 无需鉴权的接口,*表示全部
+    protected $noNeedRight = ['*'];
+
+   
+    public function getVersion()
+    {
+        $this->success('返回成功', $this->request->param());
+    }
+
+   
+}