diff --git a/agent/admin/controllers/auto/Ucenter.php b/agent/admin/controllers/auto/Ucenter.php index 9bef0ddd..c2d77cc7 100644 --- a/agent/admin/controllers/auto/Ucenter.php +++ b/agent/admin/controllers/auto/Ucenter.php @@ -201,17 +201,18 @@ class Ucenter extends BaseController { $id = $this->get('id'); $userCoupon = $this->auto_user_coupon_model->get(['id' => $id, 'userId' => $this->userId]); + $product = $this->auto_product_model->get(['id'=>$userCoupon['productId']]); $where = ['cf_uid' => $this->userId, 'app_id' => Receiver_clues_model::APP_ID_ACTIVITY, 'out_id' => $userCoupon['productId']]; $cluesRow = $this->clues_model->get($where); $cityRow = $this->area_model->get(['city_id' => $cluesRow['city_id']]); - $brand = $this->auto_brand_model->get(['id' => $cluesRow['brand_id']], 'name'); - $series = $this->auto_series_model->get(['id' => $cluesRow['series_id']], 'name'); + $brand = $this->auto_brand_model->get(['id' => $product['brand_id']], 'name'); + $series = $this->auto_series_model->get(['id' => $product['series_id']], 'name'); $data = [ 'mobile' => mobile_asterisk($userCoupon['mobile']), 'city' => $cityRow['province_name'] . '/' . $cityRow['city_name'], 'cityId' => $cluesRow['city_id'] ?: '', - 'brandId' => $cluesRow['brand_id'] ?: '', - 'seriesId' => $cluesRow['series_id'] ?: '', + 'brandId' => $product['brandId'] ?: '', + 'seriesId' => $product['seriesId'] ?: '', 'model' => "{$brand['name']} {$series['name']}" ]; $this->return_response($data);