Commit a22c0d4d authored by 毛线's avatar 毛线

移动端适配调整

parent 7194b290
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<img v-if="tabIndex === index" class="tab-img" src="https://kuawai.s3.ap-east-1.amazonaws.com/resource/assets/Textures/second/Rounded%20Rectangle%2019.png" alt=""> <img v-if="tabIndex === index" class="tab-img" src="https://kuawai.s3.ap-east-1.amazonaws.com/resource/assets/Textures/second/Rounded%20Rectangle%2019.png" alt="">
<img v-else class="tab-img" src="https://kuawai.s3.ap-east-1.amazonaws.com/resource/assets/Textures/second/last_game%20%E6%8B%B7%E8%B4%9D%202.png" alt=""> <img v-else class="tab-img" src="https://kuawai.s3.ap-east-1.amazonaws.com/resource/assets/Textures/second/last_game%20%E6%8B%B7%E8%B4%9D%202.png" alt="">
<div class="text">{{ text }}</div> <div class="text">{{ text }}</div>
<div v-if="index === 0" class="version">{{ `1.0.040` }}</div> <div v-if="index === 0" class="version">{{ `1.0.041` }}</div>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -29,17 +29,15 @@ export default { ...@@ -29,17 +29,15 @@ export default {
computed: { computed: {
style() { style() {
const style = {} const style = {}
const { zoom, isMoblie, marginSceen, top, } = this const { zoom, isMoblie, marginSceen, top, left, } = this
style.zoom = zoom style.zoom = zoom
// 移动端旋转效果 // 移动端旋转效果
if (isMoblie) { if (isMoblie) {
if (!marginSceen) { if (!marginSceen) {
style.transform = `rotate(90deg) scale(1.72)` style.transform = `matrix(0, -1, 1, 0, ${top - 244}, 236)`
style.bottom = `246px`
} else { } else {
// style.transformOrigin = `0px 0px 0px`
// style.transform = `matrix(0, 0, 0, 0, 0, 0)`
// style.transform = `matrix(0, 1, -1, 0, ${608 + top}, 0)`
style.transform = `matrix(0, -1, 1, 0, ${top - 244}, 236)` style.transform = `matrix(0, -1, 1, 0, ${top - 244}, 236)`
} }
} }
...@@ -90,7 +88,7 @@ export default { ...@@ -90,7 +88,7 @@ export default {
if (process.env.NODE_ENV === 'development') { if (process.env.NODE_ENV === 'development') {
// return // return
} }
if ((innerWidth < 750 && innerWidth < innerHeight) || (isMobile && innerWidth < innerHeight)) { if ((innerWidth < 1000 && innerWidth < innerHeight) || (isMobile && innerWidth < innerHeight)) {
this.initMobileSceen() this.initMobileSceen()
this.isMoblie = true this.isMoblie = true
} else { } else {
...@@ -120,16 +118,22 @@ export default { ...@@ -120,16 +118,22 @@ export default {
let zoom = 1 let zoom = 1
const { innerWidth, innerHeight } = window const { innerWidth, innerHeight } = window
if (innerHeight / innerWidth > 1080 / 608) { if (innerHeight / innerWidth > 1080 / 608) {
zoom = window.innerWidth / 1080 console.log('test1')
zoom = window.innerWidth / 608
this.SetZoom(zoom) this.SetZoom(zoom)
this.zoom = zoom this.zoom = zoom
this.marginSceen = false this.marginSceen = false
const left = (innerHeight - (1080 / 608) * innerWidth) * 2
this.left = left
console.log('this.top', this.top)
} else { } else {
console.log('test2')
zoom = window.innerHeight / 1080 zoom = window.innerHeight / 1080
this.SetZoom(zoom) this.SetZoom(zoom)
this.zoom = zoom this.zoom = zoom
this.marginSceen = true this.marginSceen = true
const top = (innerWidth - (608 / 1080) * innerHeight) const top = (innerWidth - (608 / 1080) * innerHeight) / 2
this.top = top this.top = top
} }
this.isMoblie = true this.isMoblie = true
......
...@@ -14,8 +14,8 @@ export default { ...@@ -14,8 +14,8 @@ export default {
title: process.env.project_name || '', title: process.env.project_name || '',
meta: [ meta: [
{ charset: 'utf-8' }, { charset: 'utf-8' },
// { name: 'viewport', content: 'width=device-width, initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no' }, { name: 'viewport', content: 'width=device-width, initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no' },
{ name: 'viewport', content: 'user-scalable=no' }, // { name: 'viewport', content: 'user-scalable=no' },
{ hid: 'description', name: 'description', content: process.env.project_description || '' } { hid: 'description', name: 'description', content: process.env.project_description || '' }
], ],
link: [ link: [
......
...@@ -63,7 +63,7 @@ export const getters = { ...@@ -63,7 +63,7 @@ export const getters = {
is_mobile(state) { is_mobile(state) {
let is_mobile = false let is_mobile = false
const { innerWidth, innerHeight, } = state const { innerWidth, innerHeight, } = state
const minWidth = 450 const minWidth = 1000
if (innerWidth < minWidth || innerHeight < minWidth) { if (innerWidth < minWidth || innerHeight < minWidth) {
is_mobile = true is_mobile = true
} }
......
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