在路由跳转前添加日志输出,更新协议页面以支持新的PDF URL,优化协议列表的显示逻辑,调整条件判断以触发PDF获取

This commit is contained in:
Phoenix 2025-05-06 11:50:06 +08:00
parent a92eae32e5
commit 7dd937782b
3 changed files with 10 additions and 4 deletions

View File

@ -93,7 +93,7 @@ export async function orderQuery(data) {
method: 'POST', method: 'POST',
data data
}) })
} }
export async function contractView(data) { export async function contractView(data) {
return await request( { return await request( {

View File

@ -24,6 +24,8 @@ router.beforeEach((to, from) => {
if (to.path==='/'){ if (to.path==='/'){
hideMinWindow1() hideMinWindow1()
} }
console.log('路由跳转前', to.path)
// //
if (routeHistory.value.includes(to.path)) { if (routeHistory.value.includes(to.path)) {
slideDirection.value = 'slide-right' slideDirection.value = 'slide-right'

View File

@ -20,11 +20,13 @@ const router = useRouter()
const pmblUrl = ref('') // URL const pmblUrl = ref('') // URL
const jmxyUrl=ref('')// const jmxyUrl=ref('')//
const pmyjqrsUrl=ref('')// const pmyjqrsUrl=ref('')//
const jmxzUrl=ref('')
const pmggUrl=ref('')
// //
const protocolList = computed(() => [ const protocolList = computed(() => [
{ id: '1', title: $t('signature.agreement.notice'), pdfName: 'pmgg', type: 'local' }, { id: '1', title: $t('signature.agreement.notice'), pdfName: pmggUrl.value, type: 'remote' },
{ id: '2', title: $t('signature.agreement.rules'), pdfName: 'pmgz', type: 'local' }, { id: '2', title: $t('signature.agreement.rules'), pdfName: 'pmgz', type: 'local' },
{ id: '3', title: $t('signature.agreement.buyerGuide'), pdfName: 'jmxz', type: 'local' }, { id: '3', title: $t('signature.agreement.buyerGuide'), pdfName: jmxzUrl.value, type: 'remote' },
{ id: '4', title: $t('signature.agreement.buyerAgreement'), pdfName: jmxyUrl.value, type: 'remote' }, { id: '4', title: $t('signature.agreement.buyerAgreement'), pdfName: jmxyUrl.value, type: 'remote' },
{ id: '5', title: $t('signature.agreement.record'), pdfName: pmblUrl.value, type: 'remote' }, { id: '5', title: $t('signature.agreement.record'), pdfName: pmblUrl.value, type: 'remote' },
{ id: '6', title: $t('signature.agreement.transfer'), pdfName: pmyjqrsUrl.value, type: 'remote' } { id: '6', title: $t('signature.agreement.transfer'), pdfName: pmyjqrsUrl.value, type: 'remote' }
@ -43,6 +45,8 @@ const fetchPmblPdf = async () => {
jmxyUrl.value=res.data.ViewUrls?.jmxy1 jmxyUrl.value=res.data.ViewUrls?.jmxy1
pmblUrl.value=res.data.ViewUrls?.ppbl6 pmblUrl.value=res.data.ViewUrls?.ppbl6
pmyjqrsUrl.value=res.data.ViewUrls?.ppqr5 pmyjqrsUrl.value=res.data.ViewUrls?.ppqr5
jmxzUrl.value=res.data.ViewUrls?.jmxz2
pmggUrl.value=res.data.ViewUrls?.pmgg3
} }
} catch (error) { } catch (error) {
} }
@ -51,7 +55,7 @@ const fetchPmblPdf = async () => {
// //
const handleCollapseChange = (name) => { const handleCollapseChange = (name) => {
activeNames.value = name activeNames.value = name
if (['4','5','6'].includes(name) && !protocolList.value.find(x=>x.id===name)?.pdfName) { if (['1','3','4','5','6'].includes(name) && !protocolList.value.find(x=>x.id===name)?.pdfName) {
fetchPmblPdf() fetchPmblPdf()
} }
} }