1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- <template>
- <div class="main">
- <div class="footer">
- <van-tabbar v-model="tabType">
- <van-tabbar-item icon="home-o" to="/main/message">消息</van-tabbar-item>
- <van-tabbar-item icon="search" to="/main/working">工作台</van-tabbar-item>
- <van-tabbar-item
- icon="friends-o"
- :to="tenantId == 'xmhjc' ? '/main/xiamenList' : '/main/equipment'"
- >物联网</van-tabbar-item>
- <van-tabbar-item
- icon="setting-o"
- to="/main/home"
- >我的</van-tabbar-item>
- </van-tabbar>
- </div>
- </div>
- <router-view/>
- </template>
- <script setup>
- import { ref, getCurrentInstance } from 'vue'
- import { getUserInfo } from '@/utils/auth';
- import {lang} from '@/lang/cn'
- import '@/assets/icon/iconfont.css'
- import 'vant/lib/index.css';
- import axios from 'axios'
- const tenantId = getUserInfo().tenantId
- const proxy = getCurrentInstance().proxy
- const tabType = ref('home')
- //判断是否为开发环境.如果是开发环境,则同步前后台中文配置表
- const isDev = process.env.NODE_ENV === 'development'
- if(isDev) {
-
- let networkLang = window.localStorage.getItem('lang')
- if(networkLang || networkLang != JSON.stringify(lang)){
- try {
- networkLang = JSON.parse(networkLang)
- networkLang.app.cn = lang
- proxy.post('/open/multilingual/setJson',{configValue:JSON.stringify(networkLang)}).then(res=>{
- console.log(res)
- })
- } catch (error) {
-
- }
- }
-
- }
- </script>
|