Skip to content

使用 axios 发送POST 请求时,无法正常接收到数据 #138

Description

@3DMXM

ts 请求代码
function GetUser() { axios.post("/render/GetUser", { user: "111" }).then((res: any) => { console.log(res); }) }

PHP接收代码
public function action_GetUser(){ $user = $this->request->post("user"); $this->json([ "code"=>"00", "user"=>$user ]); }

请求返回
{"code":"00","user":null}

QQ截图20220811113747
QQ截图20220811113804
QQ截图20220811113908
QQ截图20220811113917

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions