Commit c6ac972e by qlintonger xeno

删除ts错误

parent 16ee311e
......@@ -38,6 +38,7 @@ export const alova = createAlova({
appStore.count++
}
// 设置请求头application/json;charset=UTF-8
// @ts-ignore
const isUpload = method.config?.meta?.isUpload
console.log('the upload here', isUpload, method)
if (isUpload && method.data) {
......
import {Ref} from "vue";
import {displayError} from "../../components/Global/MessagePrompt/functionals/triggerMessagePrompt";
export async function fetchCommonFuncSimplified(
f: Function,
......@@ -22,7 +21,6 @@ export async function fetchCommonFuncSimplified(
}
} catch (e: any) {
console.log('error in fetch', e);
displayError(`处理${txt}失败,错误信息:${e.message}`);
} finally {
if (loaderRef) {
loaderRef.value = false
......
......@@ -10,6 +10,7 @@ export const formatDate = (
until = "all",
defaultVal: string = '--'
): string => {
// @ts-ignore
if (input === null || input === 0||input < 0) return defaultVal;
const date = new Date(input);
const year = date.getFullYear();
......@@ -48,6 +49,7 @@ export const formatDateZh = (
until = "all",
defaultVal: string = '--'
): string => {
// @ts-ignore
if (input === null || input === 0||input < 0) return defaultVal;
const date = new Date(input);
const year = date.getFullYear();
......
......@@ -57,6 +57,7 @@ const {
} = useRequest(
() =>
alova.Post<any>('/admin/login', loginForm, {
// @ts-ignore
meta: {
loading: '登陆中...'
}
......@@ -92,6 +93,7 @@ const getCaptcha = async () => {
'/admin/getCaptcha',
{ username: loginForm.username },
{
// @ts-ignore
meta: {
blob: true
}
......
......@@ -93,6 +93,7 @@ const uploadMuFile = (option: any, type: string) => {
uid: 4
}
return alova
// @ts-ignore
.Post<any>('/admin/uploadMuFile', params, { meta: { isUpload: true } })
.then((res) => {
if (res.code == 200) {
......
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