|
|
@@ -36,7 +36,7 @@ class ActivityLogic extends BaseLogic
|
|
|
if($params['user_id']){
|
|
|
// property_head_id householder_mobile householder_name address
|
|
|
$userInfo = User::where('id',$params['user_id'])->findOrEmpty();
|
|
|
- if ($userInfo->isEmpty()) {
|
|
|
+ if (!$userInfo->isEmpty()) {
|
|
|
// 检查/注册
|
|
|
Log::info('getHomepageByActivityId params-102:'.json_encode([$userInfo]));
|
|
|
PropertyUserLogic::getPropertyUserIdByMobile([
|
|
|
@@ -48,9 +48,12 @@ class ActivityLogic extends BaseLogic
|
|
|
}
|
|
|
}
|
|
|
$res['activity_info'] = $propertyActivity->toArray();
|
|
|
- $res['coupons'] = CouponRules::where('property_activity_id',$params['property_activity_id'])
|
|
|
+ $res['coupons'] = CouponRules::with(['couponCategoryOne'])->where('property_activity_id',$params['property_activity_id'])
|
|
|
->select()
|
|
|
->toArray();
|
|
|
+ foreach ($res['coupons'] as &$coupon) {
|
|
|
+ $coupon['goods_category_id'] = $coupon['couponCategoryOne']['goods_category_id'];
|
|
|
+ }
|
|
|
$res['goods'] = Goods::where('property_activity_id',$params['property_activity_id'])
|
|
|
->where('is_agent',1)
|
|
|
->visible(['id','goods_name','goods_image','base_service_fee','service_total','service_fee','goods_type'])
|