import React, { memo } from 'react'; import { IZLConfig } from './schema'; import logo from '@/assets/cunpos.png'; import styles from './index.less'; interface IProps extends IZLConfig { isTpl?: boolean; } const Coupons = memo((props: IProps) => { const { money, ifText, desc, dealTime, link, bgColor, isTpl } = props; const toLink = () => { if (link && window.location.href.indexOf('editor') < 0) { window.location.href = link; } }; return isTpl ? (
) : (
{money}元优惠券
{ifText}
{dealTime}
{desc}
); }); export default Coupons;