本文整理汇总了PHP中Activity::isUserJoin方法的典型用法代码示例。如果您正苦于以下问题:PHP Activity::isUserJoin方法的具体用法?PHP Activity::isUserJoin怎么用?PHP Activity::isUserJoin使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Activity
的用法示例。
在下文中一共展示了Activity::isUserJoin方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getDetailAction
/**
* 获取自驾游详情
* @param $id
*/
public function getDetailAction($id)
{
$tour = Activity::getDrivingTourDetailById($id);
$user = User::getCurrentUser();
$is_user_join = Activity::isUserJoin($user['user_id'], $id);
$tour['is_user_join'] = $is_user_join;
$this->view->setVars(array('row' => $tour));
}
示例2: getDetailAction
/**
* 获取指定id的活动详情
* @param $id
*/
public function getDetailAction($id)
{
$activity = Activity::getActivityDetailById($id);
$user = User::getCurrentUser();
$is_user_join = Activity::isUserJoin($user['user_id'], $id);
//更新浏览次数
Activity::updateActivityViewNum($id);
$activity['is_user_join'] = $is_user_join;
$this->view->setVars(array('row' => $activity));
}
示例3: actualAction
/**
* 申请精算
*/
public function actualAction()
{
$form_data = $this->request->getJsonRawBody(true);
$info_id = $form_data['info_id'];
$is_using_attach = !empty($form_data['driving_license_a']);
$info = Insurance::getInsuranceInfoById($info_id);
$user = User::getCurrentUser();
$info_update = array('state_id' => 2, 'last_modified_time' => date('Y-m-d H:i:s'), 'phone' => $user['phone'], 'weixin' => !empty($form_data['weixin']) ? $form_data['weixin'] : null);
if (!$is_using_attach) {
Insurance::updateInsuranceParam($info['param_id'], $form_data);
$car_info = CarInfo::getCarInfoByUserIdAndHphm($user['user_id'], $form_data['hphm']);
if (!empty($car_info)) {
CarInfo::updateCarInfo($car_info['id'], array('engine_number' => $car_info['engine_number'], 'frame_number' => $car_info['frame_number'], 'auto_name' => $car_info['auto_name']));
$info_update['car_no_id'] = $car_info['id'];
} else {
$new_car_no_id = CarInfo::addCarInfo(array('user_id' => $user['user_id'], 'hphm' => $form_data['hphm'], 'no_hphm' => isset($form_data['no_hphm']) ? 1 : 0, 'engine_number' => $form_data['engine_number'], 'frame_number' => $form_data['frame_number'], 'auto_name' => $form_data['auto_name']));
$info_update['car_no_id'] = $new_car_no_id;
}
$info_update['user_name'] = $form_data['user_name'];
//$info_update['sfzh'] = $form_data['sfzh'];
} else {
$attach_id = Insurance::addInsuranceAttach($form_data);
$info_update['attach_id'] = $attach_id;
}
$success = Insurance::updateInsuranceInfo($info_id, $info_update);
//邀请码处理
if (isset($form_data['invitation_code'])) {
$is_involved = Activity::isUserJoin($user['user_id'], 228);
if (!$is_involved) {
$p_user = Activity::getActivityUser(array('invitation_code' => $form_data['invitation_code']));
if (!empty($p_user)) {
Activity::addActivityUser(array('user_id' => $user['user_id'], 'p_user_id' => $p_user['user_id']), 228);
}
}
}
$return_data = array('success' => $success);
if ($success) {
$return_data['err_msg'] = '申请精算成功';
} else {
$return_data['err_msg'] = '申请精算失败';
}
$this->view->setVars($return_data);
}