feat: 后端全量更新 - 含所有本次需求
- Contract.php: 返回合约账户余额(balance_contract) - My.php: 地址管理增加BTC/ETH - AppContract.php: 一键平仓(closeall) - AppProxy.php: 代理专属注册链接 + 分级权限(L1/L2) - site.php: 手续费减半(0.018→0.009) - agent_permission_setup.sql: 代理权限SQL - crypto_news_crawler.py: 新闻自动采集脚本
This commit is contained in:
Executable
+64
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
|
||||
namespace addons\translate;
|
||||
|
||||
use app\common\library\Menu;
|
||||
use think\Addons;
|
||||
|
||||
/**
|
||||
* 插件
|
||||
*/
|
||||
class Translate extends Addons
|
||||
{
|
||||
|
||||
/**
|
||||
* 插件安装方法
|
||||
* @return bool
|
||||
*/
|
||||
public function install()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 插件卸载方法
|
||||
* @return bool
|
||||
*/
|
||||
public function uninstall()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 插件启用方法
|
||||
* @return bool
|
||||
*/
|
||||
public function enable()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 插件禁用方法
|
||||
* @return bool
|
||||
*/
|
||||
public function disable()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 应用初始化
|
||||
*/
|
||||
public function appInit()
|
||||
{
|
||||
\think\Loader::addNamespace('Stichoza\GoogleTranslate', ADDON_PATH . 'translate' . DS . 'library' . DS . 'google-translate-php' . DS . 'src' . DS);
|
||||
\think\Loader::addNamespace('GuzzleHttp\Psr7', ADDON_PATH . 'translate' . DS . 'library' . DS . 'guzzlehttp' . DS . 'psr7' . DS . 'src' . DS);
|
||||
\think\Loader::addNamespace('GuzzleHttp', ADDON_PATH . 'translate' . DS . 'library' . DS . 'guzzlehttp' . DS. 'guzzle' . DS . 'src'. DS);
|
||||
\think\Loader::addNamespace('GuzzleHttp\Promise', ADDON_PATH . 'translate' . DS . 'library' . DS . 'guzzlehttp' . DS . 'promises' . DS . 'src'. DS);
|
||||
require_once ADDON_PATH . 'translate' . DS . 'library' . DS . 'google-translate-php' . DS . 'src'. DS . 'common.php';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user