This commit is contained in:
熊成强 2020-11-20 10:29:45 +08:00
parent b57f31ad5e
commit 257c2d51ef
2 changed files with 7 additions and 6 deletions

View File

@ -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>

View File

@ -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)
}, },