用前端ux npm编译后 循环提示重新登录 返回码一直是101

问题:把前端ux下载后 用npm编译后 循环提示重新登录 返回码一直是101 

什么也没改动,不知道是什么问题!

改runtime权限解决不了问题的。请解决下。

谢谢!


补充

$header = $request->header();
$authKey = $header['authkey'];

$paramArr = $request->param();
$platform = $paramArr['platform'] ? '_'.$paramArr['platform'] : ''; //请求分类(mobile,ding)
$cache = cache('Auth_'.$authKey.$platform);
$userInfo = $cache['userInfo'];

if (in_array($a, $permission)) {
return true;
}

if (empty($userInfo)) {
header('Content-Type:application/json; charset=utf-8');
exit(json_encode(['code'=>101,'error'=>'请先登录']));
}
if ($userInfo['id'] == 1) {
return true;
}


头部信息获取不到!

服务器日志如下:


---------------------------------------------------------------
[ 2019-12-20T10:27:22+08:00 ] 192.168.1.41 POST /index.php/crm/index/achievementData
[ info ] 192.168.1.252:8084/index.php/crm/index/achievementData [运行时间:0.047307s][吞吐率:21.14req/s] [内存消耗:3,254.05kb] [文件加载:113]
[ info ] [ CACHE ] INIT File
[ info ] [ BEHAVIOR ] Run app\common\behavior\InitConfigBehavior @app_init [ RunTime:0.002109s ]
[ info ] [ LANG ] C:\crm\thinkphp\lang\zh-cn.php
[ info ] [ LANG ] C:\crm/application/lang\zh-cn.php
[ info ] [ ROUTE ] array (
'type' => 'module',
'module' =>
array (
0 => 'crm',
1 => 'index',
2 => 'achievementData',
),
'convert' => false,
)
[ info ] [ HEADER ] array (
'cookie' => 'PHPSESSID=e9ls1qngrikcldkd53iev6pju5',
'accept-language' => 'zh-CN,zh;q=0.9',
'accept-encoding' => 'gzip, deflate',
'referer' => 'http:  //192.168.1.252:8084/',
'content-type' => 'application/x-www-form-urlencoded;charset=UTF-8',
'user-agent' => 'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.79 Safari/537.36',
'origin' => 'http:  //192.168.1.252:8084',
'accept' => 'application/json, text/plain, */*',
'content-length' => '18',
'connection' => 'close',
'host' => '  192.168  .1.252:8084',
)
[ info ] [ PARAM ] array (
'type' => 'year',
'status' => '2',
)
[ info ] [ LANG ] C:\crm/application/crm\lang\zh-cn.php
[ info ] [ LOG ] INIT File
[ error ] [8]未定义数组索引: authkey[C:\crm\application\common\behavior\AuthenticateBehavior.php:33]
[ error ] [8]未定义数组索引: platform[C:\crm\application\common\behavior\AuthenticateBehavior.php:36]
---------------------------------------------------------------
[ 2019-12-20T10:27:22+08:00 ] 192.168.1.41 POST /index.php/crm/index/index
[ info ] 192.168.1.252:8084/index.php/crm/index/index [运行时间:0.051409s][吞吐率:19.45req/s] [内存消耗:3,253.83kb] [文件加载:113]
[ info ] [ CACHE ] INIT File
[ info ] [ BEHAVIOR ] Run app\common\behavior\InitConfigBehavior @app_init [ RunTime:0.002292s ]
[ info ] [ LANG ] C:\crm\thinkphp\lang\zh-cn.php
[ info ] [ LANG ] C:\crm/application/lang\zh-cn.php
[ info ] [ ROUTE ] array (
'type' => 'module',
'module' =>
array (
0 => 'crm',
1 => 'index',
2 => 'index',
),
'convert' => false,
)
[ info ] [ HEADER ] array (
'cookie' => 'PHPSESSID=e9ls1qngrikcldkd53iev6pju5',
'accept-language' => 'zh-CN,zh;q=0.9',
'accept-encoding' => 'gzip, deflate',
'referer' => 'http:  //192.168.1.252:8084/',
'content-type' => 'application/x-www-form-urlencoded;charset=UTF-8',
'user-agent' => 'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.79 Safari/537.36',
'origin' => 'http:  //192.168.1.252:8084',
'accept' => 'application/json, text/plain, */*',
'content-length' => '9',
'connection' => 'close',
'host' => '192.  168.1.252:8084',
)
[ info ] [ PARAM ] array (
'type' => 'year',
)
[ info ] [ LANG ] C:\crm/application/crm\lang\zh-cn.php
[ info ] [ LOG ] INIT File
[ error ] [8]未定义数组索引: authkey[C:\crm\application\common\behavior\AuthenticateBehavior.php:33]
[ error ] [8]未定义数组索引: platform[C:\crm\application\common\behavior\AuthenticateBehavior.php:36]




已邀请:

要回复问题请先登录注册