# setUserToken()设置会话token信息
设置会话token信息
示例
import { setUserToken } from '@/common/utils/oauth';
setUserToken(payload).then(res => { // payload为示例参数
console.log('getUserToken:' + res);;
})
.catch(err => {
console.log('未登录:' + err);
})
# getUserToken()获取会话token信息
获取会话token信息 示例
import { getUserToken } from '@/common/utils/oauth';
getUserToken.then(res => {
console.log('getUserToken:' + res);;
})
.catch(err => {
console.log('未登录:' + err);
})
# getSessionId()获取用户会话ID
获取用户会话ID 示例
Vue.prototype.$app.getSessionId(payload).then(res => {
console.log('getSessionId:' +res) // payload为示例参数
}).catch(err => {
console.log('会话标识无法获取' + err)
})
# setSessionId()设置用户会话ID
设置用户会话ID 示例
Vue.prototype.$app.setSessionId().then(res => {
console.log(res)
}).catch(err => {
console.log('会话标识无法设置' + err)
})
# clearSessionId()设置用户会话ID
清除用户会话ID 示例
Vue.prototype.$app.clearSessionId().then(res => {
console.log(res)
}).catch(err => {
console.log('清除用户会话ID有误' + err)
})
# getLoginType()获取不同登录方式
获取不同登录方式 示例
this.$app.getLoginType(logonId) // logonId为示例参数,传入需要获取的参数
.then(res => {
console.log('[快捷登录方式]', res + ',' + typeof res);
})
.catch(error => {
console.log('获取快捷登录方式错误', error);
})
# setLoginType()设置不同登录方式
设置不同登录方式 示例
this.$app.setLoginType(logonId,'0')
// (logonId,'0') 为示例参数,传入需要设置的参数和设置的登录方式,设置的登录方式:'0':没有快捷登录方式 '2':指纹登录
.then(res => {
console.log('setLoginType:', res );
})
.catch(error => {
console.log('设置不同登录方式失败', error);
})
# getLoginID()获取用户ID标识
获取用户ID标识 示例
this.$app.getLoginID()
.then(res => {
console.log('用户信息info====>', res);
})
.catch(err => {
console.log(err);
});
# setLoginID()设置用户ID标识
设置用户ID标识 示例
this.$app.setLoginID(logonId) // logonId为示例参数
.then(res => {
console.log('设置用户ID标识====>', res);
})
.catch(err => {
console.log(err);
});
# setSessionDatas()保存用户会话集合信息
保存用户会话集合信息 示例
this.$app.setSessionDatas(payload) // payload为示例参数
.then(res => {
console.log('保存用户会话集合信息====>', res);
})
.catch(err => {
console.log(err);
});
# clearSessionData()清空用户会话信息
清空用户会话信息 示例
this.$app.clearSessionData()
.then(res => {
console.log('清空用户会话信息====>', res);
})
.catch(err => {
console.log(err);
});
# updateSessionData()保存用户会话单个信息
保存用户会话单个信息 示例
this.$app.updateSessionData('iAccountInfo', res.iAccountInfo_Mobile)
// 'iAccountInfo',res.iAccountInfo_Mobile为示例参数,'iAccountInfo'为需要保存的key,res.iAccountInfo_Mobile为需要保存的data数据
.then(res => {
console.log('保存用户会话单个信息====>', res);
})
.catch(err => {
console.log(err);
});
# getSessionData()读取用户会话信息
读取用户会话信息 示例
this.$app.getSessionData()
.then(res => {
console.log('读取用户会话信息====>', res);
})
.catch(err => {
console.log(err);
});
# setNotRemind()设置不再提示快捷登陆
设置不再提示快捷登陆 示例
this.$app.setNotRemind(logonId, '0')
// (logonId, '0')为示例参数,logonId为需要设置的id参数,'0'为不提示
// '0':【提示】设置快捷登录方式 1:【不提示】设置快捷登陆方式
.then(res => {
console.log('设置不再提示快捷登陆====>', res);
})
.catch(err => {
console.log(err);
});
# getNotRemind()判断是否设置不再提示快捷登陆
判断是否设置不再提示快捷登陆 示例
this.$app.getNotRemind(logonId)
// (logonId)为示例参数,logonId为需要获取的id参数
.then(res => {
console.log('获取不再提示快捷登陆====>', res);
// '0':【提示】设置快捷登录方式 1:【不提示】设置快捷登陆方式
})
.catch(err => {
console.log(err);
});
# getMesNum()获取未读消息总数
获取未读消息总数 示例
this.$app.getMesNum().then(res => {
console.log('未读消息', res);
});
← 过滤器