Commit 4bcb117d authored by GuanHua's avatar GuanHua

fix:修改下单请求参数

parent 250e77e0
......@@ -40,6 +40,7 @@ const LXShopLayout: React.FC<LXMallLayoutPropsType> = (props) => {
const [shopInfo, setShopInfo] = useState<GetTemplateShopFindShopResponse>()
const [query, setQuery] = useState<any>({})
const [mallInfo, setMallInfo] = useState<any>({})
const [loading, setLoading] = useState<boolean>(true)
useEffect(() => {
try {
......@@ -48,6 +49,7 @@ const LXShopLayout: React.FC<LXMallLayoutPropsType> = (props) => {
setQuery(queryParam)
} catch (error) {
console.log(error)
setLoading(false)
}
getWebMallInfo()
}, [])
......@@ -70,6 +72,9 @@ const LXShopLayout: React.FC<LXMallLayoutPropsType> = (props) => {
if (res.code === 1000) {
setShopInfo(res.data)
}
setLoading(false)
}).catch(() => {
setLoading(false)
})
}
......@@ -103,7 +108,7 @@ const LXShopLayout: React.FC<LXMallLayoutPropsType> = (props) => {
<ShopHeader logo={mallInfo.logoUrl} shopId={query.shopId} shopUrlParam={shopId} shopInfo={shopInfo} updateShopInfo={() => handleUpdate()} />
<MainNav menuData={menuData} pathname={location.pathname} type={LAYOUT_TYPE.shop} shopId={query.shopId} shopUrlParam={shopId} />
{
shopInfo ? shopInfo.status === 1 ? children && React.Children.map(children, (child: any) => {
!loading ? shopInfo ? shopInfo.status === 1 ? children && React.Children.map(children, (child: any) => {
return React.cloneElement(child,
{
layoutType: LAYOUT_TYPE.shop,
......@@ -114,7 +119,7 @@ const LXShopLayout: React.FC<LXMallLayoutPropsType> = (props) => {
updateShopInfo: () => handleUpdate()
},
);
}) : <SearchShopResult search={shopInfo.company} /> : <SearchShopResult />
}) : <SearchShopResult search={shopInfo.company} /> : <SearchShopResult /> : null
}
</div>
<Footer />
......
......@@ -280,9 +280,11 @@ const Order: React.FC<OrderPropsType> = (props) => {
temp.category = orderItem.category
temp.brand = orderItem.brand
temp.logistics = orderItem.logistics
temp.deliveryType = orderItem.logistics.deliveryType
orderProductRequests.push(temp)
}
}
params.supplyMembersName = orderInfo.supplyMembersName
params.supplyMembersId = orderInfo.supplyMembersId
params.supplyMembersRoleId = orderInfo.supplyMembersRoleId
params.deliveryType = orderInfo.logistics.deliveryType
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment