Răsfoiți Sursa

fix: 列表地区标签优先展示城市,无城市展示省份

Signed-off-by: tangshizhe <48740614+tangshizhe@users.noreply.github.com>
tangshizhe 1 an în urmă
părinte
comite
8958ac7a90
1 a modificat fișierele cu 6 adăugiri și 4 ștergeri
  1. 6 4
      apps/mobile/src/views/tabbar/Subscribe.vue

+ 6 - 4
apps/mobile/src/views/tabbar/Subscribe.vue

@@ -1872,7 +1872,7 @@ export default {
     // 格式化查询后的每一项数据
     preSortItem(item) {
       if (!item) return
-      const { area, collection, projectInfo } = item
+      const { area, city, collection, projectInfo } = item
       const {
         vip_power: vipPower,
         member_power: memberPower,
@@ -1906,17 +1906,19 @@ export default {
         item?.buyerClass && item?.buyerClass !== '其它'
           ? item?.buyerClass
           : undefined
+      // 有city时展示city,无展示area
+      const region = city ? city : area
       // 标签
       item.tagList = [
-        area || '全国',
+        region || '',
         buyerClass,
         item?.type || item?.subtype,
         // 有中标金额取中标金额,没有取预算,预算没有置空
         item?.bidAmount
           ? formatMoney(item?.bidAmount - 0)
           : item?.budget
-          ? formatMoney(item?.budget - 0)
-          : ''
+            ? formatMoney(item?.budget - 0)
+            : ''
       ].filter((v) => v)
 
       // 添加随机id