|
@@ -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){
|