暂存
This commit is contained in:
commit
822aeae3d4
@ -144,5 +144,5 @@ export const appOrderDetail = (appOrderId:any) => aiShopRequest.get(`/aishop/api
|
||||
// 生成授权书word文件
|
||||
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)
|
||||
// ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
@ -142,13 +142,7 @@ export default function AppCompany(props: any) {
|
||||
|
||||
// };
|
||||
const token = sessionStorage.getItem('token')
|
||||
const submitInfo = (values: any) => {
|
||||
message.success('提交成功');
|
||||
console.log(values);
|
||||
props.setEditProcess(2);
|
||||
|
||||
|
||||
}
|
||||
const height = window.innerHeight - 460;
|
||||
const [form] = Form.useForm();
|
||||
|
||||
@ -163,19 +157,23 @@ export default function AppCompany(props: any) {
|
||||
|
||||
const onFinish = async (values: any) => {
|
||||
// 处理表单提交逻辑
|
||||
console.log('表单提交成功', values);
|
||||
console.log('发过来的数据', props.companyInfo);
|
||||
if (values != props.companyInfo) {
|
||||
// console.log('表单提交成功', values);
|
||||
// console.log('发过来的数据', props.companyInfo);
|
||||
if (JSON.stringify(values) !== JSON.stringify(props.companyInfo)) {
|
||||
try {
|
||||
setDownLoading(true)
|
||||
const res = await companyAuth(props.appOrderId, {
|
||||
appOrderId: props.appOrderId,
|
||||
...values
|
||||
})
|
||||
props.setCompanyInfo({
|
||||
...values,
|
||||
})
|
||||
props.setEditProcess(2);
|
||||
setDownLoading(false)
|
||||
console.log(res);
|
||||
} catch (error: any) {
|
||||
|
||||
setDownLoading(false)
|
||||
if (error.response) {
|
||||
const data = error.response.data;
|
||||
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);
|
||||
if (props.companyInfo.companyName) {
|
||||
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])
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { useState } from 'react'
|
||||
import { useEffect, useState } from 'react'
|
||||
import BelongPeople from '../../../../components/BelongPeople/BelongPeople.tsx'
|
||||
import { Button, Form, Input, message, Select, Modal, DatePicker, Upload } from "antd"
|
||||
import { UploadOutlined } from '@ant-design/icons';
|
||||
@ -65,6 +65,9 @@ export default function EditAppInfo(props: any) {
|
||||
submitInfo(values)
|
||||
|
||||
};
|
||||
useEffect(() => {
|
||||
|
||||
},[props.appInfo])
|
||||
return (
|
||||
<div className='appInfoBox'>
|
||||
<div className='bigLine'></div>
|
||||
|
Loading…
Reference in New Issue
Block a user