xieruidong 2 years ago
parent
commit
b8d56fb20c
1 changed files with 7 additions and 1 deletions
  1. 7 1
      application/common/model/GoodsInstall.php

+ 7 - 1
application/common/model/GoodsInstall.php

@@ -4,7 +4,9 @@ namespace app\common\model;
 
 use think\Model;
 
-
+/**
+ * @property float fee_fix
+ */
 class GoodsInstall extends Model
 {
     protected $type=[
@@ -17,6 +19,10 @@ class GoodsInstall extends Model
     }
 
     public function getFee($num,$single=false){
+        if($single){
+            return $this->fee_fix;
+        }
+        return bcmul($this->fee_fix,$num);
         foreach ($this['fee'] as $fee){
             if($num>=$fee['num_min'] && $num<=$fee['num_max']){
                 if($single){