shinnosuke
2026-09-11 b36f4c2800e88f8c5060ae926d3eb25d4bcb69c0
rencaika/pages/shopping-benefits/shopping-benefits.uvue
@@ -75,11 +75,19 @@
         for (let index = 0; index < records.length; index++) {
            const item = records[index]
            const merchantType = item.merchantType != null ? item.merchantType as string : ''
            const tags: string[] = []
            if (item.couponAvailable === true || Number(item.couponAvailable) == 1) tags.push('券')
            const configuredTag = item.discountText != null ? String(item.discountText).trim() : ''
            if (merchantType == 'culture' && (item.storeConsumeAvailable === true || Number(item.storeConsumeAvailable) == 1)) tags.push('到店消费')
            if (merchantType != 'culture' && configuredTag != '' && tags.indexOf(configuredTag) < 0) tags.push(configuredTag)
            const tags: string[] = []
            if (item.benefitTags instanceof Array) {
               const tagRecords: any[] = item.benefitTags as any[]
               for (let tagIndex = 0; tagIndex < tagRecords.length; tagIndex++) {
                  const tag = String(tagRecords[tagIndex]).trim()
                  if (tag != '' && tag != '人才专享' && tags.indexOf(tag) < 0) tags.push(tag)
               }
            } else {
               if (item.couponAvailable === true || Number(item.couponAvailable) == 1) tags.push('券')
               if (merchantType == 'culture' && (item.storeConsumeAvailable === true || Number(item.storeConsumeAvailable) == 1)) tags.push('到店消费')
               if (merchantType != 'culture' && configuredTag != '' && tags.indexOf(configuredTag) < 0) tags.push(configuredTag)
            }
            next.push({ id: '' + item.id, merchantType: merchantType, name: item.merchantName != null && item.merchantName != '' ? item.merchantName as string : '商家名称未配置', discount: configuredTag, tags: tags, address: item.address != null ? item.address as string : '', image: item.coverUrl != null && item.coverUrl != '' ? resolveApiUrl(item.coverUrl as string) : fallbackImage, available: item.available !== false, unavailableReason: item.unavailableReason != null && item.unavailableReason != '' ? item.unavailableReason as string : '该服务当前不可用' })
         }
         visibleServices.value = next; currentPage.value++; hasMore.value = data != null && data.total != null ? next.length < data.total : false; initialLoading.value = false; loadingMore.value = false; hasLoaded.value = true