Commit c6ac972e by qlintonger xeno

删除ts错误

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