修复:内测问题修改

This commit is contained in:
2025-12-03 14:10:27 +08:00
parent 35e27753b8
commit 677fe7436e
19 changed files with 172 additions and 163 deletions

View File

@@ -3,7 +3,7 @@
<!-- 自定义导航栏 -->
<nav-bar :title="$t('news.newsDetail')" />
<web-view v-if="urlVisible" :webview-styles="{ progress: { color: '#55aaff' } }" :src="surl"></web-view>
<view v-if="urlVisible" class="web-view-container"><web-view :webview-styles="{ progress: { color: '#55aaff' } }" :src="surl"></web-view></view>
<view v-else class="box">
<view class="title">{{ news.title }}</view>
<view
@@ -32,28 +32,27 @@ onLoad((e: any) => {
source.value = e.source || ''
if(type.value == 1 && surl.value != ''){
urlVisible.value = true
// APP 设置导航栏按钮
// #ifdef APP-PLUS
const pages = getCurrentPages()
const page = pages[pages.length - 1]
const currentWebview = page.$getAppWebview()
currentWebview.setStyle({
titleNView: {
buttons: [{
float: 'right',
type: 'close',
onclick: () => {
uni.navigateBack({ delta: 1 })
}
}]
}
})
// #endif
} else {
getData()
}
// APP 设置导航栏按钮
// #ifdef APP-PLUS
// const pages = getCurrentPages()
// const page = pages[pages.length - 1]
// const currentWebview = page.$getAppWebview()
// currentWebview.setStyle({
// titleNView: {
// buttons: [{
// float: 'right',
// type: 'close',
// onclick: () => {
// uni.navigateBack({ delta: 1 })
// }
// }]
// }
// })
// #endif
})
// 新闻详情
@@ -102,6 +101,9 @@ const formattedContent = computed(() => formatRichText(news.value.content))
</script>
<style lang="scss" scoped>
.web-view-container {
padding-top: 60px;
}
.box {
background-color: #fff;
padding: 10px;