| | |
| | | |
| | | protected static $topLevelName = ""; //顶级等级名称 |
| | | |
| | | protected static $buyCount=-1;//购买次数 |
| | | |
| | | protected static $returnLimit=1;//佣金全返的购买次数限制 |
| | | |
| | | |
| | | public function __construct(){ |
| | | $level = 1; |
| | |
| | | self::$userRate = $leveInfo['own_commission_rate'] * 0.01; |
| | | $topLevelInfo = $ModelUserLevel->where(['level'=>3])->find(); |
| | | if(empty($topLevelInfo)) fault('代理配置失败'); |
| | | //获取购买次数 |
| | | self::$buyCount=0; |
| | | if(self::$buyCount<=self::$returnLimit) |
| | | {//符合全返规则 |
| | | self::$userRate =1; |
| | | } |
| | | self::$topFanliRate = $topLevelInfo['own_commission_rate'] * 0.01; |
| | | self::$topLevelName = $topLevelInfo['level_name']; |
| | | } |
| | |
| | | 'dtitle' => '', //商品title |
| | | 'goodsSign' => '', |
| | | 'goods_sign'=>'', |
| | | 'goodsid' => '', |
| | | 'goodsid' => '', |
| | | 'goodsId'=>'', |
| | | 'huodongType' => '', |
| | | 'id' => '', |
| | | 'jiage' => '', |
| | |
| | | /** |
| | | * 计算商品展示返利金额 |
| | | * |
| | | * @param [type] $price |
| | | * @param [type] $commissionRate |
| | | * @param [type] $price 券后价 |
| | | * @param [type] $commissionRate 分佣比例 |
| | | * @return void |
| | | */ |
| | | public static function rebate($price,$commissionRate,$otherRate = "") |