consumer模块完成度95%,安卓端大部分页面能正常获取数据,页面样式显示基本正常,逐渐完善;消费者端的积分、余额、评价、优惠券等小模块正在完善

This commit is contained in:
cyh666666
2026-03-03 17:02:53 +08:00
parent 7e74b88e1e
commit cceb556c62
15 changed files with 4975 additions and 612 deletions

View File

@@ -649,9 +649,13 @@ export default {
if (itemsRaw == null) return '/static/product1.jpg'
const items = itemsRaw as any[]
if (items.length > 0) {
const firstItem = items[0] as Record<string, any>
const imgUrl = firstItem['image_url'] as string
const prodImg = firstItem['product_image'] as string
const firstItem = items[0]
const itemStr = JSON.stringify(firstItem)
const itemParsed = JSON.parse(itemStr)
if (itemParsed == null) return '/static/product1.jpg'
const itemObj = itemParsed as UTSJSONObject
const imgUrl = itemObj.getString('image_url')
const prodImg = itemObj.getString('product_image')
const img = (imgUrl != null && imgUrl !== '') ? imgUrl : prodImg
if (img != null && img !== '') return img
}
@@ -663,12 +667,16 @@ export default {
if (itemsRaw == null) return '精选商品'
const items = itemsRaw as any[]
if (items.length > 0) {
const firstItem = items[0] as Record<string, any>
const pName = firstItem['product_name'] as string
const firstItem = items[0]
const itemStr = JSON.stringify(firstItem)
const itemParsed = JSON.parse(itemStr)
if (itemParsed == null) return '精选商品'
const itemObj = itemParsed as UTSJSONObject
const pName = itemObj.getString('product_name')
const name = (pName != null && pName !== '') ? pName : '商品'
if (items.length > 1) {
return `${name} 等${items.length}件商品`
return name + ' 等' + items.length + '件商品'
}
return name
}