Merge branch 'master' of http://git.luyuan.tk/luyuan/beelink into zj

This commit is contained in:
asd
2020-10-14 15:31:24 +08:00
14 changed files with 526 additions and 103 deletions

View File

@@ -10,9 +10,9 @@ export interface Get {
}
axios.interceptors.response.use((response)=>{
return response;
},(error)=>{
message.error(error.response.data.message)
return Promise.reject(error)
})

View File

@@ -23,7 +23,7 @@ export async function loginpass(phone: string, password: string){
message.error("存储错误, 请允许网页使用本地存储!")
}else{
setToken();
store.commit("login");
store.commit("login", true);
store.dispatch("setUserInfo");
router.push("/mine/archives")
}
@@ -145,11 +145,11 @@ export async function getlivelist(data?:any):Promise<LiveList[]> {
* 列表统计
*/
interface StatisticList{
liveInfo: any;
videoInfo: any;
studentInfo: any;
}
interface StatisticList{
liveInfo: any;
videoInfo: any;
studentInfo: any;
}
export async function getstatisticlist() {
const res = await get<StatisticList>('statistics');
@@ -167,8 +167,8 @@ export async function getstatisticlist() {
interface Liveaddrule{
code:number,
msg:string
}
export async function liveadd(data:any) {
}
export async function liveadd(data:any) {
const res = await post<Liveaddrule>('live',data);
console.log(res)
}
@@ -211,4 +211,28 @@ export async function videodetail(data?:any) {
export async function videodel(data:any) {
const res = await post<Liveaddrule>('live',data);
console.log(res)
}
}
}
/**
* 发送验证码
* @param phone 手机号
* @param type 国外1 国内0
*/
interface SendSms{
code: number;
msg: string;
}
export async function sendsms(phone: string, type: number): Promise<boolean>{
const res = await post<SendSms>("SendSms", {phone, type});
console.log(res);
if(res.code == 0){
message.success(res.msg);
return true;
}else{
message.error(res.msg);
return false;
}
}