Commit 5b8b85d6 authored by 涂伟's avatar 涂伟

fix: '手持配置新增'

parent fa85fdea
......@@ -14,7 +14,7 @@ const PictureWallProvider = props => {
const [imgBed, setImgBed] = useState([]);
const update = () =>
getImageBases('icon,androidMenu,menuNew,logo,CityTemp')
getImageBases('icon,androidMenu,menuNew,logo,CityTemp,bootAnimation,loginPageImage,homePageImage')
.then(res => {
if (res.code === 0) {
const { data } = res;
......@@ -27,6 +27,7 @@ const PictureWallProvider = props => {
}
});
setImgBed(arr);
console.log(data, arr, '6666666666666666666666');
}
})
.catch(err => {
......
......@@ -29,6 +29,9 @@ const tabNames: any = {
logo: '项目logo',
menu: '菜单图标',
CityTemp: '用户上传',
bootAnimation: '开机动画',
loginPageImage: '登录页',
homePageImage: '主页焦点图',
}
function getBase64(file: File | Blob) {
......@@ -91,6 +94,8 @@ class PicturesWall extends React.Component<PicturesWallType> {
static getDerivedStateFromProps = (props, state) => {
const { value, uploadContext = {} } = props;
const { imgBed, update } = uploadContext;
console.log(imgBed,'imgBedimgBedimgBedimgBed');
const fileList = state.fileList;
const shouldUpdate = fileList.every(f => Array.isArray(value) ? !value.some(v => f.url === v) : f.url !== value)
if (value !== state.prevProps.value && shouldUpdate) {
......@@ -337,6 +342,8 @@ class PicturesWall extends React.Component<PicturesWallType> {
actives,
curSelectedImg,
} = this.state;
console.log(imgBed,'imgBedddddddddddddddddddddd');
const {
action = `${window.location.origin}${PUBLISH_SERVICE}/FileCenter/UploadSingleFile`,
headers,
......
......@@ -125,9 +125,46 @@ const SiteConfig = props => {
message: '请选择系统图标',
},
]}
style={{ display: 'none' }}
>
<PicturesWall picType="icon" />
</Item>
<Item
label="开机动画:"
name="bootAnimation"
rules={[
{
required: true,
message: '请选择开机动画',
},
]}
>
<PicturesWall picType="bootAnimation" />
</Item>
<Item
label="登录页:"
name="loginPageImage"
rules={[
{
required: true,
message: '请选择登录页',
},
]}
>
<PicturesWall picType="loginPageImage" />
</Item>
<Item
label="主页焦点图:"
name="homePageImage"
rules={[
{
required: true,
message: '请选择主页焦点图',
},
]}
>
<PicturesWall picType="homePageImage" />
</Item>
<Item
label="登陆页面:"
......
......@@ -43,6 +43,9 @@ const AddConfig = props => {
form.setFieldsValue({
title: '新应用',
shortcutIcon: 'assets\\images\\icon\\熊猫-白色.png',
bootAnimation: 'assets\\images\\bootAnimation\\bootDefault.png',
loginPageImage: 'assets\\images\\loginPageImage\\loginDefault.png',
homePageImage: 'assets\\images\\homePageImage\\homeDefault.png',
loginTemplate: loginList[0].value,
theme: themeList[0].value,
style: styleList[0].value,
......@@ -159,9 +162,46 @@ const AddConfig = props => {
message: '请选择系统图标',
},
]}
style={{ display: 'none' }}
>
<PicturesWall picType="icon" />
</Item>
<Item
label="开机动画:"
name="bootAnimation"
rules={[
{
required: true,
message: '请选择开机动画',
},
]}
>
<PicturesWall picType="bootAnimation" />
</Item>
<Item
label="登录页:"
name="loginPageImage"
rules={[
{
required: true,
message: '请选择登录页',
},
]}
>
<PicturesWall picType="loginPageImage" />
</Item>
<Item
label="主页焦点图:"
name="homePageImage"
rules={[
{
required: true,
message: '请选择主页焦点图',
},
]}
>
<PicturesWall picType="homePageImage" />
</Item>
<Item
label="登陆页面:"
......
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