Commit 39bc2ae0 authored by 前端-黄佳鑫's avatar 前端-黄佳鑫

🐞 fix(所有门户): 修复图片大小超过提交错误的问题

parent 157e4c6d
......@@ -189,11 +189,18 @@ const ChannelInfo: React.FC<ShopInfoPropsType> = (props) => {
if (!checkmemberChannelAreas(value.memberChannelAreas)) {
return
}
value.albumName = file.albumName;
value.albumUrl = file.albumUrl;
setConfirmLoading(true)
setConfirmLoading(true)
PublicApi.postTemplateWebMemberChannelWebSaveCurrMemberChannel(value).then(res => {
const params = {
albumName: !isEmpty(file) ? file.albumName : null,
albumUrl: !isEmpty(file) ? file.albumUrl : null,
describe: value.describe,
honorPics,
logo: value.logo,
memberChannelAreas: value.memberChannelAreas,
workshopPics,
}
console.log(params)
PublicApi.postTemplateWebMemberChannelWebSaveCurrMemberChannel(params).then(res => {
if (res.code === 1000) {
fetchShopInfo()
setFormIsHalfFilledOut(false)
......
......@@ -218,29 +218,31 @@ const HandlingInfo: React.FC<HandlingInfoPropsType> = (props) => {
const handleSave = (e: any) => {
e.preventDefault()
form.validateFields().then((value: any) => {
// if (!checkcategoryBOList(value.categoryBOList)) {
// return
// }
if (!checkareaBOList(value.areaBOList)) {
return
}
if (!isEmpty(file)) {
value.albumName = file[0].name;
value.albumUrl = file[0].url;
const params = {
aboutSeo: {
title: value.title,
description: value.description,
keywords: value.keywords,
},
albumName: !isEmpty(file) ? file[0].name : null,
albumUrl: !isEmpty(file) ? file[0].url : null,
areaBOList: value.areaBOList,
categoryBOList: value.categoryBOList,
companyPics,
describe: value.describe,
honorPics,
logo: value.logo,
plantArea: value.plantArea,
slideshowBOList,
staffNum: value.staffNum,
yearProcessAmount: value.yearProcessAmount,
}
value.aboutSeo = {
title: value.title,
description: value.description,
keywords: value.keywords,
}
delete value.slideshowBOList
value.slideshowBOList = slideshowBOList
delete value.title
delete value.keywords
delete value.description
setConfirmLoading(true)
PublicApi.postTemplateWebMemberProcessWebSaveCurrMemberProcess(value).then(res => {
PublicApi.postTemplateWebMemberProcessWebSaveCurrMemberProcess(params).then(res => {
if (res.code === 1000) {
fetchShopInfo()
setFormIsHalfFilledOut(false)
......@@ -306,6 +308,7 @@ const HandlingInfo: React.FC<HandlingInfoPropsType> = (props) => {
* @param url
*/
const handleAddworkshopPics = (url: string) => {
console.log(url, 10086)
setCompanyPics([...companyPics, url])
form.setFieldsValue({
companyPics: [...companyPics, url]
......
......@@ -229,23 +229,24 @@ const LogisticsInfo: React.FC<LogisticsInfoPropsType> = (props) => {
if (!checkareaBOList(value.areaBOList)) {
return
}
if (!isEmpty(file)) {
value.albumName = file.albumName;
value.albumUrl = file.albumUrl;
}
value.aboutSeo = {
title: value.title,
description: value.description,
keywords: value.keywords,
}
delete value.slideshowBOList
value.slideshowBOList = slideshowBOList
delete value.title
delete value.keywords
delete value.description
setConfirmLoading(true)
PublicApi.postTemplateWebMemberLogisticsWebSaveCurrMemberLogistics(value).then(res => {
const params = {
aboutSeo: {
title: value.title,
description: value.description,
keywords: value.keywords,
},
albumName: !isEmpty(file) ? file.albumName : null,
albumUrl: !isEmpty(file) ? file.albumUrl : null,
areaBOList: value.areaBOList,
companyPics,
describe: value.describe,
honorPics,
logo: value.logo,
mainBusiness: value.mainBusiness,
slideshowBOList,
}
PublicApi.postTemplateWebMemberLogisticsWebSaveCurrMemberLogistics(params).then(res => {
if (res.code === 1000) {
fetchShopInfo()
setFormIsHalfFilledOut(false)
......
......@@ -193,10 +193,18 @@ const ShopInfo: React.FC<ShopInfoPropsType> = (props) => {
if (!checkMemberShopAreas(value.memberShopAreas)) {
return
}
value.albumName = file.albumName;
value.albumUrl = file.albumUrl;
setConfirmLoading(true)
PublicApi.postTemplateWebMemberShopWebSaveCurrMemberShop(value).then(res => {
const params = {
albumName: !isEmpty(file) ? file.albumName : null,
albumUrl: !isEmpty(file) ? file.albumUrl : null,
describe: value.describe,
honorPics,
logo: value.logo,
memberShopAreas: value.memberShopAreas,
workshopPics,
}
console.log(params)
PublicApi.postTemplateWebMemberShopWebSaveCurrMemberShop(params).then(res => {
if (res.code === 1000) {
fetchShopInfo()
setFormIsHalfFilledOut(false)
......
......@@ -63,7 +63,7 @@ const InquirySearch = () => {
title: '操作',
key: 'options',
dataIndex: 'options',
render: (text: any, record: any) => <Button disabled={record.isQuoted === 1 || record.externalState === 2} onClick={() => history.push(`/memberCenter/tranactionAbility/inquiryOffer/waitAddOffer/offer?id=${record.id}`)} type='link'>报价</Button>
render: (text: any, record: any) => <Button disabled={record.isQuoted === 1} onClick={() => history.push(`/memberCenter/tranactionAbility/inquiryOffer/waitAddOffer/offer?id=${record.id}`)} type='link'>报价</Button>
}
];
......
......@@ -218,18 +218,20 @@ const PurchasInfo: React.FC<PurchasInfoPropsType> = (props) => {
if (!checkareaBOList(value.areaBOList)) {
return
}
if (!isEmpty) {
value.albumName = file.albumName;
value.albumUrl = file.albumUrl;
}
delete value.slideshowBOList
value.slideshowBOList = slideshowBOList
delete value.title
delete value.keywords
delete value.description
setConfirmLoading(true)
PublicApi.postTemplateWebMemberPurchaseWebSaveCurrMemberPurchase(value).then(res => {
const params = {
advertPics,
albumName: !isEmpty(file) ? file.albumName : null,
albumUrl: !isEmpty(file) ? file.albumUrl : null,
areaBOList: value.areaBOList,
companyPics,
describe: value.describe,
honorPics,
logo: value.logo,
slideshowBOList,
}
console.log(params)
PublicApi.postTemplateWebMemberPurchaseWebSaveCurrMemberPurchase(params).then(res => {
if (res.code === 1000) {
fetchShopInfo()
setFormIsHalfFilledOut(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