@gt6/sdk 1.0.41 → 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.
@@ -695,7 +695,30 @@ class ArticlesAPI {
695
695
  return false;
696
696
  }
697
697
  }
698
- // 3. propertyArea 范围过滤
698
+ // 3. Salary 范围过滤
699
+ if (searchOptions?.salaryRange) {
700
+ const salary = parseFloat(articleObj.Salary || '0');
701
+ if (searchOptions.salaryRange.min !== undefined && salary < searchOptions.salaryRange.min) {
702
+ return false;
703
+ }
704
+ if (searchOptions.salaryRange.max !== undefined && salary > searchOptions.salaryRange.max) {
705
+ return false;
706
+ }
707
+ }
708
+ // 4. mileage 范围过滤
709
+ if (searchOptions?.mileageRange) {
710
+ // 处理里程数格式,如 "26000 km" -> 26000
711
+ const mileageStr = articleObj.Mileage || '0';
712
+ const mileageMatch = mileageStr.match(/(\d+(?:\.\d+)?)/);
713
+ const mileage = mileageMatch ? parseFloat(mileageMatch[1]) : 0;
714
+ if (searchOptions.mileageRange.min !== undefined && mileage < searchOptions.mileageRange.min) {
715
+ return false;
716
+ }
717
+ if (searchOptions.mileageRange.max !== undefined && mileage > searchOptions.mileageRange.max) {
718
+ return false;
719
+ }
720
+ }
721
+ // 5. propertyArea 范围过滤
699
722
  if (searchOptions?.propertyAreaRange) {
700
723
  const propertyArea = parseFloat(articleObj.propertyArea || '0');
701
724
  if (searchOptions.propertyAreaRange.min !== undefined && propertyArea < searchOptions.propertyAreaRange.min) {
@@ -705,7 +728,7 @@ class ArticlesAPI {
705
728
  return false;
706
729
  }
707
730
  }
708
- // 4. plotArea 范围过滤
731
+ // 6. plotArea 范围过滤
709
732
  if (searchOptions?.plotAreaRange) {
710
733
  const plotArea = parseFloat(articleObj.plotArea || '0');
711
734
  if (searchOptions.plotAreaRange.min !== undefined && plotArea < searchOptions.plotAreaRange.min) {
@@ -715,7 +738,7 @@ class ArticlesAPI {
715
738
  return false;
716
739
  }
717
740
  }
718
- // 5. tagIds 过滤
741
+ // 7. tagIds 过滤
719
742
  if (searchOptions?.tagIds && searchOptions.tagIds.length > 0) {
720
743
  if (!articleObj.tagIds || articleObj.tagIds.length === 0) {
721
744
  return false;