19 lines
372 B
PHP
Executable File
19 lines
372 B
PHP
Executable File
<?php
|
|
namespace app\common\model\distribution;
|
|
|
|
use app\common\basics\Models;
|
|
use app\common\enum\DistributionPartnerEnum;
|
|
|
|
class DistributionPartner extends Models
|
|
{
|
|
public function getProportionAttr($value)
|
|
{
|
|
$arr = explode('.', $value);
|
|
if ($arr[1] > 0) {
|
|
return $value . '%';
|
|
}
|
|
|
|
return intval($value) . '%';
|
|
}
|
|
}
|