vali 6 년 전
부모
커밋
411807f293
2개의 변경된 파일9개의 추가작업 그리고 0개의 파일을 삭제
  1. 7 0
      application/service/controller/Common.php
  2. 2 0
      application/service/controller/Dinterface.php

+ 7 - 0
application/service/controller/Common.php

@@ -48,6 +48,13 @@ class Common extends Base
 
     }//end verifyToken()
 
+    protected  function  doTokenCheck(){
+        if (!$this->verifyToken()){
+            return json(['code' => -1, 'data' => [], 'msg' => 'check false!']);
+            exit;
+        }
+    }
+
 
     /**
      * 获取用户信息

+ 2 - 0
application/service/controller/Dinterface.php

@@ -12,6 +12,8 @@ class Dinterface extends Common
 
     public function getNotice()
     {
+        $this->doTokenCheck();
+
         $uid = input('post.uid');
         $uid = intval(trim($uid, 'KF'));
         $rets = (new ServicenoticeModel())->where(['uid' => $uid, 'readtime' => 0])->order('id asc')->limit(20)->select();