作者 lyh

变更数据

... ... @@ -108,6 +108,18 @@ class Project5CateController extends BaseController
if ($response->successful()) {
$result = $response->json(); // 获取 JSON 响应体
if($result && $result['status'] == 200){
//todo::更新分类数据
$action1 = $project5CateModel->getCateTypeAction($this->param['type']);
$url1 = $projectInfo['website'].'wp-admin/admin-ajax.php?action='.$action1;
$data = http_get($url1);
if($data && $data['status'] == 200){
$resultData = $data['data'];
$saveData = [
'text'=>json_encode($data['data']),
];
$project5CateModel->edit($saveData,['project_id' => $projectInfo['post_id'],'type'=>$this->param['type']]);
$this->response('success', Code::SUCCESS,$resultData);
}
$this->response('success');
}
}
... ...