Skip to content

Commit

Permalink
Merge pull request #94 from thuongtruong1009/product-model/option
Browse files Browse the repository at this point in the history
fix: cart data
  • Loading branch information
thuongtruong1009 authored Jun 5, 2022
2 parents 8811d84 + 2170b39 commit 1a566ad
Show file tree
Hide file tree
Showing 18 changed files with 2,024 additions and 377 deletions.
2 changes: 1 addition & 1 deletion src/components/CProductCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { handleError } from '~/helpers/error'
import { handleDate } from '~/utils/date'
import { productStatus } from '~/utils/status'
import { sliceText } from '~/utils/textHandle'
import { getResources} from '~/utils/resources'
import { getResources } from '~/utils/resources'
import ShopRequest from '~/services/shop-request'
import ProductRequest from '~/services/product-request'
Expand Down
4 changes: 1 addition & 3 deletions src/components/head/CBList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ const cartPayload = reactive({
})
watchEffect(async() => {
const { data: cartData } = await CartRequest.getCart({ params: { limit: cartPayload.limit, page: cartPayload.page } })
cart.result = cartData.data
cart.payget = cartData.data[0]
cart.product = cartData.data[0].product
cart.result = cartData
})
const handleDelete = async(id) => {
removeItemByIndex(cart.result, id, 1)
Expand Down
2 changes: 1 addition & 1 deletion src/components/head/CBMenuCategories.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const { t } = useI18n()
const product = useProduct()
watch(async() => {
const { data } = await ProductRequest.getCategoriesChildrenById(0)
const { data } = await ProductRequest.getCategoriesChildrenById()
product.category = data
})
Expand Down
Loading

1 comment on commit 1a566ad

@vercel
Copy link

@vercel vercel bot commented on 1a566ad Jun 5, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.