diff --git a/app/common/model/informationg/UserInformationg.php b/app/common/model/informationg/UserInformationg.php index 691a0ceca..58bfb15a4 100644 --- a/app/common/model/informationg/UserInformationg.php +++ b/app/common/model/informationg/UserInformationg.php @@ -72,11 +72,17 @@ class UserInformationg extends BaseModel public static function informationg_demand($param, $id, $admin_id) { - + if(isset($param['card_id']) &&$param['card_id'] >0){ + $category_id=Db::name('category_business')->where('id',$param['card_id'])->value('pid'); + $category_child=$param['card_id']; + }else{ + $category_id=0; + $category_child=0; + } $data = [ 'create_user_id' => $admin_id, - 'category_id' => $param['category_id'] ?? 0, - 'category_child' => $param['category_child'] ?? 0, + 'category_id' => $category_id, + 'category_child' => $category_child, 'data' => json_encode($param['datas']), 'create_time' => time(), 'update_time' => time(), @@ -98,9 +104,7 @@ class UserInformationg extends BaseModel foreach ($data as $k => $v) { $a = json_decode($v['data'], true); $arr = [ - 'id' => $v['id'], - 'category_id' => $v['category_id'], - 'category_child' => $v['category_child'], + 'id' => $v['category_child'], 'datas' => $a ]; if ($a) {