CommonModel::$del_normal, 'company_id' => self::$company_id, 'card_id' => self::$card_id, ]); $count = $db->count('id'); $list = $db ->field('id,original_price,activity_price,title,activity_status') ->page($data['page'], $data['size']) ->order(['id' => 'desc']) ->select() ->toArray(); return json_show(CommonModel::$success, '获取服务列表成功', ['count' => $count, 'list' => $list]); } //详情 public static function read(int $id = 0): Json { $info = ServiceModel::field('id,original_price,activity_price,title,content,starttime,endtime,expiretime,activity_status') ->where(['id' => $id, 'is_del' => CommonModel::$del_normal]) ->findOrEmpty() ->toArray(); return $info ? json_show(CommonModel::$success, '获取服务详情成功', $info) : json_show(CommonModel::$error_param, '服务为空'); } }