实名制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,12 +75,25 @@ 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)
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1,200 +1,221 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="page">
|
<view class="page">
|
||||||
<u-navbar class="u-navbar" title="作业计划与实名制管控情况" placeholder @leftClick="leftClick" leftIconColor="#fff" bgColor="#00337A" :titleStyle="{ color: '#FFF', fontSize: '32rpx' }"/>
|
<u-navbar class="u-navbar" title="作业计划与实名制管控情况" placeholder @leftClick="leftClick" leftIconColor="#fff" bgColor="#00337A" :titleStyle="{ color: '#FFF', fontSize: '32rpx' }"/>
|
||||||
<scroll-view class="scroll-view" scroll-x="true">
|
<scroll-view class="scroll-view" scroll-x="true">
|
||||||
<view class="scroll-view-item" :class="hIndex == 1 ? 'active' : ''" @click="hIndex = 1">
|
<view class="scroll-view-item" :class="hIndex == 1 ? 'active' : ''" @click="hIndex = 1">
|
||||||
分公司
|
分公司
|
||||||
<view class="activeLine" v-if="hIndex == 1"></view>
|
<view class="activeLine" v-if="hIndex == 1"></view>
|
||||||
</view>
|
</view>
|
||||||
<view class="scroll-view-item" :class="hIndex == 2 ? 'active' : ''" >
|
<view class="scroll-view-item" :class="hIndex == 2 ? 'active' : ''" >
|
||||||
项目
|
项目
|
||||||
<view class="activeLine" v-if="hIndex == 2"></view>
|
<view class="activeLine" v-if="hIndex == 2"></view>
|
||||||
</view>
|
</view>
|
||||||
<view class="scroll-view-item" :class="hIndex == 3 ? 'active' : ''" >
|
<view class="scroll-view-item" :class="hIndex == 3 ? 'active' : ''" >
|
||||||
分包合同
|
分包合同
|
||||||
<view class="activeLine" v-if="hIndex == 3"></view>
|
<view class="activeLine" v-if="hIndex == 3"></view>
|
||||||
</view>
|
</view>
|
||||||
<view class="scroll-view-item" :class="hIndex == 4 ? 'active' : ''" @click="hIndex = 4">
|
<view class="scroll-view-item" :class="hIndex == 4 ? 'active' : ''" @click="hIndex = 4">
|
||||||
分包商
|
分包商
|
||||||
<view class="activeLine" v-if="hIndex == 4"></view>
|
<view class="activeLine" v-if="hIndex == 4"></view>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
<view>
|
<view>
|
||||||
<web-view :src="webUrl1" v-if="hIndex==1" :fullscreen="false" :webview-styles="webviewStyles" @message="handleMessage1" style="overflow: auto;margin-top: 400rpx;"></web-view>
|
<web-view :src="webUrl1" v-if="hIndex==1" :fullscreen="false" :webview-styles="webviewStyles" @message="handleMessage1" style="overflow: auto;margin-top: 400rpx;"></web-view>
|
||||||
<web-view :src="webUrl2" v-if="hIndex==2" :fullscreen="false" :webview-styles="webviewStyles" @message="handleMessage2" style="overflow: auto;margin-top: 400rpx;"></web-view>
|
<web-view :src="webUrl2" v-if="hIndex==2" :fullscreen="false" :webview-styles="webviewStyles" @message="handleMessage2" style="overflow: auto;margin-top: 400rpx;"></web-view>
|
||||||
<web-view :src="webUrl3" v-if="hIndex==3" :fullscreen="false" :webview-styles="webviewStyles" style="overflow: auto;margin-top: 400rpx;"></web-view>
|
<web-view :src="webUrl3" v-if="hIndex==3" :fullscreen="false" :webview-styles="webviewStyles" style="overflow: auto;margin-top: 400rpx;"></web-view>
|
||||||
<web-view :src="webUrl4" v-if="hIndex==4" :fullscreen="false" :webview-styles="webviewStyles" style="overflow: auto;margin-top: 400rpx;"></web-view>
|
<web-view :src="webUrl4" v-if="hIndex==4" :fullscreen="false" :webview-styles="webviewStyles" style="overflow: auto;margin-top: 400rpx;"></web-view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<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>
|
|
||||||
import config from '@/config'
|
|
||||||
export default {
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
idNumber:uni.getStorageSync('realNameUser').idNumber,
|
|
||||||
hIndex:1,
|
|
||||||
webUrl1:"/hybrid/html/planAndRealName/planAndRealName.html",
|
|
||||||
webUrl2:"/hybrid/html/planAndRealName/planAndRealNameTwo.html",
|
|
||||||
webUrl3:"/hybrid/html/planAndRealName/planAndRealNameThree.html",
|
|
||||||
webUrl4:"/hybrid/html/planAndRealName/planAndRealNameFour.html",
|
|
||||||
webviewStyles: {
|
|
||||||
progress: false,
|
|
||||||
width:'92%',
|
|
||||||
height:'220',
|
|
||||||
zIndex:'999',
|
|
||||||
top:'140',
|
|
||||||
left:'10',
|
|
||||||
right:'10',
|
|
||||||
},
|
|
||||||
screenType:2, //1-横屏,2-竖屏
|
|
||||||
}
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
hIndex: function(newVal, oldVal) {
|
|
||||||
this.getScal()//开启缩放
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onLoad() {
|
|
||||||
},
|
|
||||||
onShow() {
|
|
||||||
//打开横屏
|
|
||||||
// #ifdef APP-PLUS
|
|
||||||
uni.showLoading({
|
|
||||||
title: "加载中..."
|
|
||||||
})
|
|
||||||
setTimeout(() => {
|
|
||||||
plus.screen.unlockOrientation();
|
|
||||||
plus.screen.lockOrientation('default');
|
|
||||||
uni.hideLoading();
|
|
||||||
}, 200)
|
|
||||||
//#endif
|
|
||||||
//开启缩放
|
|
||||||
this.getScal()
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import config from '@/config'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
idNumber:uni.getStorageSync('realNameUser').idNumber,
|
||||||
|
hIndex:1,
|
||||||
|
webUrl1:"/hybrid/html/planAndRealName/planAndRealName.html",
|
||||||
|
webUrl2:"/hybrid/html/planAndRealName/planAndRealNameTwo.html",
|
||||||
|
webUrl3:"/hybrid/html/planAndRealName/planAndRealNameThree.html",
|
||||||
|
webUrl4:"/hybrid/html/planAndRealName/planAndRealNameFour.html",
|
||||||
|
webviewStyles: {
|
||||||
|
progress: false,
|
||||||
|
width:'90%',
|
||||||
|
height:'240',
|
||||||
|
zIndex:'999',
|
||||||
|
top:'150',
|
||||||
|
left:'10',
|
||||||
|
right:'10',
|
||||||
|
},
|
||||||
|
screenType:2, //1-横屏,2-竖屏
|
||||||
|
}
|
||||||
},
|
},
|
||||||
onUnload() {
|
watch: {
|
||||||
// #ifdef APP-PLUS
|
hIndex: function(newVal, oldVal) {
|
||||||
plus.screen.lockOrientation('portrait-primary');
|
this.webviewStyles = {
|
||||||
// #endif
|
progress: false,
|
||||||
},
|
width:'90%',
|
||||||
methods: {
|
height:'240',
|
||||||
handleMessage1(e){
|
zIndex:'999',
|
||||||
console.log(e)
|
top:'150',
|
||||||
this.hIndex=2
|
left:'10',
|
||||||
},
|
right:'10',
|
||||||
handleMessage2(e){
|
|
||||||
// console.log(e)
|
|
||||||
this.hIndex=3
|
|
||||||
},
|
|
||||||
// 横屏
|
|
||||||
// this.lockOrientation('landscape')
|
|
||||||
// 竖屏
|
|
||||||
//this.lockOrientation('portrait')
|
|
||||||
lockOrientation(orientation) {
|
|
||||||
if(orientation=='landscape'){
|
|
||||||
this.screenType=1
|
|
||||||
}else if(orientation=='portrait'){
|
|
||||||
this.screenType=2
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (typeof plus !== 'undefined' && typeof plus.screen !== 'undefined') {
|
|
||||||
plus.screen.lockOrientation(orientation)
|
|
||||||
}
|
}
|
||||||
},
|
this.getScal()//开启缩放
|
||||||
getScal(){
|
}
|
||||||
// #ifdef APP-PLUS
|
},
|
||||||
const currentWebview = this.$scope.$getAppWebview() //获取当前页面的webview对象
|
onLoad() {
|
||||||
setTimeout(()=> {
|
},
|
||||||
let wv = currentWebview.children()[0]
|
onShow() {
|
||||||
wv.setStyle({scalable:true})
|
//打开横屏
|
||||||
}, 1000); //如果是页面初始化调用时,需要延时一下
|
// #ifdef APP-PLUS
|
||||||
// #endif
|
uni.showLoading({
|
||||||
},
|
title: "加载中..."
|
||||||
// 返回
|
})
|
||||||
leftClick() {
|
setTimeout(() => {
|
||||||
console.log('返回')
|
plus.screen.unlockOrientation();
|
||||||
uni.navigateBack({
|
plus.screen.lockOrientation('default');
|
||||||
delta: 1 // 返回
|
uni.hideLoading();
|
||||||
});
|
}, 200)
|
||||||
}
|
//#endif
|
||||||
},
|
//开启缩放
|
||||||
|
this.getScal()
|
||||||
|
|
||||||
}
|
},
|
||||||
</script>
|
onUnload() {
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
plus.screen.lockOrientation('portrait-primary');
|
||||||
|
// #endif
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleMessage1(e){
|
||||||
|
console.log(e)
|
||||||
|
this.hIndex=2
|
||||||
|
},
|
||||||
|
handleMessage2(e){
|
||||||
|
// console.log(e)
|
||||||
|
this.hIndex=3
|
||||||
|
},
|
||||||
|
// 横屏
|
||||||
|
// this.lockOrientation('landscape')
|
||||||
|
// 竖屏
|
||||||
|
//this.lockOrientation('portrait')
|
||||||
|
lockOrientation(orientation) {
|
||||||
|
if(orientation=='landscape'){
|
||||||
|
this.screenType=1
|
||||||
|
}else if(orientation=='portrait'){
|
||||||
|
this.screenType=2
|
||||||
|
|
||||||
<style lang="scss">
|
}
|
||||||
.scroll-view {
|
if (typeof plus !== 'undefined' && typeof plus.screen !== 'undefined') {
|
||||||
white-space: nowrap;
|
plus.screen.lockOrientation(orientation)
|
||||||
width: 100%;
|
}
|
||||||
background: #FFF;
|
this.webviewStyles = {
|
||||||
}
|
progress: false,
|
||||||
|
width:'90%',
|
||||||
|
height:'240',
|
||||||
|
zIndex:'999',
|
||||||
|
top:'150',
|
||||||
|
left:'10',
|
||||||
|
right:'10',
|
||||||
|
}
|
||||||
|
this.getScal()//开启缩放
|
||||||
|
},
|
||||||
|
getScal(){
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
const currentWebview = this.$scope.$getAppWebview() //获取当前页面的webview对象
|
||||||
|
setTimeout(()=> {
|
||||||
|
let wv = currentWebview.children()[0]
|
||||||
|
wv.setStyle({scalable:true})
|
||||||
|
}, 1000); //如果是页面初始化调用时,需要延时一下
|
||||||
|
// #endif
|
||||||
|
},
|
||||||
|
// 返回
|
||||||
|
leftClick() {
|
||||||
|
console.log('返回')
|
||||||
|
uni.navigateBack({
|
||||||
|
delta: 1 // 返回
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
.scroll-view-item {
|
}
|
||||||
display: inline-block;
|
</script>
|
||||||
width: 160rpx;
|
|
||||||
height: 100rpx;
|
|
||||||
line-height: 100rpx;
|
|
||||||
text-align: center;
|
|
||||||
|
|
||||||
.activeLine{
|
<style lang="scss">
|
||||||
background: #00337A;
|
.scroll-view {
|
||||||
border-radius: 10upx;
|
white-space: nowrap;
|
||||||
width: 160rpx;
|
width: 100%;
|
||||||
height: 6upx;
|
background: #FFF;
|
||||||
}
|
position: absolute;
|
||||||
}
|
top: 160rpx;
|
||||||
.active {
|
}
|
||||||
color: #333;
|
|
||||||
font-weight: bolder;
|
|
||||||
font-size: 32rpx;
|
|
||||||
}
|
|
||||||
.page {
|
|
||||||
width: 100vw;
|
|
||||||
height:100vh;
|
|
||||||
background-color: #EFEFEF;
|
|
||||||
box-sizing: border-box;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
.content{
|
.scroll-view-item {
|
||||||
width: 100%;
|
display: inline-block;
|
||||||
height: 80vh;
|
width: 160rpx;
|
||||||
padding-top: 20rpx;
|
height: 100rpx;
|
||||||
background: #EFEFEF;
|
line-height: 100rpx;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
.view-box{
|
.activeLine{
|
||||||
width: 96%;
|
background: #00337A;
|
||||||
height: auto;
|
border-radius: 10upx;
|
||||||
margin: 0rpx auto;
|
width: 160rpx;
|
||||||
background-color: #FFF;
|
height: 6upx;
|
||||||
border-radius: 10rpx;
|
}
|
||||||
padding-top: 20rpx;
|
}
|
||||||
.title-view{
|
.active {
|
||||||
font-size: 32rpx;
|
color: #333;
|
||||||
font-weight: 600;
|
font-weight: bolder;
|
||||||
margin-left: 20rpx;
|
font-size: 32rpx;
|
||||||
}
|
}
|
||||||
|
.page {
|
||||||
|
width: 100vw;
|
||||||
|
height:100vh;
|
||||||
|
background-color: #EFEFEF;
|
||||||
|
box-sizing: border-box;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
}
|
.content{
|
||||||
}
|
width: 100%;
|
||||||
|
height: 80vh;
|
||||||
|
padding-top: 20rpx;
|
||||||
|
background: #EFEFEF;
|
||||||
|
|
||||||
|
.view-box{
|
||||||
|
width: 96%;
|
||||||
|
height: auto;
|
||||||
|
margin: 0rpx auto;
|
||||||
|
background-color: #FFF;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
padding-top: 20rpx;
|
||||||
|
.title-view{
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: 600;
|
||||||
|
margin-left: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.screen-btn{
|
||||||
|
width: 100rpx;
|
||||||
|
height: 60rpx;
|
||||||
|
line-height: 60rpx;
|
||||||
|
background: #00337A;
|
||||||
|
color: #fff;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
text-align: center;
|
||||||
|
position: fixed;
|
||||||
|
bottom: 20rpx;
|
||||||
|
right: 20rpx;
|
||||||
|
z-index: 999999;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
.screen-btn{
|
|
||||||
width: 100rpx;
|
|
||||||
height: 60rpx;
|
|
||||||
line-height: 60rpx;
|
|
||||||
background: #00337A;
|
|
||||||
color: #fff;
|
|
||||||
border-radius: 10rpx;
|
|
||||||
text-align: center;
|
|
||||||
position: fixed;
|
|
||||||
bottom: 20rpx;
|
|
||||||
right: 20rpx;
|
|
||||||
z-index: 999999;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue