Commit c8e9f872 authored by 毛线's avatar 毛线

im登录问题处理

parent 4f9e72b1
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<script> <script>
import { mapActions, mapMutations } from 'vuex' import { mapActions, mapMutations } from 'vuex'
import { deviceType } from '@/utils/device-type' // import { deviceType } from '@/utils/device-type'
import Audio from '@/components/common/audio/index' import Audio from '@/components/common/audio/index'
export default { export default {
components: { components: {
...@@ -71,7 +71,7 @@ export default { ...@@ -71,7 +71,7 @@ export default {
]), ]),
initSceen() { initSceen() {
const { innerWidth, innerHeight } = window const { innerWidth, innerHeight } = window
const isMobile = deviceType(navigator.userAgent) const isMobile = false
if (process.env.NODE_ENV === 'development') { if (process.env.NODE_ENV === 'development') {
// return // return
} }
......
...@@ -149,6 +149,10 @@ export const mutations = { ...@@ -149,6 +149,10 @@ export const mutations = {
state.dictionary = dictionary state.dictionary = dictionary
}, },
SetImToken(state, data) {
state.imToken = data
},
SetDeviceList(state, data) { SetDeviceList(state, data) {
state.deviceList = data state.deviceList = data
}, },
...@@ -179,6 +183,7 @@ export const actions = { ...@@ -179,6 +183,7 @@ export const actions = {
const { data } = res const { data } = res
const { token, openImToken, userId } = data const { token, openImToken, userId } = data
commit(RELIST, false) commit(RELIST, false)
commit('SetImToken', openImToken)
setUserData({ token, openImToken, userId }) setUserData({ token, openImToken, userId })
resolve(res) resolve(res)
}).catch(error => { }).catch(error => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment