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

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

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