layui 带token访问后台需要验证的接口

JWT

1、lay-url:
lay-headers="{Authorization: '{{layui.data('platform').access_token}}' }"
2、admin.req:
beforeSend: function (xhr) {
xhr.setRequestHeader ("Authorization", layui.data('platform').access_token);
}
3、table:
headers: {
'Authorization': layui.data('platform').access_token
}

posted on 2018-05-11 15:43  zhangfeitaimengle  阅读(3468)  评论(0编辑  收藏  举报

导航