// if (res.code !== 0) { if (res.status !== 200) { //这样改
config.headers[‘Authorization‘] = ‘eyJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJhZG1pbiIsInVzZXJJZCI6IjEiLCJ1c2VyTmFtZSI6ImFkbWluIiwiZXhwaXJlIjoxNTI3Njc0NjY5MzM1LCJkZXBhcnQiOiItMSIsInRlbmFudCI6Im51bGwifQ.iYeEXHoA_D0qRruv0pj4QdDbIXIEHL1L61HmXCcRTxnt29pK3wmpulnMloEMMKRIQ9Ix1Ew97jO5xfDxeKp7FL-W4H32ZM4rwYtfNOJ-em1xVQJWOMex3YTwGyxRXLgTj7PJHtcqWRqVkFRWYbs6uN_lHip04gXEJtTaIUF9Fd1og‘// 让每个请求携带自定义token 请根据实际情况自行修改
原文地址:https://www.cnblogs.com/tabCtrlShift/p/9117621.html
时间: 2024-09-28 12:35:18