/** * 获取用户真实手机 * GET /user/1/email * @method GET_infoAction * @param integer $id [description] * @author NewFuture */ public function GET_emailAction($id = 0) { $pid = $this->authPrinter(); if (TaskModel::where('use_id', $id)->where('pri_id', $pid)->get('id')) { $email = UserModel::where('id', '=', $id)->get('email'); $email = $email ? Encrypt::decryptEmail($email) : null; $this->response(1, $email); } else { $this->response(0, '此同学未在此打印过'); } }
/** * 获取源文件 * 在转码出问题可用此接口 * @param [type] $id [description] */ public function GET_fileAction($id) { $pid = $this->authPrinter(); if ($url = TaskModel::where('id', intval($id))->where('pri_id', '=', $pid)->get('url')) { $this->response(1, File::source($url)); } else { $this->response(0, '无此文件'); } }
/** * 获取下载url * @method GET_urlAction * @param $id [description] * @author NewFuture */ public function GET_urlAction($id = 0) { $userid = $this->auth(); $url = TaskModel::where('id', '=', $id)->where('use_id', '=', $userid)->get($url); Input::get('alias', $alias, 'title'); if ($url && ($url = File::get($url, $alias))) { $this->response(1, $url); } else { $this->response(0, '你没有设定此任务'); } }