fix: form-create API 请求时,缺少 token (https://t.zsxq.com/hK3FO)
parent
cfa25fc8d0
commit
0efa1e986b
|
|
@ -116,7 +116,8 @@ export const setConfAndFields2 = (
|
||||||
switch (key) {
|
switch (key) {
|
||||||
case 'beforeFetch':
|
case 'beforeFetch':
|
||||||
return (config: any) => {
|
return (config: any) => {
|
||||||
// 添加认证头
|
// 添加 Token 认证头。例如说:
|
||||||
|
// https://t.zsxq.com/hK3FO
|
||||||
const token = localStorage.getItem('token')
|
const token = localStorage.getItem('token')
|
||||||
if (token) {
|
if (token) {
|
||||||
config.headers = {
|
config.headers = {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue