上传文件

This commit is contained in:
2020-10-14 18:55:15 +08:00
parent b41672ce8b
commit ffe57d9938
4 changed files with 80 additions and 29 deletions

View File

@@ -11,6 +11,7 @@ export interface Get {
}
axios.interceptors.response.use((response)=>{
console.log(response)
if(response.data.code == 1001){
router.push("/")
}

View File

@@ -237,7 +237,7 @@ export async function sendsms(phone: string, type: number): Promise<boolean>{
}
/**
* 获取国家数据
* 获取国家与语言数据
*/
interface Countries{
@@ -256,3 +256,24 @@ export async function getarchives(): Promise<[Countries[],Willsay[]]>{
}
/**
* 客户端语言
*/
interface Language {
dictionaryid: number;
name: string;
alias: string;
code :string;
position: number;
publish: number;
value: string;
deleted_at: null;
created_at: string;
updated_at: string;
}
export async function getlanguages(): Promise<Language[]>{
return (await get<Language[]>("languages")).data;
}