refactor(api): 更新 API调用以使用 request-legacy- 将多个 API 文件中的 request 引用更新为 request-legacy
- 修改了部分 API调用的错误处理方式 - 更新了部分函数参数名称
This commit is contained in:
@@ -36,7 +36,7 @@ const AddUserAddress = () => {
|
||||
|
||||
const reload = async () => {
|
||||
// 判断用户是否登录
|
||||
if(!user?.userId){
|
||||
if (!user?.userId) {
|
||||
return false;
|
||||
}
|
||||
// 查询当前用户ID是否已有申请记录
|
||||
@@ -154,17 +154,17 @@ const AddUserAddress = () => {
|
||||
extra={
|
||||
<span style={{
|
||||
color: FormData.applyStatus === 20 ? '#52c41a' :
|
||||
FormData.applyStatus === 30 ? '#ff4d4f' : '#faad14'
|
||||
FormData.applyStatus === 30 ? '#ff4d4f' : '#faad14'
|
||||
}}>
|
||||
{getApplyStatusText(FormData.applyStatus)}
|
||||
</span>
|
||||
}
|
||||
/>
|
||||
{FormData.applyStatus === 20 && (
|
||||
<Cell title={'审核时间'} extra={FormData.auditTime || '无'} />
|
||||
<Cell title={'审核时间'} extra={FormData.auditTime || '无'}/>
|
||||
)}
|
||||
{FormData.applyStatus === 30 && (
|
||||
<Cell title={'驳回原因'} extra={FormData.rejectReason || '无'} />
|
||||
<Cell title={'驳回原因'} extra={FormData.rejectReason || '无'}/>
|
||||
)}
|
||||
</CellGroup>
|
||||
)}
|
||||
@@ -173,7 +173,7 @@ const AddUserAddress = () => {
|
||||
{/* 底部浮动按钮 */}
|
||||
{(!isEditMode || FormData.applyStatus === 10 || FormData.applyStatus === 30) && (
|
||||
<FixedButton
|
||||
icon={<Edit />}
|
||||
icon={<Edit/>}
|
||||
text={isEditMode ? '保存修改' : '提交申请'}
|
||||
disabled={FormData.applyStatus === 10}
|
||||
onClick={handleFixedButtonClick}
|
||||
|
||||
Reference in New Issue
Block a user