@gt6/sdk 1.0.42 → 1.0.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/gt6-sdk.esm.js
CHANGED
|
@@ -691,7 +691,17 @@ class ArticlesAPI {
|
|
|
691
691
|
return false;
|
|
692
692
|
}
|
|
693
693
|
}
|
|
694
|
-
// 3.
|
|
694
|
+
// 3. Salary 范围过滤
|
|
695
|
+
if (searchOptions?.salaryRange) {
|
|
696
|
+
const salary = parseFloat(articleObj.Salary || '0');
|
|
697
|
+
if (searchOptions.salaryRange.min !== undefined && salary < searchOptions.salaryRange.min) {
|
|
698
|
+
return false;
|
|
699
|
+
}
|
|
700
|
+
if (searchOptions.salaryRange.max !== undefined && salary > searchOptions.salaryRange.max) {
|
|
701
|
+
return false;
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
// 4. mileage 范围过滤
|
|
695
705
|
if (searchOptions?.mileageRange) {
|
|
696
706
|
// 处理里程数格式,如 "26000 km" -> 26000
|
|
697
707
|
const mileageStr = articleObj.Mileage || '0';
|
|
@@ -704,7 +714,7 @@ class ArticlesAPI {
|
|
|
704
714
|
return false;
|
|
705
715
|
}
|
|
706
716
|
}
|
|
707
|
-
//
|
|
717
|
+
// 5. propertyArea 范围过滤
|
|
708
718
|
if (searchOptions?.propertyAreaRange) {
|
|
709
719
|
const propertyArea = parseFloat(articleObj.propertyArea || '0');
|
|
710
720
|
if (searchOptions.propertyAreaRange.min !== undefined && propertyArea < searchOptions.propertyAreaRange.min) {
|
|
@@ -714,7 +724,7 @@ class ArticlesAPI {
|
|
|
714
724
|
return false;
|
|
715
725
|
}
|
|
716
726
|
}
|
|
717
|
-
//
|
|
727
|
+
// 6. plotArea 范围过滤
|
|
718
728
|
if (searchOptions?.plotAreaRange) {
|
|
719
729
|
const plotArea = parseFloat(articleObj.plotArea || '0');
|
|
720
730
|
if (searchOptions.plotAreaRange.min !== undefined && plotArea < searchOptions.plotAreaRange.min) {
|
|
@@ -724,7 +734,7 @@ class ArticlesAPI {
|
|
|
724
734
|
return false;
|
|
725
735
|
}
|
|
726
736
|
}
|
|
727
|
-
//
|
|
737
|
+
// 7. tagIds 过滤
|
|
728
738
|
if (searchOptions?.tagIds && searchOptions.tagIds.length > 0) {
|
|
729
739
|
if (!articleObj.tagIds || articleObj.tagIds.length === 0) {
|
|
730
740
|
return false;
|