修复了视频评分

This commit is contained in:
luyuan 2020-11-10 10:13:44 +08:00
parent 6f7322628e
commit 82d7a69123
Signed by: theluyuan
GPG Key ID: A7972FD973317FF3
3 changed files with 10 additions and 4 deletions

View File

@ -232,6 +232,7 @@ interface VideoDetail{
updated_at: string; updated_at: string;
share: number; share: number;
watch: number; watch: number;
score: string;
} }
export async function videodetail(data?: any,ifupdate?: number) { export async function videodetail(data?: any,ifupdate?: number) {
@ -262,7 +263,9 @@ export async function videodetail(data?: any,ifupdate?: number) {
createdAt: res.data.created_at, createdAt: res.data.created_at,
updatedAt: res.data.updated_at, updatedAt: res.data.updated_at,
watch: res.data.watch, watch: res.data.watch,
share: res.data.share share: res.data.share,
score: res.data.score
} }
} }

View File

@ -3,9 +3,9 @@
<div class="top"> <div class="top">
<div class="title"> <div class="title">
{{lan.$t('shipinpingjia')}} {{lan.$t('shipinpingjia')}}
<span>8.0{{lan.$t('fen')}}</span> <span>{{videoinfo}}{{lan.$t('fen')}}</span>
</div> </div>
<div class="score">8.0{{lan.$t('fen')}}</div> <div class="score">{{videoinfo}}{{lan.$t('fen')}}</div>
</div> </div>
<div class="list" v-for="(i,j) in reviewlist.data" :key="j" > <div class="list" v-for="(i,j) in reviewlist.data" :key="j" >
<ReviewItem <ReviewItem
@ -111,6 +111,9 @@ export default defineComponent({
props: { props: {
videoid: { videoid: {
type: Number type: Number
},
videoinfo: {
type: String
} }
}, },
setup(prop,context){ setup(prop,context){

View File

@ -4,7 +4,7 @@
<VideoPlay :url="result.fileurl"></VideoPlay> <VideoPlay :url="result.fileurl"></VideoPlay>
<VideoCont :videoid="result.videoid" :date="result.createdAt" :watch="result.watch" :share="result.share" :status="result.status"></VideoCont> <VideoCont :videoid="result.videoid" :date="result.createdAt" :watch="result.watch" :share="result.share" :status="result.status"></VideoCont>
</div> </div>
<VideoReview class="review" v-if="result.status == 1"></VideoReview> <VideoReview :videoinfo="result.score" class="review" v-if="result.status == 1"></VideoReview>
</div> </div>
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>