From 6111abafc43b795821b0b41d29bac6239a8cb0f0 Mon Sep 17 00:00:00 2001 From: luyuan <1162963624@qq.com> Date: Thu, 15 Oct 2020 14:51:34 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E7=9B=B4=E6=92=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/base.ts | 2 +- src/api/index.ts | 14 +++++++++++--- src/components/LiveItem.vue | 16 ++++++++++++---- src/views/mine/Archives.vue | 5 ++++- src/views/regime/Live.vue | 2 +- src/views/regime/Livedetail.vue | 3 ++- 6 files changed, 31 insertions(+), 11 deletions(-) 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/views/mine/Archives.vue b/src/views/mine/Archives.vue index d0e6546..13884ee 100644 --- a/src/views/mine/Archives.vue +++ b/src/views/mine/Archives.vue @@ -276,7 +276,7 @@ import { uploadflie } from "@/utils/vod" import store from '@/store'; import smile from "@/static/images/smile.png" import smilet from "@/static/images/smilet.png" -import { getarchives, getlanguages } from "@/api/index" +import { getarchives, getlanguages, putmember } from "@/api/index" export default defineComponent({ name: "Archives", @@ -433,6 +433,9 @@ export default defineComponent({ */ function submitInfo (): void { console.log(toRaw(formData.value)); + putmember(toRaw(formData.value)).then((res) => { + console.log(res) + }) } diff --git a/src/views/regime/Live.vue b/src/views/regime/Live.vue index 8b3bd3c..4c5948b 100644 --- a/src/views/regime/Live.vue +++ b/src/views/regime/Live.vue @@ -12,7 +12,7 @@
- +
diff --git a/src/views/regime/Livedetail.vue b/src/views/regime/Livedetail.vue index 988464c..91d9891 100644 --- a/src/views/regime/Livedetail.vue +++ b/src/views/regime/Livedetail.vue @@ -94,6 +94,7 @@ import { defineComponent } from "vue"; import liveplay from "@/components/LivePlay.vue" import LiveCount from "@/components/LiveCount.vue"; import VideoReview from "@/components/VideoReview.vue"; +import { useRoute } from 'vue-router'; export default defineComponent({ components: { LiveCount, @@ -101,7 +102,7 @@ export default defineComponent({ VideoReview, }, setup() { - console.log(1); + console.log(useRoute().query.id); }, }); \ No newline at end of file From b1649cf566a4fccf6557061515605ae78c5d24a7 Mon Sep 17 00:00:00 2001 From: luyuan <1162963624@qq.com> Date: Thu, 15 Oct 2020 15:34:14 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E7=9B=B4=E6=92=AD=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/LivePlay.vue | 65 ++++++++++++++++++++++++++++++++- src/views/regime/Livedetail.vue | 62 +------------------------------ 2 files changed, 65 insertions(+), 62 deletions(-) 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 @@