接口
This commit is contained in:
@@ -19,6 +19,9 @@ export const authlogin = (username, password) => post('auth/login', {
|
|||||||
username: username,
|
username: username,
|
||||||
password: password
|
password: password
|
||||||
})
|
})
|
||||||
|
|
||||||
|
export const queryHead = () => post('api/home/queryHead', {
|
||||||
|
})
|
||||||
// 车辆状态
|
// 车辆状态
|
||||||
// 1.1查询车辆状态
|
// 1.1查询车辆状态
|
||||||
export const queryVehicleStatus = (username, password) => post('api/vehicle/queryVehicleStatus', {
|
export const queryVehicleStatus = (username, password) => post('api/vehicle/queryVehicleStatus', {
|
||||||
|
|||||||
@@ -96,7 +96,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import jxTime from '@components/time.vue'
|
import jxTime from '@components/time.vue'
|
||||||
import jxDialog from '@components/dialog.vue'
|
import jxDialog from '@components/dialog.vue'
|
||||||
import { queryHomePage } from '@/config/getData.js'
|
import { queryHead } from '@/config/getData2.js'
|
||||||
import { updatePass, sysMenuBuild, authLogout } from '@config/getData2.js'
|
import { updatePass, sysMenuBuild, authLogout } from '@config/getData2.js'
|
||||||
import {encrypt} from '../../../main.js'
|
import {encrypt} from '../../../main.js'
|
||||||
export default {
|
export default {
|
||||||
@@ -244,9 +244,9 @@ export default {
|
|||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
this._sysMenuBuild()
|
this._sysMenuBuild()
|
||||||
this._queryHomePage()
|
this._queryHead()
|
||||||
this.timer = setInterval(() => {
|
this.timer = setInterval(() => {
|
||||||
this._queryHomePage()
|
this._queryHead()
|
||||||
}, this.itime)
|
}, this.itime)
|
||||||
if (this.menus.length) {
|
if (this.menus.length) {
|
||||||
this.menus.map(el => {
|
this.menus.map(el => {
|
||||||
@@ -354,8 +354,8 @@ export default {
|
|||||||
async _authLogout () {
|
async _authLogout () {
|
||||||
await authLogout()
|
await authLogout()
|
||||||
},
|
},
|
||||||
async _queryHomePage () {
|
async _queryHead () {
|
||||||
let res = await queryHomePage()
|
let res = await queryHead()
|
||||||
if (res.code === '1') {
|
if (res.code === '1') {
|
||||||
this.topInfo = res.result
|
this.topInfo = res.result
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user