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

fix: 修改接口返回message 国际化

parent 7c2c0351
......@@ -61,7 +61,7 @@ const RealnameLayout = () => {
if (info?.frontUrl && info?.backUrl && term) {
postMemberSecurityUploadIdCard({ frontUrl: info?.frontUrl, backUrl: info?.backUrl }).then((res) => {
if (res.code !== 1000) {
message.error(res.message)
message.error(intl.formatMessage({ id: `${res.code}` }))
return
}
const data = {
......@@ -77,7 +77,7 @@ const RealnameLayout = () => {
useEffect(() => {
getMemberSecurityGetUserInfo().then((res: any) => {
if (res.code !== 1000) {
message.error(res.message)
message.error(intl.formatMessage({ id: `${res.code}` }))
return
}
const { data } = res
......@@ -89,7 +89,7 @@ const RealnameLayout = () => {
setLoading(true)
postMemberSecuritySaveAuthInfo({ ...info } as any).then((res: any) => {
if (res.code !== 1000) {
message.error(res.message)
message.error(intl.formatMessage({ id: `${res.code}` }))
setLoading(false)
return
}
......
......@@ -220,7 +220,7 @@ const SettlementList = () => {
id: itemInfo.id.toString()
})
if (res.code !== 1000) {
message.error(res.message);
message.error(intl.formatMessage({ id: `${res.code}` }));
return;
}
setRandomCode(res.data);
......
......@@ -119,7 +119,7 @@ const MemberSettleAdd: React.FC = () => {
if (code !== 1000) {
return config
}
}
const codeToMap = ["", "days", "month"]
data.forEach((_item) => {
config[codeToMap[_item.methodCode]] = true
......@@ -252,7 +252,7 @@ const MemberSettleAdd: React.FC = () => {
memberRowCtl.setSelectRow(list);
memberRowCtl.setSelectedRowKeys(res.data.memberList.map((item) => item.memberId + "_" + item.roleId))
} else {
message.error({ content: res.message })
message.error({ content: intl.formatMessage({ id: `${res.code}` }) })
}
}
getInfo();
......
......@@ -112,7 +112,7 @@ const AccountDetail: React.FC<{}> = () => {
getAccountInfo()
}
} else {
message.error(res.message)
message.error(intl.formatMessage({ id: `${res.code}` }))
}
})
}
......
......@@ -147,7 +147,7 @@ const EAccountDetail: React.FC<{}> = () => {
getAccountInfo()
}
} else {
message.error(res.message)
message.error(intl.formatMessage({ id: `${res.code}` }))
}
})
}
......
......@@ -117,7 +117,7 @@ const AddInquiry = () => {
const addFn = async () => {
await getTemplateWebMemberPurchaseWebFindCurrMemberPurchase().then(res => {
if (res.code !== 1000) {
message.error(res.message);
message.error(intl.formatMessage({ id: `${res.code}` }));
return
}
if (!res.data) {
......
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