\lib\supplyPrice

Summary

Methods
Properties
Constants
load()
List()
Get()
Freight()
MatchProfitRatio()
$RankList
$RuleList
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$PriceCache
N/A

Properties

$RankList

$RankList : array

Type

array — | int 用户等级列表

$RuleList

$RuleList : array

Type

array — | int 基础加价规则[多用户等级批量加价]

$PriceCache

$PriceCache

Methods

load()

load() : bool

Returns

bool —

通用数据载入

List()

List( $Money,  $Profits,  $Gid = false, mixed  $selling = '{}', mixed  $SingleRule = -1, mixed  $Type = 1) : mixed

Parameters

$Money

根据成本和用户等级计算商品售价 取出全部等级售价列表

$Profits

商品利润比例

$Gid

商品ID

mixed $selling
mixed $SingleRule
mixed $Type

Returns

mixed —

Get()

Get( $Money,  $Profits, int  $Level = 1, mixed  $Gid = false, array  $selling = '{}', mixed  $SingleRule = -1, mixed  $Type = 1) : mixed

Parameters

$Money
$Profits
int $Level

根据用户等级和成本计算出商品售价! 取出单个

mixed $Gid
array $selling

自定义等级规则

mixed $SingleRule
mixed $Type

Returns

mixed —

Freight()

Freight( $freight,  $input,  $price,  $num) : float|int

Parameters

$freight
$input
$price
$num

Returns

float|int —

运费模板,返回的任何数据均已计算过份数售价

MatchProfitRatio()

MatchProfitRatio( $moeny,  $rule = -1) : mixed

Parameters

$moeny
$rule

解析商品利润比例

Returns

mixed —