|
|
@ -3,22 +3,13 @@ namespace app\api\controller\library; |
|
|
|
|
|
|
|
|
use app\api\controller\Controller; |
|
|
use app\api\controller\Controller; |
|
|
use app\common\dm\Dm; |
|
|
use app\common\dm\Dm; |
|
|
use app\common\exception\BaseException; |
|
|
|
|
|
use app\common\logic\PassFlow; |
|
|
use app\common\logic\PassFlow; |
|
|
use think\Session; |
|
|
|
|
|
|
|
|
|
|
|
class Pass extends Controller |
|
|
class Pass extends Controller |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
protected $url = 'http://balib.cn:8999'; |
|
|
protected $url = 'http://balib.cn:8999'; |
|
|
|
|
|
|
|
|
protected function requestValiDate() |
|
|
|
|
|
{ |
|
|
|
|
|
$token = $this->request->param('token'); |
|
|
|
|
|
if (empty($token)) throw new BaseException(['msg' => '缺少token参数']); |
|
|
|
|
|
if ($token != Session::pull('__token__')) throw new BaseException(['msg' => 'token验证失败']); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 图书管数据接口 |
|
|
* 图书管数据接口 |
|
|
* @return array |
|
|
* @return array |
|
|
@ -28,7 +19,6 @@ class Pass extends Controller |
|
|
*/ |
|
|
*/ |
|
|
public function allFlowTrends() |
|
|
public function allFlowTrends() |
|
|
{ |
|
|
{ |
|
|
$this->requestValiDate(); |
|
|
|
|
|
$data = PassFlow::allFlowTrends(); |
|
|
$data = PassFlow::allFlowTrends(); |
|
|
return $this->renderSuccess(compact('data')); |
|
|
return $this->renderSuccess(compact('data')); |
|
|
} |
|
|
} |
|
|
@ -214,7 +204,6 @@ class Pass extends Controller |
|
|
*/ |
|
|
*/ |
|
|
public function getLibraryHours24List() |
|
|
public function getLibraryHours24List() |
|
|
{ |
|
|
{ |
|
|
$this->requestValiDate(); |
|
|
|
|
|
$data = PassFlow::getLibraryHours24List(); |
|
|
$data = PassFlow::getLibraryHours24List(); |
|
|
return $this->renderSuccess(compact('data')); |
|
|
return $this->renderSuccess(compact('data')); |
|
|
} |
|
|
} |
|
|
@ -228,7 +217,6 @@ class Pass extends Controller |
|
|
*/ |
|
|
*/ |
|
|
public function getLibraryGroupHoursList() |
|
|
public function getLibraryGroupHoursList() |
|
|
{ |
|
|
{ |
|
|
$this->requestValiDate(); |
|
|
|
|
|
$data = PassFlow::getLibraryGroupHoursList(); |
|
|
$data = PassFlow::getLibraryGroupHoursList(); |
|
|
return $this->renderSuccess(compact('data')); |
|
|
return $this->renderSuccess(compact('data')); |
|
|
} |
|
|
} |
|
|
@ -270,13 +258,12 @@ class Pass extends Controller |
|
|
return $this->renderSuccess(); |
|
|
return $this->renderSuccess(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 获取今日借阅办证数据 |
|
|
* 获取今日借阅办证数据 |
|
|
* @return array |
|
|
* @return array |
|
|
*/ |
|
|
*/ |
|
|
public function getLibraryLeaseData() |
|
|
public function getLibraryLeaseData() |
|
|
{ |
|
|
{ |
|
|
$this->requestValiDate(); |
|
|
|
|
|
$data = PassFlow::getLibraryLeaseData(); |
|
|
$data = PassFlow::getLibraryLeaseData(); |
|
|
return $this->renderSuccess(compact('data')); |
|
|
return $this->renderSuccess(compact('data')); |
|
|
} |
|
|
} |
|
|
|