实名制IOS禅道bug修改

This commit is contained in:
zzyuan 2024-12-09 17:28:12 +08:00
parent f6a39e5a6b
commit f7d8c16322
4 changed files with 243 additions and 210 deletions

View File

@ -1,6 +1,6 @@
<template>
<view class="content">
<web-view :src="url" @message="handlePostMessage" :webview-styles="webviewStyles1" style="margin-bottom: 200rpx;"></web-view>
<web-view :src="viewerUrlWithParams" @message="handlePostMessage" :webview-styles="webviewStyles1" style="margin-bottom: 200rpx;"></web-view>
</view>
</template>
@ -36,9 +36,10 @@ export default {
left:'10',
right:'10',
},
localPath:'',
viewerUrlWithParams:''
}
},
onLoad(options) {
// console.log('', options)
// this.fileUrl = options.url
@ -49,14 +50,14 @@ export default {
// /* */
// this.pageInt() //pdfs
},
mounted() {
console.log('mounted-pdfView', this.path)
this.localPath = this.path
/* H5页面通信方式 */
// #ifdef H5
window.addEventListener('message', this.ReceiveMessage)
// #endif
this.fileUrl = this.path
this.fileUrl = this.localPath
/* 设置标题 */
uni.setNavigationBarTitle({
title: 'PDF预览'
@ -64,7 +65,6 @@ export default {
/* 初始页面 */
this.pageInt() //pdfs
},
//
beforeDestroy() {
uni.removeStorage({
@ -75,11 +75,24 @@ export default {
}
})
},
methods: {
//
pageInt() {
console.log(this.viewerUrlWithParams)
// #ifdef H5
this.url = `${this.viewerUrl}?file=${encodeURIComponent(this.fileUrl)}&page=`+this.currentPage
console.log(this.viewerUrlWithParams)
// #endif
// #ifdef APP-PLUS
if(plus.os.name=="Android"){
this.viewerUrlWithParams = `${this.viewerUrl}?file=${encodeURIComponent(this.fileUrl)}&page=`+this.currentPage
console.log(this.viewerUrlWithParams)
}else{
this.viewerUrlWithParams = this.fileUrl
console.log(this.viewerUrlWithParams)
}
// #endif
console.log(this.viewerUrlWithParams)
},
/*
* 做成监听滚动条判断更好

View File

@ -5,7 +5,7 @@
<view style="margin: 20rpx;font-weight: bold;">
合同视频
</view>
<video :src="videoSrc" controls :autoplay="autoPlay" style="width: 100%;height: 600rpx;" v-if="!showPopup"></video>
<video :src="videoSrc" controls="false" :autoplay="autoPlay" style="width: 100%;height: 600rpx;" v-if="!showPopup"></video>
<view style="margin: 20rpx;font-weight: bold;color: red;">
确认视频无误进行下一步签订

View File

@ -53,7 +53,7 @@
考试
</view>
<view class="exam-view">
<view class="exam-item" v-if="examBean.name">
<view class="exam-item" v-if="examBean.name&&examBean.name!=''">
<view style="width: 62%;display: flex;align-items: center;word-break: break-all;">
<view style="margin-right: 20rpx;">
<image src="../../../../static/realName/exam_icon.png" style="width: 48rpx;height: 48rpx;" mode="" ></image>
@ -168,9 +168,8 @@ export default {
console.log(res)
res = res.data;
if(res.code==200){
this.trainBean=res.data.trainBean;
this.examBean=res.data.examBean;
this.trainBean=res.data.trainBean||[];
this.examBean=res.data.examBean||{};
}
console.log(this.examBean)
},

View File

@ -44,10 +44,10 @@ export default {
webUrl4:"/hybrid/html/planAndRealName/planAndRealNameFour.html",
webviewStyles: {
progress: false,
width:'92%',
height:'220',
width:'90%',
height:'240',
zIndex:'999',
top:'140',
top:'150',
left:'10',
right:'10',
},
@ -56,6 +56,15 @@ export default {
},
watch: {
hIndex: function(newVal, oldVal) {
this.webviewStyles = {
progress: false,
width:'90%',
height:'240',
zIndex:'999',
top:'150',
left:'10',
right:'10',
}
this.getScal()//
}
},
@ -100,12 +109,21 @@ export default {
this.screenType=1
}else if(orientation=='portrait'){
this.screenType=2
}
if (typeof plus !== 'undefined' && typeof plus.screen !== 'undefined') {
plus.screen.lockOrientation(orientation)
}
this.webviewStyles = {
progress: false,
width:'90%',
height:'240',
zIndex:'999',
top:'150',
left:'10',
right:'10',
}
this.getScal()//
},
getScal(){
// #ifdef APP-PLUS
@ -133,6 +151,8 @@ export default {
white-space: nowrap;
width: 100%;
background: #FFF;
position: absolute;
top: 160rpx;
}
.scroll-view-item {
@ -198,3 +218,4 @@ export default {
}
}
</style>