xieruidong 2 years ago
parent
commit
c72acee0ca
1 changed files with 4 additions and 1 deletions
  1. 4 1
      application/common/model/Goods.php

+ 4 - 1
application/common/model/Goods.php

@@ -84,7 +84,10 @@ class Goods Extends Model
 
     #维修费商品
     public static function getFixGoods(){
-        $goods=self::show()->where('is_fix',1)->order('id','desc')->find();
+        static $goods;
+        if(!$goods) {
+            $goods = self::show()->where('is_fix', 1)->order('id', 'desc')->find();
+        }
         return $goods;
     }