- 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: 新闻自动采集脚本
60 lines
1.2 KiB
PHP
Executable File
60 lines
1.2 KiB
PHP
Executable File
<?php
|
|
|
|
namespace addons\btpanel;
|
|
|
|
use app\common\library\Menu;
|
|
use think\Addons;
|
|
|
|
/**
|
|
* 插件
|
|
*/
|
|
class Btpanel extends Addons
|
|
{
|
|
|
|
/**
|
|
* 插件安装方法
|
|
* @return bool
|
|
*/
|
|
public function install()
|
|
{
|
|
$menu = [];
|
|
$config_file = ADDON_PATH . "btpanel" . DS . 'config' . DS . "menu.php";
|
|
if (is_file($config_file)) {
|
|
$menu = include $config_file;
|
|
}
|
|
if ($menu) {
|
|
Menu::create($menu);
|
|
}
|
|
return true;
|
|
}
|
|
|
|
/**
|
|
* 插件卸载方法
|
|
* @return bool
|
|
*/
|
|
public function uninstall()
|
|
{
|
|
$info = get_addon_info('btpanel');
|
|
Menu::delete(isset($info['first_menu']) ? $info['first_menu'] : 'btpanel');
|
|
return true;
|
|
}
|
|
|
|
/**
|
|
* 插件启用方法
|
|
*/
|
|
public function enable()
|
|
{
|
|
$info = get_addon_info('btpanel');
|
|
Menu::enable(isset($info['first_menu']) ? $info['first_menu'] : 'btpanel');
|
|
}
|
|
|
|
/**
|
|
* 插件禁用方法
|
|
*/
|
|
public function disable()
|
|
{
|
|
$info = get_addon_info('btpanel');
|
|
Menu::disable(isset($info['first_menu']) ? $info['first_menu'] : 'btpanel');
|
|
}
|
|
}
|