|
@@ -477,7 +477,7 @@ class CommonController extends ApiBaseController {
|
|
|
$data['hot_keywords'] = $hot_keys;
|
|
|
$data['report_reason'] = Yii::app()->params['report_reason'];
|
|
|
$data['certify_url'] = isset(Yii::app()->params['certify_url'])?Yii::app()->params['certify_url']:'';
|
|
|
- $data['tool_box_url'] = 'http://www.wozhua.mobi/webapp/pet';
|
|
|
+ $data['tool_box_url'] = 'http://common.yiguanjia.me/webapp/pet';
|
|
|
$data['deal_url'] = 'http://'.$host.'/o2o/web/index/deal?need_header=0';
|
|
|
$pic_edit = Service::factory('VariableService')->getVariable('pic_edit');
|
|
|
$data['pic_edit'] = intval($pic_edit);
|
|
@@ -519,43 +519,7 @@ class CommonController extends ApiBaseController {
|
|
|
CommonFn::requestAjax($success, $message, $data);
|
|
|
}
|
|
|
|
|
|
- public function actionReport() {
|
|
|
- $user = Yii::app()->request->getParam('user_id', '');
|
|
|
- $reason = Yii::app()->request->getParam('reason', '');
|
|
|
- $time = time();
|
|
|
-
|
|
|
- $to_user_id = Yii::app()->request->getParam('to_user_id', '');
|
|
|
- $topic_id = Yii::app()->request->getParam('topic_id', '');
|
|
|
-
|
|
|
- if ((empty($to_user_id) && empty($topic_id)) // 举报对象
|
|
|
- || empty($user) || empty($reason)) { // 举报用户和理由
|
|
|
- CommonFn::requestAjax(false, '参数不全', array());
|
|
|
- }
|
|
|
-
|
|
|
- $type = empty($to_user_id) ? 'topic' : 'user';
|
|
|
- $object = empty($to_user_id) ? $topic_id : $to_user_id;
|
|
|
- $object_id = new MongoId($object);
|
|
|
- $user_id = new MongoId($user);
|
|
|
- $reports = Report::getByUser($user_id, $object_id);
|
|
|
- if ($reports != false) {
|
|
|
- $reports->next();
|
|
|
- $report = $reports->current();
|
|
|
- if ($report->status == 0) {
|
|
|
- CommonFn::requestAjax(false, '已经举报过了哦', array());
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- $report = new Report();
|
|
|
- $report->type = $type;
|
|
|
- $report->object = $object_id;
|
|
|
- $report->user = $user_id;
|
|
|
- $report->reason = $reason;
|
|
|
- $report->time = $time;
|
|
|
-
|
|
|
- $success = $report->insert();
|
|
|
- $message = $success ? '举报成功' : '举报失败';
|
|
|
- CommonFn::requestAjax($success, $message, array());
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
public function actionCustomeParam() {
|
|
|
$user_id = Yii::app()->request->getParam('user_id', '');
|