From df3bc23cfca40551a2deeb5a58b88e3132725d11 Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Thu, 9 Jan 2025 17:57:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=94=99=E8=AF=AF=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/video/detail.nvue | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/pages/video/detail.nvue b/pages/video/detail.nvue index 8d43df7..2bff792 100644 --- a/pages/video/detail.nvue +++ b/pages/video/detail.nvue @@ -30,9 +30,19 @@ title: '' }) async function init() { - const res = await Api.getVideoDetail(options) - Object.assign(state, res) - state.list = res.list + try { + const res = await Api.getVideoDetail(options) + Object.assign(state, res) + state.list = res.list + } catch (error) { + // if(getCurrentPages().length>=2){ + // uni.navigateBack() + // }else{ + // uni.switchTab({ + // url:'/pages/index/index' + // }) + // } + } } function update({index,item}){ state.list[index]=item