1.
store —>modules—>user.js下 可以查看有哪些信息文章來(lái)源:http://www.zghlxwxcb.cn/news/detail-853161.html
2. 使用方式
2.1
//獲取登錄用戶的信息
import user from ‘@/store/modules/user’
2.2
export下
export default {
user
}
2.3
可以在created中直接打印信息
const user=user.state;
console.log(“當(dāng)前登錄人:”,user.info.username);
2.4 只打印到user.info下,可以查看
{
“id”: “2014-04-05”,
“username”: “admin”,
“realname”: “管理員”,
“avatar”: “https://static.jeecg.com/temp/國(guó)炬軟件logo_1606575029126.png”,
“birthday”: “2018-12-05”,
“sex”: 1,
“email”: “jeecg@163.com”,
“phone”: “11”,
“orgCode”: “11”,
“l(fā)oginTenantId”: 11,
“orgCodeTxt”: null,
“status”: 1,
“delFlag”: 0,
“workNo”: “00001”,
“post”: null,
“telephone”: null,
“createBy”: null,
“createTime”: “2019-06-21 17:54:10”,
“updateBy”: “admin”,
“updateTime”: “2023-12-31 16:54:41”,
“activitiSync”: 1,
“userIdentity”: 2,
“departIds”: “”,
“relTenantIds”: null,
“clientId”: null,
“homePath”: null,
“postText”: null,
“bpmStatus”: null,
“izBindThird”: false
}文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-853161.html
到了這里,關(guān)于jeecg 3.4.3前后端分離獲取,前端獲取當(dāng)前登錄人信息的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!