Commit 65dc8a98 authored by 前端-李俊鑫's avatar 前端-李俊鑫

fix: 自营商城-关于我们数据初始处理

parent 6ff3728d
......@@ -51,10 +51,10 @@ const OwnMallAboutUs = () => {
const [saveLoading, setSaveLoading] = useState<boolean>(false)
const [isFormChange, setIsFormChange] = useState<boolean>(false)
const [albumUrls, setAlbumUrls] = useState<any[]>([])
const [albumUrls, setAlbumUrls] = useState<any[]>([])
const [allMallList, setAllMallList] = useState<any[]>([])
const [selectCityData, setSelectCityData] = useState<any>([defaultCityData])
const [mallUrl, setMallUrl] = useState<string>()
const [mallUrl, setMallUrl] = useState<string>()
const getAlbumUrls = (data) => {
setAlbumUrls(data);
......@@ -151,9 +151,9 @@ const OwnMallAboutUs = () => {
if (code === 1000 && data) {
const { albumName, albumUrl, honorPics, workshopPics, ...rest } = data
const newAlbumUrls = albumName && albumUrl ? [{ name: albumName, url: albumUrl }] : []
workshopImgRef.current.setData(workshopPics)
honorImgRef.current.setData(honorPics)
workshopImgRef.current?.setData(workshopPics)
honorImgRef.current?.setData(honorPics)
form.setFieldsValue({
...rest,
albumUrls: newAlbumUrls
......@@ -272,4 +272,4 @@ const OwnMallAboutUs = () => {
)
}
export default observer(OwnMallAboutUs)
\ No newline at end of file
export default observer(OwnMallAboutUs)
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