提交 3eb3ec30 authored 作者: lihuihui's avatar lihuihui

update: 优化移动端

上级 ef2b6d37
...@@ -128,14 +128,15 @@ export default { ...@@ -128,14 +128,15 @@ export default {
} }
const wrapper = this.$refs.wrapper const wrapper = this.$refs.wrapper
new BScroll(wrapper, { click: true }) new BScroll(wrapper, { click: true })
this.initBscroll() this.initBscroll(200)
}, },
methods: { methods: {
initBscroll() { // 初始化bscroll插件
initBscroll(s = 1000) {
setTimeout(() => { setTimeout(() => {
const wrapper2 = this.$refs.wrapper2 const wrapper2 = this.$refs.wrapper2
new BScroll(wrapper2, { click: true, bounce: false, startY: 0 }) new BScroll(wrapper2, { click: true, bounce: false, startY: 0 })
}, 1000) }, s)
}, },
sendExamInfo(status) { sendExamInfo(status) {
const param = { const param = {
...@@ -176,9 +177,6 @@ export default { ...@@ -176,9 +177,6 @@ export default {
}) })
} }
}) })
// if (!this.isExamEnd) {
// this.endExamRequest(1)
// }
} else { } else {
const count = parseInt(this.questionParams.question.total_question_count) - parseInt(this.countAnswer()) const count = parseInt(this.questionParams.question.total_question_count) - parseInt(this.countAnswer())
if (count === 0) { if (count === 0) {
...@@ -353,7 +351,6 @@ export default { ...@@ -353,7 +351,6 @@ export default {
// background: #f9f9f9; // background: #f9f9f9;
.head { .head {
width: 100%; width: 100%;
height: 80px;
background: #ffffff; background: #ffffff;
display: flex; display: flex;
.title { .title {
...@@ -361,7 +358,7 @@ export default { ...@@ -361,7 +358,7 @@ export default {
font-size: 24px; font-size: 24px;
font-weight: bold; font-weight: bold;
color: #222222; color: #222222;
line-height: 80px; line-height: 60px;
} }
.right { .right {
position: relative; position: relative;
......
...@@ -76,7 +76,9 @@ export default { ...@@ -76,7 +76,9 @@ export default {
methods: { methods: {
tipsMobileAngle() { tipsMobileAngle() {
if (this.isMobile()) { if (this.isMobile()) {
if (window.orientation === 180 || window.orientation === 0) { const winWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth || 0
const winHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight || 0
if (winHeight > winWidth) {
console.log(1) console.log(1)
this.$message({ this.$message({
message: '请横屏预览', message: '请横屏预览',
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论