@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.
@@ -691,7 +691,30 @@ class ArticlesAPI {
691
691
  return false;
692
692
  }
693
693
  }
694
- // 3. propertyArea 范围过滤
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 范围过滤
705
+ if (searchOptions?.mileageRange) {
706
+ // 处理里程数格式,如 "26000 km" -> 26000
707
+ const mileageStr = articleObj.Mileage || '0';
708
+ const mileageMatch = mileageStr.match(/(\d+(?:\.\d+)?)/);
709
+ const mileage = mileageMatch ? parseFloat(mileageMatch[1]) : 0;
710
+ if (searchOptions.mileageRange.min !== undefined && mileage < searchOptions.mileageRange.min) {
711
+ return false;
712
+ }
713
+ if (searchOptions.mileageRange.max !== undefined && mileage > searchOptions.mileageRange.max) {
714
+ return false;
715
+ }
716
+ }
717
+ // 5. propertyArea 范围过滤
695
718
  if (searchOptions?.propertyAreaRange) {
696
719
  const propertyArea = parseFloat(articleObj.propertyArea || '0');
697
720
  if (searchOptions.propertyAreaRange.min !== undefined && propertyArea < searchOptions.propertyAreaRange.min) {
@@ -701,7 +724,7 @@ class ArticlesAPI {
701
724
  return false;
702
725
  }
703
726
  }
704
- // 4. plotArea 范围过滤
727
+ // 6. plotArea 范围过滤
705
728
  if (searchOptions?.plotAreaRange) {
706
729
  const plotArea = parseFloat(articleObj.plotArea || '0');
707
730
  if (searchOptions.plotAreaRange.min !== undefined && plotArea < searchOptions.plotAreaRange.min) {
@@ -711,7 +734,7 @@ class ArticlesAPI {
711
734
  return false;
712
735
  }
713
736
  }
714
- // 5. tagIds 过滤
737
+ // 7. tagIds 过滤
715
738
  if (searchOptions?.tagIds && searchOptions.tagIds.length > 0) {
716
739
  if (!articleObj.tagIds || articleObj.tagIds.length === 0) {
717
740
  return false;