暂存
This commit is contained in:
commit
822aeae3d4
@ -144,5 +144,5 @@ export const appOrderDetail = (appOrderId:any) => aiShopRequest.get(`/aishop/api
|
|||||||
// 生成授权书word文件
|
// 生成授权书word文件
|
||||||
export const authorizeWord = (appOrderId:any,companyName:string) => aiShopRequest.get(`/aishop/api/apporder/create-file/SHOP04/${appOrderId}?name=${companyName}授权书&companyName=${companyName}`)
|
export const authorizeWord = (appOrderId:any,companyName:string) => aiShopRequest.get(`/aishop/api/apporder/create-file/SHOP04/${appOrderId}?name=${companyName}授权书&companyName=${companyName}`)
|
||||||
// 企业认证
|
// 企业认证
|
||||||
export const companyAuth = (appOrderId:any,params:any) => aiShopRequest.post(`aishop/api/apporder/update/1/${appOrderId}`,{ params})
|
export const companyAuth = (appOrderId:any,params:any) => aiShopRequest.post(`aishop/api/apporder/update/1/${appOrderId}`,params)
|
||||||
// ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
@ -24,7 +24,7 @@ import type { UploadProps } from 'antd';
|
|||||||
// // pId: string;
|
// // pId: string;
|
||||||
// }
|
// }
|
||||||
export default function AppCompany(props: any) {
|
export default function AppCompany(props: any) {
|
||||||
const [messageApi, contextHolder] = message.useMessage();
|
const [messageApi, contextHolder] = message.useMessage();
|
||||||
const [downLoading, setDownLoading] = useState(false)
|
const [downLoading, setDownLoading] = useState(false)
|
||||||
const validateImageUrl = () => {
|
const validateImageUrl = () => {
|
||||||
if (!imageUrl) {
|
if (!imageUrl) {
|
||||||
@ -142,13 +142,7 @@ export default function AppCompany(props: any) {
|
|||||||
|
|
||||||
// };
|
// };
|
||||||
const token = sessionStorage.getItem('token')
|
const token = sessionStorage.getItem('token')
|
||||||
const submitInfo = (values: any) => {
|
|
||||||
message.success('提交成功');
|
|
||||||
console.log(values);
|
|
||||||
props.setEditProcess(2);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
const height = window.innerHeight - 460;
|
const height = window.innerHeight - 460;
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
|
|
||||||
@ -163,19 +157,23 @@ export default function AppCompany(props: any) {
|
|||||||
|
|
||||||
const onFinish = async (values: any) => {
|
const onFinish = async (values: any) => {
|
||||||
// 处理表单提交逻辑
|
// 处理表单提交逻辑
|
||||||
console.log('表单提交成功', values);
|
// console.log('表单提交成功', values);
|
||||||
console.log('发过来的数据', props.companyInfo);
|
// console.log('发过来的数据', props.companyInfo);
|
||||||
if (values != props.companyInfo) {
|
if (JSON.stringify(values) !== JSON.stringify(props.companyInfo)) {
|
||||||
try {
|
try {
|
||||||
setDownLoading(true)
|
setDownLoading(true)
|
||||||
const res = await companyAuth(props.appOrderId, {
|
const res = await companyAuth(props.appOrderId, {
|
||||||
appOrderId: props.appOrderId,
|
appOrderId: props.appOrderId,
|
||||||
...values
|
...values
|
||||||
})
|
})
|
||||||
|
props.setCompanyInfo({
|
||||||
|
...values,
|
||||||
|
})
|
||||||
|
props.setEditProcess(2);
|
||||||
setDownLoading(false)
|
setDownLoading(false)
|
||||||
console.log(res);
|
console.log(res);
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
|
setDownLoading(false)
|
||||||
if (error.response) {
|
if (error.response) {
|
||||||
const data = error.response.data;
|
const data = error.response.data;
|
||||||
messageApi.open({
|
messageApi.open({
|
||||||
@ -188,9 +186,10 @@ export default function AppCompany(props: any) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}else{
|
||||||
|
props.setEditProcess(2);
|
||||||
}
|
}
|
||||||
// submitInfo(values)
|
|
||||||
console.log('imageurl', imageUrl);
|
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
@ -198,6 +197,14 @@ export default function AppCompany(props: any) {
|
|||||||
console.log('认证数据', props.companyInfo);
|
console.log('认证数据', props.companyInfo);
|
||||||
if (props.companyInfo.companyName) {
|
if (props.companyInfo.companyName) {
|
||||||
console.log('嘻嘻');
|
console.log('嘻嘻');
|
||||||
|
form.setFieldsValue({
|
||||||
|
companyName: props.companyInfo.companyName,
|
||||||
|
companyNumber: props.companyInfo.companyNumber,
|
||||||
|
companyPhoto: props.companyInfo.companyPhoto,
|
||||||
|
companyAuth: props.companyInfo.companyAuth,
|
||||||
|
})
|
||||||
|
setImageUrl(showImage(props.companyInfo.companyPhoto, false))
|
||||||
|
setTextImageUrl(showImage(props.companyInfo.companyAuth, false))
|
||||||
|
|
||||||
}
|
}
|
||||||
}, [props.companyInfo])
|
}, [props.companyInfo])
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { useState } from 'react'
|
import { useEffect, useState } from 'react'
|
||||||
import BelongPeople from '../../../../components/BelongPeople/BelongPeople.tsx'
|
import BelongPeople from '../../../../components/BelongPeople/BelongPeople.tsx'
|
||||||
import { Button, Form, Input, message, Select, Modal, DatePicker, Upload } from "antd"
|
import { Button, Form, Input, message, Select, Modal, DatePicker, Upload } from "antd"
|
||||||
import { UploadOutlined } from '@ant-design/icons';
|
import { UploadOutlined } from '@ant-design/icons';
|
||||||
@ -65,6 +65,9 @@ export default function EditAppInfo(props: any) {
|
|||||||
submitInfo(values)
|
submitInfo(values)
|
||||||
|
|
||||||
};
|
};
|
||||||
|
useEffect(() => {
|
||||||
|
|
||||||
|
},[props.appInfo])
|
||||||
return (
|
return (
|
||||||
<div className='appInfoBox'>
|
<div className='appInfoBox'>
|
||||||
<div className='bigLine'></div>
|
<div className='bigLine'></div>
|
||||||
|
@ -2066,7 +2066,7 @@ export default function Index() {
|
|||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<></>
|
<></>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|
||||||
{/* <MenuWithBottomButtom
|
{/* <MenuWithBottomButtom
|
||||||
|
Loading…
Reference in New Issue
Block a user