|
@@ -4,36 +4,34 @@
|
|
|
<router-view />
|
|
|
</KeepAlive> -->
|
|
|
<router-view v-slot="{ Component, route }">
|
|
|
- <Transition>
|
|
|
<keep-alive include="working">
|
|
|
<component v-if="!route.meta.link" :is="Component" :key="route.fullPath"/>
|
|
|
</keep-alive>
|
|
|
- </Transition>
|
|
|
-
|
|
|
</router-view>
|
|
|
|
|
|
</div>
|
|
|
- <van-tabbar v-model="tabType" v-if="routerName != '/main/processDtl'">
|
|
|
- <van-tabbar-item to="/main/message" :badge="msgCount">
|
|
|
+ <van-tabbar v-model="tabType" v-if="routerName != '/main/processDtl'" :style="isIos() ? 'height:65px' : ''">
|
|
|
+ <van-tabbar-item to="/main/message" :badge="msgCount" :style="isIos() ? 'padding-bottom:15px' : ''">
|
|
|
{{$t('common.message')}}
|
|
|
<template #icon="props">
|
|
|
<i class="icon iconfont icon-btn_shengc_gray1 footer-icon" :class="props.active ? 'footer-icon-active' : ''"></i>
|
|
|
</template>
|
|
|
</van-tabbar-item>
|
|
|
- <van-tabbar-item to="/main/working">
|
|
|
+ <van-tabbar-item to="/main/working" :style="isIos() ? 'padding-bottom:15px' : ''">
|
|
|
{{$t('common.workbench')}}
|
|
|
<template #icon="props">
|
|
|
<i class="icon iconfont icon-btn_gongz footer-icon" :class="props.active ? 'footer-icon-active' : ''"></i>
|
|
|
</template>
|
|
|
</van-tabbar-item>
|
|
|
<van-tabbar-item
|
|
|
+ :style="isIos() ? 'padding-bottom:15px' : ''"
|
|
|
:to="tenantId == 'smt' ? '/main/xiamenList' : '/main/equipment'"
|
|
|
>{{$t('common.things')}}
|
|
|
<template #icon="props">
|
|
|
<i class="icon iconfont icon-btn_wulw footer-icon" :class="props.active ? 'footer-icon-active' : ''"></i>
|
|
|
</template>
|
|
|
</van-tabbar-item>
|
|
|
- <van-tabbar-item icon="setting-o" to="/main/home">
|
|
|
+ <van-tabbar-item icon="setting-o" to="/main/home" :style="isIos() ? 'padding-bottom:15px' : ''">
|
|
|
{{$t('common.mine')}}
|
|
|
<template #icon="props">
|
|
|
<i class="icon iconfont icon-btn_mine footer-icon" :class="props.active ? 'footer-icon-active' : ''"></i>
|
|
@@ -58,7 +56,7 @@ const tabType = ref('home')
|
|
|
const msgCount = ref(0)
|
|
|
const socketInit = () => {
|
|
|
window.ws = new WebSocket(
|
|
|
- 'ws://'+ process.env.VUE_APP_IP +':20001'+ process.env.VUE_APP_WS_API +'/webStock/' +
|
|
|
+ 'ws://'+ process.env.VUE_APP_IP + process.env.VUE_APP_WS_API +'/webStock/' +
|
|
|
getToken()
|
|
|
// 'ws://192.168.1.97:8300/webStock/' + window.localStorage.getItem('token')
|
|
|
)
|
|
@@ -110,10 +108,19 @@ const socketInit = () => {
|
|
|
}
|
|
|
window.ws.onerror = function (e) {
|
|
|
//如果出现连接、处理、接收、发送数据失败的时候触发onerror事件
|
|
|
- console.log(error)
|
|
|
+ console.log(e)
|
|
|
}
|
|
|
}
|
|
|
socketInit()
|
|
|
+
|
|
|
+//判断是否是ios系统
|
|
|
+const isIos = () => {
|
|
|
+ const u = navigator.userAgent
|
|
|
+ const isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/) //ios终端
|
|
|
+ return isIOS
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
//判断是否为开发环境.如果是开发环境,则同步前后台中文配置表
|
|
|
// const isDev = process.env.NODE_ENV === 'development'
|
|
|
// if (isDev) {
|
|
@@ -165,12 +172,12 @@ watch(router.currentRoute, (to, from) => {
|
|
|
</script>
|
|
|
<style lang="scss">
|
|
|
.main {
|
|
|
- // position: fixed;
|
|
|
- // top: 0;
|
|
|
- // left: 0;
|
|
|
- // right: 0;
|
|
|
- // bottom: 50px;
|
|
|
- padding-bottom:50px;
|
|
|
+ position: absolute;
|
|
|
+ top: 0;
|
|
|
+ left: 0;
|
|
|
+ right: 0;
|
|
|
+ bottom: 0;
|
|
|
+ padding-bottom:0px;
|
|
|
overflow-y: auto;
|
|
|
z-index: 1000;
|
|
|
}
|
|
@@ -188,4 +195,9 @@ watch(router.currentRoute, (to, from) => {
|
|
|
.footer-icon-active{
|
|
|
color: #3E7BFA;
|
|
|
}
|
|
|
+</style>
|
|
|
+<style>
|
|
|
+.van-pull-refresh{
|
|
|
+ flex: 1;
|
|
|
+}
|
|
|
</style>
|