Commit 443ef2a8 authored by XieZhiXiong's avatar XieZhiXiong

Merge branch 'dev-srm' of http://10.0.0.22:3000/lingxi/lingxi-business-paltform into dev-srm

parents 1affcf72 32e74e70
......@@ -28,6 +28,8 @@ const defaultCategoryData = { index: 0, firstId: 0, secondId: 0, thirdlyId: 0, f
const PurchasInfo: React.FC<PurchasInfoPropsType> = (props) => {
const { siteUrl, siteId } = props.SiteStore
const [resUrl, setResUrl] = useState<string>('');
const [door, setDoor] = useState<string>('');
const [formIsHalfFilledOut, setFormIsHalfFilledOut] = useState(false)
const [form] = Form.useForm()
const [allMallList, setAllMallList] = useState([])
......@@ -320,7 +322,7 @@ const PurchasInfo: React.FC<PurchasInfoPropsType> = (props) => {
slideshowBOList: result
})
}
/**
const handleMallSelectChange = (mallId: number) => {
setShopId(mallId)
console.log(mallId, shopInfo)
......@@ -362,10 +364,6 @@ const PurchasInfo: React.FC<PurchasInfoPropsType> = (props) => {
return result
}
const handleFormValueChange = () => {
setFormIsHalfFilledOut(true)
}
const getSelectMallStoreUrl = () => {
if (!shopInfo) {
return null
......@@ -382,6 +380,16 @@ const PurchasInfo: React.FC<PurchasInfoPropsType> = (props) => {
}
return null
}
*/
const handleFormValueChange = () => {
setFormIsHalfFilledOut(true)
}
/** 获取店铺链接 */
const handleMallSelectChange = (val, option) => {
setDoor(option.children);
setResUrl(`${siteUrl}${option.url}`)
}
return (
<PageHeaderWrapper
......@@ -541,13 +549,17 @@ const PurchasInfo: React.FC<PurchasInfoPropsType> = (props) => {
<Select allowClear value={shopId} className={styles.form_item} onChange={handleMallSelectChange}>
{
allMallList.map(item => (
<Select.Option key={item.id} value={item.id}>{item.name}</Select.Option>
<Select.Option key={item.id} value={item.id} url={item.url}>{item.name}</Select.Option>
))
}
</Select>
{
getSelectMallStoreUrl()
}
{resUrl && (
<div className={styles.shop_url}>
<span>当前{door}链接:</span>
<label>{resUrl}</label>
<CopyOutlined className={styles.copy_icon} onClick={() => handleCopyLinke(resUrl)} />
</div>
)}
</Form.Item>
</TabPane>
<TabPane tab='首页轮播图' key='2' forceRender>
......
......@@ -123,7 +123,7 @@ const Material: React.FC<Iprops> = (props: any) => {
dataIndex: 'category',
render: (text: any, record: any, index: number) => (
<>
{ materielMode === 1 && (
{Array.isArray(record.ids) ? (
<Form.Item
style={{ margin: 0 }}
name={`category_${index + 1}`}
......@@ -139,17 +139,17 @@ const Material: React.FC<Iprops> = (props: any) => {
notFoundContent={<Spin size="small" />}
/>
</Form.Item>
)}
{ materielMode === 2 && (
) : (
<Form.Item
style={{ margin: 0 }}
name={`category_${index + 1}`}
initialValue={text}
rules={[{ required: true, message: '请输入' }]}
>
<Input onChange={(e) => handleEdit(e, 'category', index)} />
<Input onChange={(e) => handleEdit(e, 'category', index)} />
</Form.Item>
)}
</>
),
},
......@@ -220,6 +220,7 @@ const Material: React.FC<Iprops> = (props: any) => {
/** 添加列表 */
const fetchTableList = (data: any) => {
if (Object.keys(data).length > 0) {
console.log(data, 98)
setDataSource([...dataSource, data]);
setFlag(false);
}
......
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