Compare commits
No commits in common. "7fc57ff5e752a870856ca26d37ec32496a36e564" and "b26bcc1837c78eb7c8efec3faa1e1e1803cc1eff" have entirely different histories.
7fc57ff5e7
...
b26bcc1837
@ -174,8 +174,8 @@ const formSchema = toTypedSchema(
|
|||||||
.object({
|
.object({
|
||||||
type: z.enum(ACCOUNT_TYPE),
|
type: z.enum(ACCOUNT_TYPE),
|
||||||
account: z.string().optional(),
|
account: z.string().optional(),
|
||||||
money: z.coerce
|
money: z
|
||||||
.string()
|
.coerce.string()
|
||||||
.min(1, '金额不能为空')
|
.min(1, '金额不能为空')
|
||||||
.regex(/^\d+(\.\d{1,2})?$/, '格式错误,最多支持两位小数'),
|
.regex(/^\d+(\.\d{1,2})?$/, '格式错误,最多支持两位小数'),
|
||||||
avatar: z.string().optional(),
|
avatar: z.string().optional(),
|
||||||
@ -206,7 +206,7 @@ const onSubmit = handleSubmit(async (val) => {
|
|||||||
const amount = parseFloat(val.money)
|
const amount = parseFloat(val.money)
|
||||||
|
|
||||||
// 1. 基础校验
|
// 1. 基础校验
|
||||||
if (amount > props.commission / 100) return toast.error('佣金不足')
|
if (amount > props.commission / 100) return toast.error('超过最大佣金')
|
||||||
if (amount < 200) return toast.error('金额不能小于200')
|
if (amount < 200) return toast.error('金额不能小于200')
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|||||||
@ -4,7 +4,7 @@ const baseUrl = import.meta.env.VITE_APP_BASE_URL
|
|||||||
|
|
||||||
const request = new Request({
|
const request = new Request({
|
||||||
baseURL: baseUrl,
|
baseURL: baseUrl,
|
||||||
timeout: 60 * 1000,
|
timeout: 6000,
|
||||||
headers: {},
|
headers: {},
|
||||||
extraConfig: {
|
extraConfig: {
|
||||||
/** 这里是核心配置,一般不需要再去修改request/core.ts */
|
/** 这里是核心配置,一般不需要再去修改request/core.ts */
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user