erp_old/app/api/controller/IndexController.php

66 lines
1.7 KiB
PHP
Raw Normal View History

2023-09-20 13:54:09 +08:00
<?php
namespace app\api\controller;
use app\admin\lists\express\ExpressLists;
2024-05-15 14:22:40 +08:00
use app\admin\logic\operation\OpurchaseclassLogic;
2024-01-20 22:40:47 +08:00
use app\admin\validate\tools\GenerateTableValidate;
use app\admin\logic\tools\GeneratorLogic;
use app\common\model\goods\Goods;
use app\common\model\goods\Goodsclass;
use app\common\model\retail\Cashierclass;
2024-05-08 10:27:06 +08:00
use app\common\service\pay\PayService;
2024-05-16 12:00:48 +08:00
use app\common\service\PushService;
2024-05-14 16:11:08 +08:00
use app\common\service\wechat\WeChatMnpService;
2024-05-08 10:27:06 +08:00
use app\common\service\wechat\WeChatOaService;
2024-05-14 17:30:17 +08:00
use DateTime;
2024-05-18 14:01:51 +08:00
use Firebase\JWT\JWT;
use Firebase\JWT\Key;
use stdClass;
2024-05-17 16:18:21 +08:00
use think\facade\Db;
2024-05-10 11:31:45 +08:00
use Webman\Config;
2024-05-10 14:21:10 +08:00
use Webman\RedisQueue\Redis;
2024-05-10 11:31:45 +08:00
use Yansongda\Pay\Pay;
2024-05-10 14:21:10 +08:00
use Webman\Push\Api;
2024-05-18 14:01:51 +08:00
use JPush\Client as JPush;
use support\Log;
use support\Redis as SupportRedis;
2024-01-20 22:40:47 +08:00
2024-04-26 11:26:12 +08:00
class IndexController extends BaseApiController
2024-01-20 22:40:47 +08:00
{
public $notNeedLogin = ['index','app_update','express_list'];
2024-04-26 11:26:12 +08:00
2024-01-20 22:40:47 +08:00
public function index()
{
return json(['msg' =>create_password(123456, '11d3')]);
2023-09-20 13:54:09 +08:00
}
2024-01-20 22:40:47 +08:00
/**
* @notes 下载文件
*/
public function download()
{
$params = (new GenerateTableValidate())->goCheck('download');
$result = GeneratorLogic::download($params['file']);
if (false === $result) {
return $this->fail(GeneratorLogic::getError() ?: '下载失败');
}
return response()->download($result, 'webman-curd.zip');
}
2024-05-17 16:18:21 +08:00
/**
* @notes 获取app更新信息
*/
public function app_update(){
$find= Db::name('app_update')->where('type',2)->order('id','desc')->findOrEmpty();
return $this->success('ok',$find);
}
/**
* @notes 获取快递列表
*/
public function express_list(){
return $this->dataLists(new ExpressLists());
}
2024-01-20 22:40:47 +08:00
}