优化
This commit is contained in:
parent
b57f31ad5e
commit
257c2d51ef
@ -1,9 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<div id="app">
|
<div id="app">
|
||||||
<router-view class="main"/>
|
<div v-if="!dd.pc && !dd.other" class="pc commonFont">
|
||||||
<!-- <div v-if="dd.pc" class="pc commonFont">
|
|
||||||
请移步PC端操作
|
请移步PC端操作
|
||||||
</div> -->
|
</div>
|
||||||
|
<router-view v-else class="main"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@ -1,20 +1,21 @@
|
|||||||
import { getDepList } from '@/api/report'
|
import { getDepList } from '@/api/report'
|
||||||
import { apiUserInfo } from '@/api/login'
|
import { apiUserInfo } from '@/api/login'
|
||||||
|
import * as dd from 'dingtalk-jsapi'
|
||||||
const user = {
|
const user = {
|
||||||
state: {
|
state: {
|
||||||
deplist: [],
|
deplist: [],
|
||||||
info: {},
|
info: dd.other ? JSON.parse(localStorage.getItem('info')) : {},
|
||||||
auth: JSON.parse(localStorage.getItem('auth')) || {}
|
auth: JSON.parse(localStorage.getItem('auth')) || {}
|
||||||
|
|
||||||
},
|
},
|
||||||
mutations: {
|
mutations: {
|
||||||
SET_USER_INFO: (state, info) => {
|
SET_USER_INFO: (state, info) => {
|
||||||
localStorage.setItem('info', JSON.stringify(info))
|
dd.other && localStorage.setItem('info', JSON.stringify(info))
|
||||||
state.info = info
|
state.info = info
|
||||||
console.log('state.info: ', state.info)
|
console.log('state.info: ', state.info)
|
||||||
},
|
},
|
||||||
SET_USER_AUTH: (state, auth) => {
|
SET_USER_AUTH: (state, auth) => {
|
||||||
localStorage.setItem('auth', JSON.stringify(auth))
|
dd.other && localStorage.setItem('auth', JSON.stringify(auth))
|
||||||
state.auth = auth
|
state.auth = auth
|
||||||
console.log('state.auth: ', state.auth)
|
console.log('state.auth: ', state.auth)
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user