Refactor(云灵AI):列表数据对接

This commit is contained in:
lifizer
2026-04-22 17:42:58 +08:00
parent b4b6fed1ab
commit 9c90600c82
7 changed files with 306 additions and 139 deletions
+6 -2
View File
@@ -26,10 +26,11 @@
<view class="sheet">
<view class="sheet-thumb-row">
<image
v-if="imageUrl && confidence > 0"
v-if="imageUrl && confidenceFlag"
:src="imageUrl"
class="sheet-thumb"
mode="aspectFill"
lazy-load
/>
<view v-else class="empty-state">
<view class="empty-text">未识别到物品,请重新尝试</view>
@@ -48,6 +49,7 @@
:src="item.img"
class="goods-img"
mode="aspectFill"
lazy-load
/>
<view class="goods-title">
{{ item.name }}
@@ -61,6 +63,7 @@
:src="webUrl + '/home/icon-cart.png'"
class="cart-btn"
mode="aspectFit"
lazy-load
/>
</view>
</view>
@@ -85,7 +88,7 @@ export default {
statusBarHeight: 20,
imageUrl: '',
goodsList: [],
confidence: 0
confidenceFlag: true
}
},
onLoad(options) {
@@ -106,6 +109,7 @@ export default {
const { data, success } = res
if (success) {
this.goodsList = data.cards || []
this.confidenceFlag = data.success
}
}).finally(() => {
this.loaded = true