警告返回的数据

我正在使用AngularJs4。我正在尝试在服务器端验证每个用户。服务器端包含一个lua页面并返回一个名称。

**

var result = this._http.post("http://192.168.0.102:8000/user.lua",uname,pass)

      alert(result)

user.lua

require "string"
function handle(r)
local POST, POSTMULTI = r:parsebody()
local name = POST['uname']
local pass = POST['pass']
r.content_type = "text/plain"
if r.method == 'POST' then
r:puts("\n...The Log Detailsss...\n\n")
        for k, v in pairs( POST,POSTMULTI ) do
          r:puts( string.format("%s: %s\n\n", k, v) )
--file:write(string.format("%s: %s\n\n", k, v))
return "hello"
    end
    return "name"
end

**

当运行应用程序时,它返回如下所示。 enter image description here

我该怎么做?请帮帮我..

点赞
用户1749403
用户1749403

你需要对响应进行**stringify**以便在警告中显示

var result = this._http.post("http://192.168.0.102:8000/user.lua",uname,pass)
alert(JSON.stringify(result));
2017-10-04 11:39:37