✨ feat(订单模块):提交订单对接
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user