consumer模块完成度95%,检查消费者前端bug并修复

This commit is contained in:
cyh666666
2026-03-09 17:20:59 +08:00
parent 7b5801a72b
commit 2262d1bfd9
128 changed files with 13485 additions and 1670 deletions

View File

@@ -1,5 +1,5 @@
<template>
<scroll-view class="share-page" scroll-y>
<scroll-view class="share-page" direction="vertical">
<view class="share-summary">
<view class="summary-item">
<text class="summary-value">{{ totalShares }}</text>
@@ -46,7 +46,7 @@
<view v-else class="share-list">
<view class="share-item" v-for="share in shares" :key="share.id" @click="goToShareDetail(share.id)">
<image class="product-image" :src="share.product_image || defaultImage" mode="aspectFill" />
<image class="product-image" :src="share.product_image != null && share.product_image.length > 0 ? share.product_image : defaultImage" mode="aspectFill" />
<view class="share-info">
<text class="product-name">{{ share.product_name }}</text>
<view class="progress-section">
@@ -118,23 +118,26 @@ const loadShares = async (): Promise<void> => {
for (let i = 0; i < result.length; i++) {
const item = result[i]
const itemAny = item as any
if (typeof itemAny._getValue === 'function') {
parsed.push({
id: (itemAny._getValue('id') as string) ?? '',
product_id: (itemAny._getValue('product_id') as string) ?? '',
product_name: (itemAny._getValue('product_name') as string) ?? '',
product_image: itemAny._getValue('product_image') as string | null,
product_price: (itemAny._getValue('product_price') as number) ?? 0,
share_code: (itemAny._getValue('share_code') as string) ?? '',
required_count: (itemAny._getValue('required_count') as number) ?? 4,
current_count: (itemAny._getValue('current_count') as number) ?? 0,
status: (itemAny._getValue('status') as number) ?? 0,
reward_amount: itemAny._getValue('reward_amount') as number | null,
created_at: (itemAny._getValue('created_at') as string) ?? ''
})
let itemObj: UTSJSONObject | null = null
if (item instanceof UTSJSONObject) {
itemObj = item
} else {
itemObj = JSON.parse(JSON.stringify(item)) as UTSJSONObject
}
parsed.push({
id: itemObj.getString('id') ?? '',
product_id: itemObj.getString('product_id') ?? '',
product_name: itemObj.getString('product_name') ?? '',
product_image: itemObj.getString('product_image'),
product_price: itemObj.getNumber('product_price') ?? 0,
share_code: itemObj.getString('share_code') ?? '',
required_count: itemObj.getNumber('required_count') ?? 4,
current_count: itemObj.getNumber('current_count') ?? 0,
status: itemObj.getNumber('status') ?? 0,
reward_amount: itemObj.getNumber('reward_amount'),
created_at: itemObj.getString('created_at') ?? ''
})
}
shares.value = parsed