|
@@ -1206,6 +1206,46 @@ class MyController extends Controller
|
|
}else{
|
|
}else{
|
|
return $this->error(ErrorCode::OPERATION_FAILED);
|
|
return $this->error(ErrorCode::OPERATION_FAILED);
|
|
}
|
|
}
|
|
|
|
+ } /**
|
|
|
|
+ * @api {get} /api/my/letter/show 查看私信
|
|
|
|
+ * @apiDescription 查看私信
|
|
|
|
+ * @apiGroup My
|
|
|
|
+ * @apiParam {int} id 私信主键id
|
|
|
|
+ * @apiPermission Passport
|
|
|
|
+ * @apiVersion 0.1.0
|
|
|
|
+ * @apiSuccessExample {json} Success-Response:
|
|
|
|
+ * HTTP/1.1 200 OK
|
|
|
|
+ *{
|
|
|
|
+ * "status": true,
|
|
|
|
+ * "status_code": 0,
|
|
|
|
+ * "message": "",
|
|
|
|
+ * "data": ""
|
|
|
|
+ *}
|
|
|
|
+ * @apiErrorExample {json} Error-Response:
|
|
|
|
+ *{
|
|
|
|
+ * "status": false,
|
|
|
|
+ * "status_code": 700,
|
|
|
|
+ * "message": "操作失败",
|
|
|
|
+ * "data": null
|
|
|
|
+ *}
|
|
|
|
+ */
|
|
|
|
+ public function letterShow(Request $request)
|
|
|
|
+ {
|
|
|
|
+ $validator = \Validator::make($request->all(),
|
|
|
|
+ [
|
|
|
|
+ 'id' => 'required',
|
|
|
|
+ ],
|
|
|
|
+ [
|
|
|
|
+ 'id.required' => '私信id不存在',
|
|
|
|
+ ]
|
|
|
|
+ );
|
|
|
|
+ if($validator->fails()) return $this->validatorError($validator->messages()->all(),ErrorCode::CLIENT_WRONG_PARAMS);
|
|
|
|
+ $user = $this->getUser();
|
|
|
|
+ $user_id = $user->id;
|
|
|
|
+ $id = $request->input('id');
|
|
|
|
+
|
|
|
|
+ $data = SystemInfoModel::find($id);
|
|
|
|
+ return $this->api($data);
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|