diff --git a/components/my-video-list/my-video-list.vue b/components/my-video-list/my-video-list.vue index e08a27a..13c1b46 100644 --- a/components/my-video-list/my-video-list.vue +++ b/components/my-video-list/my-video-list.vue @@ -339,6 +339,7 @@ // #ifdef H5 window.location.href = res.h5Url // #endif + popupClose() } } //金币支付 diff --git a/pages/video/detail.nvue b/pages/video/detail.nvue index 9fbd9ad..a087f23 100644 --- a/pages/video/detail.nvue +++ b/pages/video/detail.nvue @@ -1,7 +1,7 @@ @@ -12,14 +12,15 @@ } from '@dcloudio/uni-app' import * as Api from '@/api/video/index.js' import { - reactive, ref + reactive, + ref } from 'vue' import { slice } from 'lodash' - const boxStyle = { - height: '835px' - } + + const sysInfo = uni.getSystemInfoSync() + let isFirstLoad=true let options = {} const state = reactive({ collect: 0, @@ -28,10 +29,11 @@ price: 0, title: '' }) - const refVideoList=ref(null) + const refVideoList = ref(null) async function init() { try { const res = await Api.getVideoDetail(options) + isFirstLoad=false Object.assign(state, res) state.list = res.list } catch (error) { @@ -49,11 +51,10 @@ index, item }) { - if(item){ + if (item) { state.list[index] = item - }else{ + } else { await init() - refVideoList.value.videoListUpdata() } } onLoad((opt) => { @@ -67,8 +68,11 @@ data }) {} - onShow(() => { - init() + onShow(async () => { + if(!isFirstLoad){ + await init() + refVideoList.value.videoListUpdata() + } })