Commit 2d811a4d authored by 毛线's avatar 毛线

移动端键盘,save

parent 6eaaf7df
...@@ -75,8 +75,7 @@ export default { ...@@ -75,8 +75,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 < 750 || (isMobile && innerWidth < 750)) {
this.initMobileSceen() this.initMobileSceen()
this.isMoblie = true this.isMoblie = true
} else { } else {
...@@ -96,8 +95,8 @@ export default { ...@@ -96,8 +95,8 @@ export default {
this.marginSceen = false this.marginSceen = false
} }
this.SetZoom(zoom) this.SetZoom(zoom)
// this.SetInnerWidth(innerWidth) this.SetInnerWidth(innerWidth)
// this.SetInnerHeight(innerHeight) this.SetInnerHeight(innerHeight)
this.zoom = zoom this.zoom = zoom
this.isMoblie = false this.isMoblie = false
}, },
...@@ -130,7 +129,6 @@ export default { ...@@ -130,7 +129,6 @@ export default {
top: 0; top: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
min-width: 900px;
position: fixed; position: fixed;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
......
<template> <template>
<div class="option-block"> <div>
<div v-if="!is_mobile" class="option-block">
<div class="left-option"> <div class="left-option">
<img v-audio src="https://kuawai.s3.ap-east-1.amazonaws.com/resource/assets/Textures/mobileKeyboard/creditIn.png" alt="" class="credit-in btn" @click="creditInShow = true"> <img v-audio src="https://kuawai.s3.ap-east-1.amazonaws.com/resource/assets/Textures/mobileKeyboard/creditIn.png" alt="" class="credit-in btn" @click="creditInShow = true">
<img v-audio src="https://kuawai.s3.ap-east-1.amazonaws.com/resource/assets/Textures/second/ic_credit_01.png" alt="" class="credit-out btn" @click="network().outPoint()"> <img v-audio src="https://kuawai.s3.ap-east-1.amazonaws.com/resource/assets/Textures/second/ic_credit_01.png" alt="" class="credit-out btn" @click="network().outPoint()">
...@@ -71,9 +72,14 @@ ...@@ -71,9 +72,14 @@
</div> </div>
</div> </div>
</div> </div>
<div v-else>
移动端键盘
</div>
</div>
</template> </template>
<script> <script>
import { mapGetters, } from 'vuex'
export default { export default {
filters: { filters: {
autoTimeFilter(value) { autoTimeFilter(value) {
...@@ -111,6 +117,9 @@ export default { ...@@ -111,6 +117,9 @@ export default {
} }
}, },
computed: { computed: {
...mapGetters([
'is_mobile',
]),
btnList() { btnList() {
const btnList = this.deviceButtonPanel.keyMapping || [] const btnList = this.deviceButtonPanel.keyMapping || []
return btnList.filter(i => i.buttonImgN) return btnList.filter(i => i.buttonImgN)
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
<script> <script>
import Background from '@/components/common/bg/index' import Background from '@/components/common/bg/index'
import { mapActions, mapState, mapMutations, } from 'vuex' import { mapActions, mapState, mapMutations, mapGetters, } from 'vuex'
import WebRTCPlayer from './components/WebRTCPlayer' import WebRTCPlayer from './components/WebRTCPlayer'
import RightPlayer from './components/right-player' import RightPlayer from './components/right-player'
import Keyboard from './components/keyboard' import Keyboard from './components/keyboard'
...@@ -52,6 +52,9 @@ export default { ...@@ -52,6 +52,9 @@ export default {
'userInfo', 'userInfo',
'deviceList', 'deviceList',
]), ]),
...mapGetters([
'is_mobile',
]),
id() { id() {
return this.$route.query.id return this.$route.query.id
}, },
......
...@@ -35,6 +35,7 @@ export const state = () => ({ ...@@ -35,6 +35,7 @@ export const state = () => ({
token: getToken(), token: getToken(),
imToken: getImToken(), imToken: getImToken(),
zoom: 1, // 当前屏幕缩放比例 zoom: 1, // 当前屏幕缩放比例
isMoblie: false,
innerWidth: window.innerWidth, innerWidth: window.innerWidth,
innerHeight: window.innerHeight, innerHeight: window.innerHeight,
appConfig: { appConfig: {
...@@ -54,6 +55,15 @@ export const getters = { ...@@ -54,6 +55,15 @@ export const getters = {
is_admin(state) { // 是否超级管理员 is_admin(state) { // 是否超级管理员
return state.userInfo?.role_id === 1 return state.userInfo?.role_id === 1
}, },
is_mobile(state) {
let is_mobile = false
const { innerWidth, innerHeight, } = state
const minWidth = 400
if (innerWidth < minWidth || innerHeight < minWidth) {
is_mobile = true
}
return is_mobile
},
} }
export const mutations = { export const mutations = {
...@@ -165,9 +175,11 @@ export const mutations = { ...@@ -165,9 +175,11 @@ export const mutations = {
state.zoom = data state.zoom = data
}, },
SetInnerWidth(state, data) { SetInnerWidth(state, data) {
// console.log('SetInnerWidth', data)
state.innerWidth = data state.innerWidth = data
}, },
SetInnerHeight(state, data) { SetInnerHeight(state, data) {
// console.log('SetInnerHeight', data)
state.innerHeight = data state.innerHeight = data
}, },
} }
......
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