فهرست منبع

接口访问频繁的操作

lizhen_gitee 11 ماه پیش
والد
کامیت
bd7cf3eec2
3فایلهای تغییر یافته به همراه3 افزوده شده و 1 حذف شده
  1. 1 1
      addons/unishop/controller/Base.php
  2. 1 0
      addons/unishop/controller/Category.php
  3. 1 0
      addons/unishop/controller/Product.php

+ 1 - 1
addons/unishop/controller/Base.php

@@ -45,7 +45,7 @@ class Base extends Api
 
         $this->loadUniShopLang();
 
-        //$this->limitVisit();
+        $this->limitVisit();
     }
 
     /**

+ 1 - 0
addons/unishop/controller/Category.php

@@ -10,6 +10,7 @@ use think\Db;
 class Category extends Api
 {
 
+    protected $frequently = ['all','menu','inlist'];
     protected $noNeedLogin = ['all','menu','inlist'];
     protected $noNeedRight = ['*'];
 

+ 1 - 0
addons/unishop/controller/Product.php

@@ -16,6 +16,7 @@ use think\Exception;
 class Product extends Base
 {
     protected $noNeedLogin = ['detail', 'lists'];
+    protected $frequently = ['detail', 'lists'];
 
     /**
      * @ApiTitle    (产品详情)