diff --git a/src/api/base.ts b/src/api/base.ts index d409b9c..56d4e01 100644 --- a/src/api/base.ts +++ b/src/api/base.ts @@ -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; } diff --git a/src/api/index.ts b/src/api/index.ts index 7cbc3f9..a8bc859 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -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('live',data); @@ -316,4 +316,12 @@ interface Language { export async function getlanguages(): Promise{ return (await get("languages")).data; +} + +/** + * 修改我的档案 + */ + +export async function putmember(data: unknown): Promise{ + return (await put(`member/${store.state.userinfo.memberid}`, data) ) } \ No newline at end of file diff --git a/src/components/LiveItem.vue b/src/components/LiveItem.vue index 9875590..ac3f468 100644 --- a/src/components/LiveItem.vue +++ b/src/components/LiveItem.vue @@ -3,7 +3,7 @@
- {{title}} +
{{title}}
{{score}}分
@@ -57,9 +57,10 @@ height: 23px; } .title{ + margin: 18px; margin-top: 16px; + margin-bottom: 0; font-display: 11px; - margin-left: 18px; color: #111; display: flex; align-items: center; @@ -68,6 +69,7 @@ margin-left: 11px; font-size: 10px; color: #f55455; + flex-shrink: 0; } } .info{ @@ -149,7 +151,7 @@ export default defineComponent({ type:String }, score:{ - type:Number + type:String }, date:{ type:String @@ -162,6 +164,9 @@ export default defineComponent({ }, status:{ type:Number + }, + zid:{ + type: Number } }, setup(props){ @@ -177,7 +182,10 @@ export default defineComponent({ case 3: url = '/regeime/liveing'; } - router.push(url) + console.log(props.zid); + if(props.zid != undefined){ + router.push({path: url,query: { id: props.zid }}) + } } return { navto diff --git a/src/components/LivePlay.vue b/src/components/LivePlay.vue index adf5b6f..83a1c08 100644 --- a/src/components/LivePlay.vue +++ b/src/components/LivePlay.vue @@ -1,19 +1,80 @@ \ No newline at end of file