1234567891011121314151617181920212223242526272829 |
- import { changestatus, sysuserstatus } from 'api/api.js'
- export const increment = ({commit}) => {
- commit('INCREMENT')
- }
- export const decrement = ({commit}) => {
- commit('DECREMENT')
- }
- // 修改用户在线状态
- export const setOnlineStatus = ({commit},params)=>{
- changestatus(params).then(res=>{
- if(res.Ret == 200){
- commit('SET_ONLINE_STATUS',params.Status)
- }
- })
- }
- //获取用户在线状态
- export const getOnlineStatus = ({commit},params={})=>{
- sysuserstatus(params).then(res=>{
- console.log(res)
- if(res.Ret == 200){
- commit('GET_ONLINE_STATUS',res.Status)
- }
- })
- }
|