Commit 76e82799 authored by GuanHua's avatar GuanHua

fix: 活动商品活动详情链接跳转

parent 2c2e20cb
......@@ -5,7 +5,7 @@ import { FormEffectHooks } from '@formily/antd'
import { StandardTable } from 'god';
import { LAYOUT_TYPE } from '@/constants'
import { PublicApi } from '@/services/api';
import { formatTimeString } from '@/utils'
import moment from 'moment'
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import Search from '@/components/NiceForm/components/Search';
......@@ -57,19 +57,20 @@ const CommodityDrawer: React.FC<CommodityDrawerProps> = (props: CommodityDrawerP
<>
{record?.activityList?.map((item, index) => {
return (
<div key={index} style={{ marginBottom: 8 }}>
<a key={index} style={{ marginBottom: 8 }} href={`/memberCenter/marketingAbility/selfManagement/search/preview?id=${item.id}`} target={"_blank"}>
<Space direction='horizontal'>
<img src={ActivityImage} style={{ width: 24, height: 24, borderRadius: 4 }} />
<span>{item?.name}</span>
<div className={styles['defaultTag']}>{item?.type}</div>
<StatusTag title={item?.belongType === 1 ? '平台活动' : '商家活动'} type={item?.belongType === 1 ? 'primary' : 'success'} />
<div style={{color: '#301333'}}>有效期:{item.startTime && moment(item.startTime).format('YYYY-MM-DD HH:mm:ss')}{item.endTime && moment(item.endTime).format('YYYY-MM-DD HH:mm:ss')} </div>
</Space>
</div>
)
</a>
);
})}
</>
);
}
};
const columns = [
{
......
......@@ -54,15 +54,15 @@ const TyleList_Own = [
label: '积分兑换',
},
{
value: 2,
label: '公司介绍',
value: 4,
label: '行情资讯',
},
{
value: 3,
label: '成为会员',
},
{
value: 4,
value: 2,
label: '公司介绍',
},
]
......@@ -190,7 +190,7 @@ const CardNavItem: React.FC<CardNavItemProps> = (props: CardNavItemProps) => {
let getFn
if (layoutType === LAYOUT_TYPE.channel) {
getFn = PublicApi.getSearchChannelCommodityTemplateGetFirstCategoryListByMemberId
} else if (layoutType === LAYOUT_TYPE.shop) {
} else {
params.memberRoleId = memberRoleId
getFn = PublicApi.getSearchCommodityTemplateGetFirstCategoryListByMemberId
}
......@@ -318,12 +318,13 @@ const CardNavItem: React.FC<CardNavItemProps> = (props: CardNavItemProps) => {
const handleSumit = (values) => {
const newProps: any = {
...values,
icon: values.icon[0].url
icon: values.icon[0].url,
empty: false
}
if (values.channel && values.type === 3) {
newProps.id = values.channel
} else if (values.type === 2 || values.type === 5) {
newProps.id = record.id
newProps.id = record ? record?.id : undefined
}
changeProps({
......
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