|
|
@@ -18,8 +18,8 @@ class MerchantExtendService extends BaseService
|
|
|
return MerchantExtendClass::getByMerchantId($id, $returnType);
|
|
|
}
|
|
|
|
|
|
- //积分等级列表 shish 2019.12.1
|
|
|
- public static function getGradeList($extend, $order = 'asc')
|
|
|
+ //积分等级列表,带索引 shish 2019.12.1
|
|
|
+ public static function getGradeList($extend, $order = 'asc', $indexBy = true)
|
|
|
{
|
|
|
$gradeStr = $extend['gradeList'];
|
|
|
$data = [];
|
|
|
@@ -29,16 +29,13 @@ class MerchantExtendService extends BaseService
|
|
|
foreach ($arr as $key => $val) {
|
|
|
$son = explode("_", $val);
|
|
|
$discount = $son[2];
|
|
|
- if (strlen($discount) == 1) {
|
|
|
- $discount .= '0';
|
|
|
- }
|
|
|
$data[$son[0]] = ['level' => $son[0], 'growth' => $son[1], 'discount' => $discount];
|
|
|
}
|
|
|
}
|
|
|
$data = arrayUtil::sort($data, 'level', $order);
|
|
|
- return $data;
|
|
|
+ return $indexBy == false ? array_values($data) : $data;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
//运费计算方式
|
|
|
public static function getFreight($ext)
|
|
|
{
|