Commit fc60b025 authored by yun's avatar yun

全屏试验

parent 110aa1df
...@@ -172,35 +172,13 @@ export default { ...@@ -172,35 +172,13 @@ export default {
} }
// $('.pdf-container').css('transform', 'rotate(90deg)') // $('.pdf-container').css('transform', 'rotate(90deg)')
} else { } else {
if (getSystem() === 'android') { this.exitFullScreen('.pdf-container')
this.$wnsdk.device.setOrientation({type: 1,
success(res) {
that.exitFullScreen('.pdf-container')
},
error(err) {
console.log(err)
}})
} else {
this.exitFullScreen('.pdf-container')
}
// $('.pdf-container').css('transform', 'rotate(-90deg)') // $('.pdf-container').css('transform', 'rotate(-90deg)')
} }
}, },
backToSmall() { backToSmall() {
const that = this
if (this.fullState) { if (this.fullState) {
if (getSystem() === 'android') { this.exitFullScreen('.pdf-container')
this.$wnsdk.device.setOrientation({type: 4,
success(res) {
that.exitFullScreen('.pdf-container')
console.log(res)
},
error(err) {
console.log(err)
}})
} else {
this.exitFullScreen('.pdf-container')
}
} }
}, },
exitFullScreen(location) { exitFullScreen(location) {
...@@ -214,6 +192,15 @@ export default { ...@@ -214,6 +192,15 @@ export default {
document.webkitExitFullscreen() document.webkitExitFullscreen()
} }
$(location).height('211px') $(location).height('211px')
if (getSystem() === 'android') {
this.$wnsdk.device.setOrientation({type: 1,
success(res) {
console.log(res)
},
error(err) {
console.log(err)
}})
}
}, },
beFullScreen(location) { beFullScreen(location) {
const element = document.getElementsByClassName(location)[0] const element = document.getElementsByClassName(location)[0]
......
...@@ -172,38 +172,13 @@ export default { ...@@ -172,38 +172,13 @@ export default {
} }
// $('.pdf-container').css('transform', 'rotate(90deg)') // $('.pdf-container').css('transform', 'rotate(90deg)')
} else { } else {
if (getSystem() === 'android') { that.exitFullScreen('.pdf-container')
this.$wnsdk.device.setOrientation({type: 1,
success(res) {
that.exitFullScreen('.pdf-container')
that.exitFullScreen('.pdf-container')
console.log(res)
},
error(err) {
console.log(err)
}})
} else {
this.exitFullScreen('.pdf-container')
}
// $('.pdf-container').css('transform', 'rotate(-90deg)') // $('.pdf-container').css('transform', 'rotate(-90deg)')
} }
}, },
backToSmall() { backToSmall() {
const that = this
if (this.fullState) { if (this.fullState) {
if (getSystem() === 'android') { this.exitFullScreen('.pdf-container')
this.$wnsdk.device.setOrientation({type: 4,
success(res) {
that.exitFullScreen('.pdf-container')
that.exitFullScreen('.pdf-container')
console.log(res)
},
error(err) {
console.log(err)
}})
} else {
this.exitFullScreen('.pdf-container')
}
} }
}, },
pdfClick() { pdfClick() {
...@@ -216,6 +191,7 @@ export default { ...@@ -216,6 +191,7 @@ export default {
} }
}, },
exitFullScreen(location) { exitFullScreen(location) {
$(location).height('211px')
if (document.exitFullscreen) { if (document.exitFullscreen) {
document.exitFullscreen() document.exitFullscreen()
} else if (document.msExitFullscreen) { } else if (document.msExitFullscreen) {
...@@ -225,7 +201,15 @@ export default { ...@@ -225,7 +201,15 @@ export default {
} else if (document.webkitExitFullscreen) { } else if (document.webkitExitFullscreen) {
document.webkitExitFullscreen() document.webkitExitFullscreen()
} }
$(location).height('211px') if (getSystem() === 'android') {
this.$wnsdk.device.setOrientation({type: 1,
success(res) {
console.log(res)
},
error(err) {
console.log(err)
}})
}
}, },
beFullScreen(location) { beFullScreen(location) {
const element = document.getElementsByClassName(location)[0] const element = document.getElementsByClassName(location)[0]
......
...@@ -171,38 +171,13 @@ export default { ...@@ -171,38 +171,13 @@ export default {
this.beFullScreen('pdf-container') this.beFullScreen('pdf-container')
} }
} else { } else {
if (getSystem() === 'android') { this.exitFullScreen('.pdf-container')
this.$wnsdk.device.setOrientation({type: 1,
success(res) {
that.exitFullScreen('.pdf-container')
console.log(res)
},
error(err) {
console.log(err)
}})
} else {
this.exitFullScreen('.pdf-container')
}
// $('.pdf-container').css('transform', 'rotate(-90deg)') // $('.pdf-container').css('transform', 'rotate(-90deg)')
} }
}, },
backToSmall() { backToSmall() {
const that = this
if (this.fullState) { if (this.fullState) {
if (this.fullState) { this.exitFullScreen('.pdf-container')
if (getSystem() === 'android') {
this.$wnsdk.device.setOrientation({type: 4,
success(res) {
that.exitFullScreen('.pdf-container')
console.log(res)
},
error(err) {
console.log(err)
}})
} else {
this.exitFullScreen('.pdf-container')
}
}
} }
}, },
pdfClick() { pdfClick() {
...@@ -225,6 +200,15 @@ export default { ...@@ -225,6 +200,15 @@ export default {
document.webkitExitFullscreen() document.webkitExitFullscreen()
} }
$(location).height('211px') $(location).height('211px')
if (getSystem() === 'android') {
this.$wnsdk.device.setOrientation({type: 1,
success(res) {
console.log(res)
},
error(err) {
console.log(err)
}})
}
}, },
beFullScreen(location) { beFullScreen(location) {
const element = document.getElementsByClassName(location)[0] const element = document.getElementsByClassName(location)[0]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment