This commit is contained in:
weiz 2023-10-25 11:26:11 +08:00
parent d4de18c0a4
commit 9caca3c5a0
1 changed files with 2 additions and 1 deletions

View File

@ -44,8 +44,9 @@
$curl_result['data']['seed_time'] = date('Y-m-d H:i:s',$land_crop['seed_time']);
$curl_result['data']['ripe_time'] = !empty($land_crop['ripe_time']) && !empty($land_crop['crop_yield']) ? date('Y-m-d H:i:s',$land_crop['ripe_time']) : $land_crop['ripe_time'];
//获取播种图片
$land_crop_pic = Db::name('farmer_land_crop_pic')->field('pic')->where('crop_id',$land_crop['id'])->order('id desc')->findOrEmpty();
$land_crop_pic = Db::name('farmer_land_crop_pic')->field('pic,create_time')->where('crop_id',$land_crop['id'])->order('id desc')->findOrEmpty();
$curl_result['data']['pic'] = !empty($land_crop_pic) ? $land_crop_pic['pic'] : '';
$curl_result['data']['create_time'] = !empty($land_crop_pic) ? date('Y-m-d H:i:s',$land_crop_pic['create_time']) : '';
}else{
$curl_result['data']['is_cropped'] = false;
}