Commit 74e4ba2f authored by GuanHua's avatar GuanHua

fix:1.支付跳转链接有误问题;2.商品列表列表模式链接问题;3.进货单无图片时页面报错问题

parent 1cb82e1e
......@@ -99,7 +99,7 @@ const CommodityList: React.FC<CommodityListPropsType> = (props) => {
{
commodityList.map((item, index) => (
<div key={`commodity_list_item_column_${index}`} className={cx(styles.commodity_list_item, styles.column)}>
<a href={`/${layoutType === LAYOUT_TYPE.channel ? 'channelmall' : 'shop'}/commodity/detail?id=${item.id}&type=${item.priceType}&shopId=${btoa(JSON.stringify({ shopId: item.storeId, memberId: item.memberId }))}`} target="_blank">
<a href={getCommodityDetailLink(item)} target="_blank">
<div className={styles.goods_img}>
{
item.mainPic ? <img src={item.mainPic} /> : <Skeleton.Image style={{ width: 120, height: 120 }} />
......
......@@ -326,13 +326,13 @@ const Order: React.FC<OrderPropsType> = (props) => {
const linkToUrl = (path: string) => {
switch(layoutType) {
case LAYOUT_TYPE.channel:
history.replace(`${GlobalConfig.channelRootRoute}${path}?channelId=${shopUrlParam}`)
history.replace(`${GlobalConfig.channelRootRoute}${path}&channelId=${shopUrlParam}`)
break
case LAYOUT_TYPE.ichannel:
history.replace(`${GlobalConfig.ichannelRootRoute}${path}?channelId=${shopUrlParam}`)
history.replace(`${GlobalConfig.ichannelRootRoute}${path}&channelId=${shopUrlParam}`)
break
default:
history.replace(`${path}?channelId=${shopUrlParam}`)
history.replace(`${path}`)
break
}
......
......@@ -5,13 +5,13 @@ import { LAYOUT_TYPE } from '@/constants'
export const linkToUrl = (path: string, layoutType, shopUrlParam) => {
switch (layoutType) {
case LAYOUT_TYPE.channel:
history.replace(`${GlobalConfig.channelRootRoute}${path}?channelId=${shopUrlParam}`)
history.replace(`${GlobalConfig.channelRootRoute}${path}&channelId=${shopUrlParam}`)
break
case LAYOUT_TYPE.ichannel:
history.replace(`${GlobalConfig.ichannelRootRoute}${path}?channelId=${shopUrlParam}`)
history.replace(`${GlobalConfig.ichannelRootRoute}${path}&channelId=${shopUrlParam}`)
break
default:
history.replace(`${path}?channelId=${shopUrlParam}`)
history.replace(`${path}`)
break
}
......
......@@ -710,7 +710,9 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
</div>
<div className={cx(styles.order_list_item_item, styles.goods_info)}>
<div className={styles.order_list_item_item_imgbox}>
<ImageBox width={80} height={80} imgUrl={childItem.commodityUnitPrice.commodityPic[0]} direction="column" />
{
childItem.commodityUnitPrice.commodityPic && <ImageBox width={80} height={80} imgUrl={childItem.commodityUnitPrice.commodityPic[0]} direction="column" />
}
</div>
<div>
<div className={styles.order_list_item_item_name}>
......
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