This commit is contained in:
luyuan 2020-10-15 14:51:34 +08:00
parent c240c7aba3
commit 6111abafc4
Signed by: theluyuan
GPG Key ID: A7972FD973317FF3
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);
@ -317,3 +317,11 @@ 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) )
}

View File

@ -3,7 +3,7 @@
<img :src="img" alt="" class="cover">
<img src="@/static/images/play.png" alt="" class="play">
<div class="title">
{{title}}
<div class="one-line-hide">{{title}}</div>
<span class="lv">{{score}}</span>
</div>
<div class="info">
@ -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

View File

@ -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)
})
}

View File

@ -12,7 +12,7 @@
</div>
</div>
<div class="list" v-if="tabindex==1">
<LiveItem :type="2" v-for="(i,j) in livelist" :key="j" :img="i.img" :title="i.title" :score="i.score" :date="i.starttime" :takehour="i.vodduration" :livenum="i.livenumber" :status="i.livestatus"></LiveItem>
<LiveItem :type="2" v-for="(i,j) in livelist" :key="j" :img="i.img" :title="i.title" :score="i.score" :date="i.starttime" :takehour="i.vodduration" :livenum="i.livenumber" :status="i.livestatus" :zid="i.liveid"></LiveItem>
</div>
<div class="list" v-if="tabindex==2">

View File

@ -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);
},
});
</script>