This commit is contained in:
2020-10-15 14:51:34 +08:00
parent c240c7aba3
commit 6111abafc4
6 changed files with 31 additions and 11 deletions

View File

@@ -37,7 +37,7 @@ const del: Get = async function (url: string, data?: unknown){
}
const put: Get = async function (url: string, data?: unknown){
const res = await axios.put(url, {params:data})
const res = await axios.put(url, data)
return res.data;
}

View File

@@ -3,7 +3,7 @@ import store from '@/store';
import { LiveList, LoginData, UserInfo, VideoInfo } from '@/types';
import { saveValue } from '@/utils/common';
import { message } from 'ant-design-vue';
import { del, get, post, setToken } from './base'
import { del, get, post, put, setToken } from './base'
/**
@@ -165,8 +165,8 @@ export async function getstatisticlist() {
* 发布直播
*/
interface Liveaddrule{
code:number,
msg:string
code: number,
msg: string
}
export async function liveadd(data:any) {
const res = await post<Liveaddrule>('live',data);
@@ -316,4 +316,12 @@ interface Language {
export async function getlanguages(): Promise<Language[]>{
return (await get<Language[]>("languages")).data;
}
/**
* 修改我的档案
*/
export async function putmember(data: unknown): Promise<Liveaddrule>{
return (await put<Liveaddrule>(`member/${store.state.userinfo.memberid}`, data) )
}