12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- <?php
- namespace app\controller\admin\v1\serve;
- use app\controller\admin\AuthController;
- use app\services\serve\ServeServices;
- use app\services\other\ExpressServices;
- use crmeb\services\SystemConfigService;
- use think\facade\App;
- class Export extends AuthController
- {
-
- public function __construct(App $app, ExpressServices $services)
- {
- parent::__construct($app);
- $this->services = $services;
- }
-
- public function getExportAll()
- {
- return $this->success($this->services->expressList());
- }
-
- public function getExportTemp(ServeServices $services)
- {
- [$com] = $this->request->getMore([
- ['com', ''],
- ], true);
- return $this->success($services->express()->temp($com));
- }
-
- public function dumpIsOpen(ServeServices $services)
- {
- $userInfo = $services->user()->getUser();
- $res = false;
- if ($userInfo['dump']['open']) {
- $res = true;
- $data = SystemConfigService::more(['config_export_siid', 'config_export_com', 'config_export_to_name', 'config_export_to_tel', 'config_export_to_address']);
- if (!$data['config_export_siid']
- && !$data['config_export_com']
- && !$data['config_export_to_name']
- && !$data['config_export_to_tel']
- && !$data['config_export_to_address']
- ) {
- $res = false;
- }
- }
- return $this->success(['isOpen' => $res]);
- }
- }
|