2023-09-20 13:54:09 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace app\api\controller;
|
|
|
|
|
2024-05-28 17:37:52 +08:00
|
|
|
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;
|
2024-05-24 16:06:27 +08:00
|
|
|
use app\common\model\goods\Goods;
|
|
|
|
use app\common\model\goods\Goodsclass;
|
2024-05-25 16:37:01 +08:00
|
|
|
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;
|
2024-05-25 10:38:29 +08:00
|
|
|
use support\Log;
|
2024-05-25 16:37:01 +08:00
|
|
|
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
|
|
|
{
|
2024-05-28 17:37:52 +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()
|
|
|
|
{
|
2024-05-28 17:37:52 +08:00
|
|
|
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);
|
|
|
|
}
|
2024-05-28 17:37:52 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @notes 获取快递列表
|
|
|
|
*/
|
|
|
|
public function express_list(){
|
|
|
|
return $this->dataLists(new ExpressLists());
|
|
|
|
}
|
2024-01-20 22:40:47 +08:00
|
|
|
}
|