|
@@ -1,5 +1,5 @@
|
|
import dayjs from 'dayjs'
|
|
import dayjs from 'dayjs'
|
|
-import {AgreementType} from "@/core/libs/enums";
|
|
|
|
|
|
+import { AgreementType } from '@/core/libs/enums'
|
|
export const handleCall = (phone: string) => {
|
|
export const handleCall = (phone: string) => {
|
|
uni.makePhoneCall({ phoneNumber: phone }).then()
|
|
uni.makePhoneCall({ phoneNumber: phone }).then()
|
|
}
|
|
}
|
|
@@ -57,7 +57,7 @@ export const requestToast = async <T>(
|
|
},
|
|
},
|
|
) => {
|
|
) => {
|
|
const { code, data, msg } = await func()
|
|
const { code, data, msg } = await func()
|
|
- const duration = options.duration || 3000
|
|
|
|
|
|
+ const duration = options.duration || 2000
|
|
if (code === 0 && options.success) {
|
|
if (code === 0 && options.success) {
|
|
await uni.showToast({
|
|
await uni.showToast({
|
|
title: options.successTitle,
|
|
title: options.successTitle,
|
|
@@ -69,7 +69,7 @@ export const requestToast = async <T>(
|
|
await uni.showToast({
|
|
await uni.showToast({
|
|
title: options.errorTitle || msg,
|
|
title: options.errorTitle || msg,
|
|
icon: 'none',
|
|
icon: 'none',
|
|
- duration: 5000,
|
|
|
|
|
|
+ duration: 3000,
|
|
})
|
|
})
|
|
}
|
|
}
|
|
return { code, data, msg, duration }
|
|
return { code, data, msg, duration }
|