no message
This commit is contained in:
@@ -96,8 +96,9 @@
|
||||
<script>
|
||||
import jxTime from '@components/time.vue'
|
||||
import jxDialog from '@components/dialog.vue'
|
||||
import { queryHead } from '@/config/getData2.js'
|
||||
// import { queryHead } from '@/config/getData2.js'
|
||||
import { updatePass, sysMenuBuild, authLogout } from '@config/getData2.js'
|
||||
import { sendWebsocket, closeWebsocket } from '@/config/websocket.js'
|
||||
import {encrypt} from '../../../main.js'
|
||||
export default {
|
||||
components: {
|
||||
@@ -245,9 +246,9 @@ export default {
|
||||
created () {
|
||||
this._sysMenuBuild()
|
||||
this._queryHead()
|
||||
this.timer = setInterval(() => {
|
||||
this._queryHead()
|
||||
}, this.itime)
|
||||
// this.timer = setInterval(() => {
|
||||
// this._queryHead()
|
||||
// }, this.itime)
|
||||
if (this.menus.length) {
|
||||
this.menus.map(el => {
|
||||
if (el.router === this.$route.path) {
|
||||
@@ -262,7 +263,8 @@ export default {
|
||||
}
|
||||
},
|
||||
beforeDestroy () {
|
||||
clearInterval(this.timer)
|
||||
// clearInterval(this.timer)
|
||||
closeWebsocket(true)
|
||||
},
|
||||
destroyed () {
|
||||
clearInterval(this.timer)
|
||||
@@ -354,8 +356,23 @@ export default {
|
||||
async _authLogout () {
|
||||
await authLogout()
|
||||
},
|
||||
async _queryHead () {
|
||||
let res = await queryHead()
|
||||
// async _queryHead () {
|
||||
// let res = await queryHead()
|
||||
// if (res.code === '1') {
|
||||
// this.topInfo = res.result
|
||||
// } else {
|
||||
// this.toast(res.desc)
|
||||
// }
|
||||
// },
|
||||
_queryHead () {
|
||||
let getTimestamp = new Date().getTime()
|
||||
let url = this.$store.getters.baseUrl
|
||||
url = url.substring(7)
|
||||
console.log(url)
|
||||
sendWebsocket('ws://' + url + '/webSocket/SendHomeInfo/' + getTimestamp, {}, this.wsMessage, null)
|
||||
// sendWebsocket('ws://' + '192.168.10.130:8018' + '/webSocket/SendHomeInfo/' + getTimestamp, {}, this.wsMessage, null)
|
||||
},
|
||||
wsMessage (res) {
|
||||
if (res.code === '1') {
|
||||
this.topInfo = res.result
|
||||
} else {
|
||||
|
||||
@@ -63,7 +63,7 @@ li {
|
||||
html,body {
|
||||
-webkit-text-size-adjust: none;
|
||||
-webkit-tap-highlight-color: #ffffff;
|
||||
background-color: #ffffff;
|
||||
background-color: #001539;
|
||||
/* width: 100%;
|
||||
height: 100%; */
|
||||
font-size: 16px;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import * as types from '../types'
|
||||
import { getStore, setStore } from '@config/utils.js'
|
||||
|
||||
const baseUrl = process.env.NODE_ENV === 'development' ? 'http://43.139.166.161:8018' : 'http://localhost:8018'
|
||||
const baseUrl = process.env.NODE_ENV === 'development' ? 'http://47.98.105.245:8018' : 'http://localhost:8018'
|
||||
const setTime = '5000'
|
||||
const username = 'admin'
|
||||
const password = '123456'
|
||||
|
||||
Reference in New Issue
Block a user