consumer模块完成度95%,安卓端大部分页面能正常获取数据,页面样式显示基本正常,逐渐完善;消费者端的积分、余额、评价、优惠券等小模块正在完善
This commit is contained in:
@@ -66,7 +66,9 @@ const addToCart = async (product: Product) => {
|
||||
const loadFavorites = async () => {
|
||||
const res = await supabaseService.getFavorites()
|
||||
|
||||
favorites.value = res.map((item: any): Product => {
|
||||
const productList: Product[] = []
|
||||
for (let i = 0; i < res.length; i++) {
|
||||
const item = res[i]
|
||||
let prod: any | null = null
|
||||
let itemObj: UTSJSONObject | null = null
|
||||
|
||||
@@ -117,7 +119,7 @@ const loadFavorites = async () => {
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
const product: Product = {
|
||||
id: id,
|
||||
name: name,
|
||||
price: price,
|
||||
@@ -126,7 +128,9 @@ const loadFavorites = async () => {
|
||||
main_image_url: image,
|
||||
sale_count: sales
|
||||
} as Product
|
||||
})
|
||||
productList.push(product)
|
||||
}
|
||||
favorites.value = productList
|
||||
}
|
||||
|
||||
const goShopping = () => {
|
||||
|
||||
Reference in New Issue
Block a user