增加短剧视频详情页面
This commit is contained in:
parent
7c978d7e85
commit
b244bf94d7
|
|
@ -1,25 +1,47 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="min-page">
|
<view class="min-page">
|
||||||
<my-video-list></my-video-list>
|
<my-video-list @swiperChange="swiperChange" :list="state.list" :isCollect="state.isCollect" @share="share"
|
||||||
|
></my-video-list>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import {onLoad,onShow} from '@dcloudio/uni-app'
|
import {
|
||||||
|
onLoad,
|
||||||
|
onShow
|
||||||
|
} from '@dcloudio/uni-app'
|
||||||
import * as Api from '@/api/video/index.js'
|
import * as Api from '@/api/video/index.js'
|
||||||
|
import {
|
||||||
|
reactive
|
||||||
|
} from 'vue'
|
||||||
|
import {
|
||||||
|
slice
|
||||||
|
} from 'lodash'
|
||||||
let options = {}
|
let options = {}
|
||||||
|
const state = reactive({
|
||||||
|
collect: 0,
|
||||||
|
current: {},
|
||||||
|
list: [],
|
||||||
|
price: 0,
|
||||||
|
title: ''
|
||||||
|
})
|
||||||
|
async function init() {
|
||||||
|
const res = await Api.getVideoDetail(options)
|
||||||
|
Object.assign(state, res)
|
||||||
|
state.list = res.list
|
||||||
|
}
|
||||||
onLoad((opt) => {
|
onLoad((opt) => {
|
||||||
Object.assign(options, opt)
|
Object.assign(options, opt)
|
||||||
try {
|
init()
|
||||||
Api.getVideoDetail(options)
|
|
||||||
} catch (error) {
|
|
||||||
console.log(error)
|
|
||||||
setTimeout(()=>{
|
|
||||||
uni.navigateBack()
|
|
||||||
},500)
|
|
||||||
//TODO handle the exception
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
function swiperChange({
|
||||||
|
current,
|
||||||
|
direction,
|
||||||
|
data
|
||||||
|
}) {
|
||||||
|
}
|
||||||
|
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
@ -28,6 +50,7 @@
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.min-page {
|
.min-page {
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
|
flex: 1;
|
||||||
background-color: #000;
|
background-color: #000;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<view>
|
<view class="u-p-60">
|
||||||
<up-button @click="toDetail">toDetail</up-button>
|
<up-button @click="toDetail">toDetail</up-button>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue