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
+46
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
namespace app\index\controller;
|
||||
|
||||
use app\common\controller\Frontend;
|
||||
use think\Lang;
|
||||
|
||||
/**
|
||||
* Ajax异步请求接口
|
||||
* @internal
|
||||
*/
|
||||
class Ajax extends Frontend
|
||||
{
|
||||
|
||||
protected $noNeedLogin = ['lang', 'upload'];
|
||||
protected $noNeedRight = ['*'];
|
||||
protected $layout = '';
|
||||
|
||||
/**
|
||||
* 加载语言包
|
||||
*/
|
||||
public function lang()
|
||||
{
|
||||
header('Content-Type: application/javascript');
|
||||
header("Cache-Control: public");
|
||||
header("Pragma: cache");
|
||||
|
||||
$offset = 30 * 60 * 60 * 24; // 缓存一个月
|
||||
header("Expires: " . gmdate("D, d M Y H:i:s", time() + $offset) . " GMT");
|
||||
|
||||
$controllername = input("controllername");
|
||||
$this->loadlang($controllername);
|
||||
//强制输出JSON Object
|
||||
$result = jsonp(Lang::get(), 200, [], ['json_encode_param' => JSON_FORCE_OBJECT | JSON_UNESCAPED_UNICODE]);
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传文件
|
||||
*/
|
||||
public function upload()
|
||||
{
|
||||
return action('api/common/upload');
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user