35 lines
756 B
PHP
35 lines
756 B
PHP
|
|
<?php
|
|||
|
|
|
|||
|
|
namespace app\controller;
|
|||
|
|
|
|||
|
|
use support\Request;
|
|||
|
|
use support\Log;
|
|||
|
|
use app\utils\Cf7InquiryClient;
|
|||
|
|
|
|||
|
|
class TransmitController
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
public function form(Request $request)
|
|||
|
|
{
|
|||
|
|
try {
|
|||
|
|
|
|||
|
|
|
|||
|
|
// 表单信息 GET /wp-json/acf7db/v1/forms
|
|||
|
|
|
|||
|
|
$client = new Cf7InquiryClient(
|
|||
|
|
'https://hesupipe.com',
|
|||
|
|
'dev_server',
|
|||
|
|
'eakt wS0o TWVC G9Ys KDAh Djmx'
|
|||
|
|
);
|
|||
|
|
|
|||
|
|
// $result = $client->fetchForms();
|
|||
|
|
|
|||
|
|
$result = $client->fetchEntries(263, 0, 10);
|
|||
|
|
|
|||
|
|
return json($result);
|
|||
|
|
} catch (\Throwable $th) {
|
|||
|
|
Log::info('Data:'.date('Y-m-d H:i:s').':'.$th->getMessage().'|'.$th->getLine().'|'.$th->getFile());
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
}
|