Commit d478f918 authored by GuanHua's avatar GuanHua

feat:修改模板详情页

parent 23f13226
import React, { useState } from 'react'
import React, { useState, Fragment } from 'react'
import { history } from 'umi';
import { ArrowLeftOutlined, EyeOutlined, PushpinOutlined } from '@ant-design/icons'
import { ArrowLeftOutlined, EyeOutlined, PushpinOutlined, BgColorsOutlined, ToTopOutlined } from '@ant-design/icons'
import cx from 'classnames'
import UseModal from '../components/useModal'
import default_img from '@/asserts/template_default_img.png'
......@@ -56,10 +56,35 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => {
<EyeOutlined />
<label>预览</label>
</div>
<div className={cx(styles.btn, styles.use)} onClick={() => setUseModalVisible(true)}>
<PushpinOutlined />
<label>{query.type === 'shop' ? '设置是否允许使用' : '使用'}</label>
</div>
{
query.type === 'shopCenter' && (
<Fragment>
<div className={cx(styles.btn, styles.use)} onClick={() => setUseModalVisible(true)}>
<PushpinOutlined />
<label>使用</label>
</div>
<div className={cx(styles.btn, styles.use)} >
<BgColorsOutlined />
<label>商城装修</label>
</div>
</Fragment>
)
}
{
query.type === 'shop' && (
<Fragment>
<div className={cx(styles.btn, styles.use)}>
<ToTopOutlined />
<label>上架</label>
</div>
<div className={cx(styles.btn, styles.use)}>
<ToTopOutlined rotate={180} />
<label>下架</label>
</div>
</Fragment>
)
}
<UseModal
title="使用商场模板"
......
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