作者 karlet

feat:重构

@@ -4,8 +4,7 @@ @@ -4,8 +4,7 @@
4 "require": {}, 4 "require": {},
5 "autoload": { 5 "autoload": {
6 "psr-4": { 6 "psr-4": {
7 - "Jiaoyin\\": "./src/network/",  
8 - "Jiaoyin\\Test\\": "./test/" 7 + "Jiaoyin\\": "./src/"
9 }, 8 },
10 "files": [ "src/functions.php" ] 9 "files": [ "src/functions.php" ]
11 } 10 }
1 <?php 1 <?php
2 namespace Jiaoyin; 2 namespace Jiaoyin;
3 3
4 -use Jiaoyin;  
5 -use Jiaoyin\Curl;  
6 -  
7 /* 4 /*
8 binance合约接口 5 binance合约接口
9 */ 6 */
1 <?php 1 <?php
2 namespace Jiaoyin; 2 namespace Jiaoyin;
3 3
4 -use Jiaoyin;  
5 -use Jiaoyin\Curl;  
6 -  
7 /* 4 /*
8 binance现货接口 5 binance现货接口
9 */ 6 */
1 <?php 1 <?php
2 namespace Jiaoyin; 2 namespace Jiaoyin;
3 3
4 -use Jiaoyin;  
5 class Curl{ 4 class Curl{
6 5
7 // get 获取数据 6 // get 获取数据
1 <?php 1 <?php
2 namespace Jiaoyin; 2 namespace Jiaoyin;
3 3
4 -use Jiaoyin;  
5 class Feishu{ 4 class Feishu{
6 //发送预警通知 5 //发送预警通知
7 static public function send($content) 6 static public function send($content)
1 <?php 1 <?php
2 namespace Jiaoyin; 2 namespace Jiaoyin;
3 3
4 -use Jiaoyin;  
5 -use Jiaoyin\MongoPool;  
6 -  
7 class MongoCli 4 class MongoCli
8 { 5 {
9 private $pool; 6 private $pool;
1 <?php 1 <?php
2 namespace Jiaoyin; 2 namespace Jiaoyin;
3 3
4 -use Jiaoyin; 4 +use MongoDB\Client;
5 use Swoole\Coroutine; 5 use Swoole\Coroutine;
6 use Swoole\Coroutine\Channel; 6 use Swoole\Coroutine\Channel;
7 -use MongoDB\Client; 7 +
8 class MongoPool 8 class MongoPool
9 { 9 {
10 private $pool; 10 private $pool;
1 <?php 1 <?php
2 namespace Jiaoyin; 2 namespace Jiaoyin;
3 3
4 -use Jiaoyin;  
5 use Swoole\Database\MysqliConfig; 4 use Swoole\Database\MysqliConfig;
6 use Swoole\Database\MysqliPool; 5 use Swoole\Database\MysqliPool;
7 6
1 <?php 1 <?php
2 namespace Jiaoyin; 2 namespace Jiaoyin;
3 3
4 -use Jiaoyin;  
5 use Swoole\Database\RedisConfig; 4 use Swoole\Database\RedisConfig;
6 use Swoole\Database\RedisPool; 5 use Swoole\Database\RedisPool;
7 6
1 <?php 1 <?php
2 namespace Jiaoyin; 2 namespace Jiaoyin;
3 3
4 -use Jiaoyin;  
5 use Swoole\Coroutine; 4 use Swoole\Coroutine;
6 use Swoole\Coroutine\Http\Client; 5 use Swoole\Coroutine\Http\Client;
7 use Swoole\WebSocket\Frame; 6 use Swoole\WebSocket\Frame;
1 -<?php  
2 -namespace Jiaoyin\Test;  
3 -  
4 -class Test{  
5 - public function test(){  
6 - echo 'test';  
7 - }  
8 -}