襄阳市建设厅官方网站,如何自学广告设计,医院网站和公众号建设方案,网站关键词快速排名软件loginService.islogged()上面的函数返回一个像“失败”的字符串 . 但是#xff0c;当我尝试运行然后对它运行时#xff0c;它将返回错误TypeError: Cannot read property then of undefined并且光标在 connected 之后和 .then 之前指示 .以下是完整功能#xff1a;var conne…loginService.islogged()上面的函数返回一个像“失败”的字符串 . 但是当我尝试运行然后对它运行时它将返回错误TypeError: Cannot read property then of undefined并且光标在 connected 之后和 .then 之前指示 .以下是完整功能var connectedloginService.islogged();alert(connected);connected.then(function(msg){alert(connected value is connected);alert(msg.data value is msg.data);if(!msg.data.account_session || loginService.islogged()failed)$location.path(/login);});UPDATE这是 islogged() 函数islogged:function(){var cUidsessionService.get(uid);alert(in loginServce, cuid is cUid);var $checkSessionServer$http.post(data/check_session.php?cUidcUid);$checkSessionServer.then(function(){alert(session check returned!);console.log(checkSessionServer is $checkSessionServer);return $checkSessionServer;});}我确定 $checkSessionServer 会产生一个failed字符串 . 而已 .