实名制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> <template>
<view class="content"> <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> </view>
</template> </template>
@ -36,9 +36,10 @@ export default {
left:'10', left:'10',
right:'10', right:'10',
}, },
localPath:'',
viewerUrlWithParams:''
} }
}, },
onLoad(options) { onLoad(options) {
// console.log('', options) // console.log('', options)
// this.fileUrl = options.url // this.fileUrl = options.url
@ -49,14 +50,14 @@ export default {
// /* */ // /* */
// this.pageInt() //pdfs // this.pageInt() //pdfs
}, },
mounted() { mounted() {
console.log('mounted-pdfView', this.path) console.log('mounted-pdfView', this.path)
this.localPath = this.path
/* H5页面通信方式 */ /* H5页面通信方式 */
// #ifdef H5 // #ifdef H5
window.addEventListener('message', this.ReceiveMessage) window.addEventListener('message', this.ReceiveMessage)
// #endif // #endif
this.fileUrl = this.path this.fileUrl = this.localPath
/* 设置标题 */ /* 设置标题 */
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: 'PDF预览' title: 'PDF预览'
@ -64,7 +65,6 @@ export default {
/* 初始页面 */ /* 初始页面 */
this.pageInt() //pdfs this.pageInt() //pdfs
}, },
// //
beforeDestroy() { beforeDestroy() {
uni.removeStorage({ uni.removeStorage({
@ -75,11 +75,24 @@ export default {
} }
}) })
}, },
methods: { methods: {
// //
pageInt() { pageInt() {
console.log(this.viewerUrlWithParams)
// #ifdef H5
this.url = `${this.viewerUrl}?file=${encodeURIComponent(this.fileUrl)}&page=`+this.currentPage 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 style="margin: 20rpx;font-weight: bold;">
合同视频 合同视频
</view> </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 style="margin: 20rpx;font-weight: bold;color: red;">
确认视频无误进行下一步签订 确认视频无误进行下一步签订

View File

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

View File

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