✨ feat(订单模块):提交订单对接

This commit is contained in:
Haiyi
2022-09-27 17:14:52 +08:00
parent 6c0ecd5ea1
commit 9377ea964f
12 changed files with 230 additions and 133 deletions
+5 -5
View File
@@ -45,7 +45,7 @@ export const Shopping: FC = memo(() => {
)
})
interface InternalContainer {}
interface InternalContainer { }
const ShoppingCartContainer: FC<InternalContainer> = () => {
const { isManageStatus, setManageStatus, selectedAmount, currentCheckedPurchaserId, currentCheckedSaleMode, colorStore, setColorStore } = useShoppingContext()
@@ -75,7 +75,7 @@ const ShoppingCartContainer: FC<InternalContainer> = () => {
}, [shoppingCartData, state])
useDidShow(() => {
;(async () => {
; (async () => {
await fetchData()
let query = Taro.createSelectorQuery()
console.log('query', query)
@@ -104,11 +104,11 @@ const ShoppingCartContainer: FC<InternalContainer> = () => {
goLink('/pages/submitOrder/index', {
purchaser_id: currentCheckedPurchaserId,
sale_mode: currentCheckedSaleMode,
shopping_cart_product_color_list: Object.values(targetGoodsKind).map((item: Goods) => {
shopping_cart_product_color_list: JSON.stringify(Object.values(targetGoodsKind).map((item: Goods) => {
if (item.checked) {
return item.id
}
}),
}))
})
}
@@ -139,7 +139,7 @@ const ShoppingCartContainer: FC<InternalContainer> = () => {
const handleSelectAllCheckbox = (isSelectAll: boolean) => {
console.log('handleSelectAllCheckbox', isSelectAll)
const tempObject = colorStore
Object.entries(colorStore).forEach(([key,value])=>{
Object.entries(colorStore).forEach(([key, value]) => {
tempObject[key] = {
...value,
checked: isSelectAll,