Commit 5671e1de authored by Bill's avatar Bill

fix: 修改活动页校验以及翻译bug

parent f262b256
......@@ -27,7 +27,15 @@ const schema: ISchema = {
name: {
type: 'string',
title: `${intl.formatMessage({ id: 'activePage.activityPageName'})}`,
required: true,
"x-rules": [
{
required: true
},
{
limitByte: true,
maxByte: 60,
}
]
},
environment: {
type: 'string',
......
import React, { useMemo } from 'react';
import styles from './tabFooter.less';
import { useIntl} from 'umi'
import { getIntl } from 'umi'
const intl = getIntl()
interface Iprops {
originalPrice: number,
......@@ -9,7 +10,7 @@ interface Iprops {
}
const TabFooter: React.FC<Iprops> = (props: Iprops) => {
const intl = useIntl();
// const intl = useIntl();
const { discountPrice, originalPrice } = props;
const cacheDiscountPrice = useMemo(() => discountPrice?.toString().split("."), [discountPrice])
return (
......
......@@ -5,7 +5,7 @@
flex-direction: row;
.searchPannel {
width: 320px;
width: 236px;
background-color: #fff;
border-radius: 8px;
}
......
......@@ -65,14 +65,14 @@ const ActivePage = () => {
};
useEffect(() => {
getData({ ...debouncedValue, name: searchInput });
getData({ ...debouncedValue, name: searchInput } as unknown as GetTemplateWebActivityPagePageRequest);
}, [debouncedValue]);
const handleRemove = async (id: number) => {
const { data, code } = await postTemplateWebActivityPageDelete({ id });
if (code === 1000) {
getData({ ...debouncedValue, name: searchInput });
getData({ ...debouncedValue, name: searchInput } as unknown as GetTemplateWebActivityPagePageRequest );
}
};
......@@ -82,7 +82,7 @@ const ActivePage = () => {
status,
});
if (code === 1000) {
getData({ ...debouncedValue, name: searchInput });
getData({ ...debouncedValue, name: searchInput } as unknown as GetTemplateWebActivityPagePageRequest);
}
};
......@@ -91,7 +91,7 @@ const ActivePage = () => {
};
const handleSearch = () => {
getData({ ...debouncedValue, name: searchInput });
getData({ ...debouncedValue, name: searchInput } as any);
};
return (
......@@ -104,12 +104,9 @@ const ActivePage = () => {
<div className={styles.search}>
<Search placeholder={intl.formatMessage({ id: 'activityPage.searchshousuo' })} onChange={(e) => onChange(e.target.value)} onSearch={handleSearch} />
</div>
<Link to='/memberCenter/marketingAbility/activityPages/management/add'>
<Button icon={<PlusOutlined />} type="primary">{intl.formatMessage({ id: 'activityPage.add' })}</Button>
</Link>
</div>
<Spin spinning={loading} wrapperClassName={styles.body}>
<div className={styles.table}>
......
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