Merge branch 'master' of http://git.luyuan.tk/luyuan/beelink into zj
This commit is contained in:
@@ -3,6 +3,7 @@ import axios from '../config/axiosConfig'
|
||||
import { AxiosRequestConfig, CustomSuccessData } from 'axios';
|
||||
import { getValue } from '@/utils/common';
|
||||
import { message } from 'ant-design-vue';
|
||||
import router from '@/router';
|
||||
|
||||
// 泛型接口
|
||||
export interface Get {
|
||||
@@ -10,7 +11,9 @@ export interface Get {
|
||||
}
|
||||
|
||||
axios.interceptors.response.use((response)=>{
|
||||
|
||||
if(response.data.code == 1001){
|
||||
router.push("/")
|
||||
}
|
||||
return response;
|
||||
},(error)=>{
|
||||
message.error(error.response.data.message)
|
||||
|
||||
@@ -255,3 +255,24 @@ export async function sendsms(phone: string, type: number): Promise<boolean>{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取国家数据
|
||||
*/
|
||||
|
||||
interface Countries{
|
||||
id: number;
|
||||
name: string;
|
||||
country_code: string;
|
||||
}
|
||||
|
||||
interface Willsay{
|
||||
languageid: number;
|
||||
name: string
|
||||
}
|
||||
|
||||
export async function getarchives(): Promise<[Countries[],Willsay[]]>{
|
||||
return [(await get<Countries[]>("countries")).data, (await get<Willsay[]>("willsay")).data];
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user