点击跳小程序 AAA; $res = $this->withHeaders([ 'Authorization' => 'Bearer '. $this->token, ])->json('post','http://localhost/api/wechatPlatform/kfMessage/add', [ 'name' => 'liuzj-test-'. uniqid(), 'send_at' => date('Y-m-d H:i:s', strtotime('tomorrow')), 'message_type' => 1, 'u_type' => 1, 'message_content' => [ ['text' => '普通文本👌🏻'], ['text' => $STR] ] ]); $this->dumpJson($res); } public function testList() { $res = $this->withHeaders([ 'Authorization' => 'Bearer '. $this->token, ])->json('get','http://localhost/api/wechatPlatform/kfMessage/list', [ 'id' => 4 ]); $this->dumpJson($res); } public function testupdateContent() { $res = $this->withHeaders([ 'Authorization' => 'Bearer '. $this->token, ])->json('post','http://localhost/api/wechatPlatform/kfMessage/updateContent', [ 'id' => 4, 'name' => 'change-'.uniqid(), 'message_type' => 1, 'message_content' => [ ['text' => 'changexxxx'] ], 'u_type' => 2, 'uc_unique_key' => uniqid('',true), 'send_at' => date('Y-m-d H:i:s', strtotime('+2 hour')) ]); $this->dumpJson($res); } public function testupdateGZH() { $res = $this->withHeaders([ 'Authorization' => 'Bearer '. $this->token, ])->json('post','http://localhost/api/wechatPlatform/kfMessage/updateGZH', [ 'id' => 4, 'gzh_ids' => [] ]); $this->dumpJson($res); } public function teststop() { $res = $this->withHeaders([ 'Authorization' => 'Bearer '. $this->token, ])->json('post','http://localhost/api/wechatPlatform/kfMessage/stop', [ 'id' => 3 ]); $this->dumpJson($res); } public function testdelete() { $res = $this->withHeaders([ 'Authorization' => 'Bearer '. $this->token, ])->json('post','http://localhost/api/wechatPlatform/kfMessage/delete', [ 'id' => 3 ]); $this->dumpJson($res); } }