Commit 9df03799 authored by Bill's avatar Bill

fix: 添加自营商城配置

parent 9fd45a6a
...@@ -22,6 +22,8 @@ interface Iprops { ...@@ -22,6 +22,8 @@ interface Iprops {
id: number, id: number,
/** 商城子域名 */ /** 商城子域名 */
url: string, url: string,
// 是否是自营商城
self: 1 | 0,
/** 1.WEB 2.H5 3.小程序 4.APP */ /** 1.WEB 2.H5 3.小程序 4.APP */
environment: 1 | 2 | 3 | 4 | number, environment: 1 | 2 | 3 | 4 | number,
onRemove?: ((id: number) => void )| null, onRemove?: ((id: number) => void )| null,
...@@ -33,7 +35,6 @@ interface Iprops { ...@@ -33,7 +35,6 @@ interface Iprops {
const APP_FIXTURE_LINK = `/memberCenter/marketingAbility/activityPages/management/fixtures` const APP_FIXTURE_LINK = `/memberCenter/marketingAbility/activityPages/management/fixtures`
const WEB_FIXTURE_LINK = `/memberCenter/marketingAbility/activityPages/management/webFixtures` const WEB_FIXTURE_LINK = `/memberCenter/marketingAbility/activityPages/management/webFixtures`
const PENDIGN_ONLINE = 1; const PENDIGN_ONLINE = 1;
const ONLINE = 2; const ONLINE = 2;
/** 进行中 */ /** 进行中 */
...@@ -61,6 +62,7 @@ const ActiveItem: React.FC<Iprops> = (props: Iprops) => { ...@@ -61,6 +62,7 @@ const ActiveItem: React.FC<Iprops> = (props: Iprops) => {
onChangeStatus, onChangeStatus,
environment, environment,
url, url,
self,
} = props; } = props;
const handleRemove = () => { const handleRemove = () => {
...@@ -110,7 +112,7 @@ const ActiveItem: React.FC<Iprops> = (props: Iprops) => { ...@@ -110,7 +112,7 @@ const ActiveItem: React.FC<Iprops> = (props: Iprops) => {
{ {
environment === WEB && status !== END && ( environment === WEB && status !== END && (
<div className={styles.copyLink}> <div className={styles.copyLink}>
<Paragraph copyable={{ text: `${REQUEST_HEADER}${url}.${TOP_DOMAIN}/activity/${id}` }} /> <Paragraph copyable={{ text: (self ? url : `${REQUEST_HEADER}${url}.${TOP_DOMAIN}`) + `/activity/${id}` }} />
</div> </div>
) )
} }
......
...@@ -115,20 +115,14 @@ const ActivePage = () => { ...@@ -115,20 +115,14 @@ const ActivePage = () => {
<div className={styles.table}> <div className={styles.table}>
{ {
dataSource.map((_item, key) => { dataSource.map((_item, key) => {
return ( return (
<div className={styles.tableItem} key={key} > <div className={styles.tableItem} key={key} >
<ActivityItem <ActivityItem
id={_item.id} {..._item}
templatePicUrl={_item.templatePicUrl}
title={_item.name} title={_item.name}
templateName={_item.templateName}
statusName={_item.statusName}
shopName={_item.shopName}
startTime={_item.startTime as unknown as string} startTime={_item.startTime as unknown as string}
endTime={_item.endTime as unknown as string} endTime={_item.endTime as unknown as string}
environment={_item.environment}
status={_item.status}
url={_item.url}
onRemove={handleRemove} onRemove={handleRemove}
onChangeStatus={onChangeStatus} onChangeStatus={onChangeStatus}
/> />
......
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