实名制IOS禅道bug修改
This commit is contained in:
parent
f6a39e5a6b
commit
f7d8c16322
|
|
@ -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() {
|
||||||
this.url = `${this.viewerUrl}?file=${encodeURIComponent(this.fileUrl)}&page=` + this.currentPage
|
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)
|
||||||
},
|
},
|
||||||
/*
|
/*
|
||||||
* 做成监听滚动条判断更好
|
* 做成监听滚动条判断更好
|
||||||
|
|
|
||||||
|
|
@ -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;">
|
||||||
确认视频无误,进行下一步签订
|
确认视频无误,进行下一步签订
|
||||||
|
|
|
||||||
|
|
@ -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)
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -29,11 +29,11 @@
|
||||||
<view class="screen-btn" v-if="screenType==2" @click="lockOrientation('landscape')">横屏</view>
|
<view class="screen-btn" v-if="screenType==2" @click="lockOrientation('landscape')">横屏</view>
|
||||||
<view class="screen-btn" v-if="screenType==1" @click="lockOrientation('portrait')">竖屏</view>
|
<view class="screen-btn" v-if="screenType==1" @click="lockOrientation('portrait')">竖屏</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import config from '@/config'
|
import config from '@/config'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
idNumber:uni.getStorageSync('realNameUser').idNumber,
|
idNumber:uni.getStorageSync('realNameUser').idNumber,
|
||||||
|
|
@ -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
|
||||||
|
|
@ -125,17 +143,19 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.scroll-view {
|
.scroll-view {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background: #FFF;
|
background: #FFF;
|
||||||
}
|
position: absolute;
|
||||||
|
top: 160rpx;
|
||||||
|
}
|
||||||
|
|
||||||
.scroll-view-item {
|
.scroll-view-item {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 160rpx;
|
width: 160rpx;
|
||||||
height: 100rpx;
|
height: 100rpx;
|
||||||
|
|
@ -148,13 +168,13 @@ export default {
|
||||||
width: 160rpx;
|
width: 160rpx;
|
||||||
height: 6upx;
|
height: 6upx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.active {
|
.active {
|
||||||
color: #333;
|
color: #333;
|
||||||
font-weight: bolder;
|
font-weight: bolder;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
}
|
}
|
||||||
.page {
|
.page {
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
height:100vh;
|
height:100vh;
|
||||||
background-color: #EFEFEF;
|
background-color: #EFEFEF;
|
||||||
|
|
@ -196,5 +216,6 @@ export default {
|
||||||
right: 20rpx;
|
right: 20rpx;
|
||||||
z-index: 999999;
|
z-index: 999999;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
Loading…
Reference in New Issue