- 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: 新闻自动采集脚本
68 lines
3.5 KiB
JavaScript
Executable File
68 lines
3.5 KiB
JavaScript
Executable File
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
|
|
|
|
var Controller = {
|
|
index: function () {
|
|
// 初始化表格参数配置
|
|
Table.api.init({
|
|
extend: {
|
|
index_url: 'app/his_order/index' + location.search,
|
|
add_url: 'app/his_order/add',
|
|
edit_url: 'app/his_order/edit',
|
|
del_url: 'app/his_order/del',
|
|
multi_url: 'app/his_order/multi',
|
|
import_url: 'app/his_order/import',
|
|
table: 'his_order',
|
|
}
|
|
});
|
|
|
|
var table = $("#table");
|
|
|
|
// 初始化表格
|
|
table.bootstrapTable({
|
|
url: $.fn.bootstrapTable.defaults.extend.index_url,
|
|
pk: 'id',
|
|
sortName: 'id',
|
|
columns: [
|
|
[
|
|
{checkbox: true},
|
|
{field: 'id', title: __('Id')},
|
|
{field: 'daili_name', title: __('所属代理'), operate: 'LIKE'},
|
|
{field: 'serial_no', title: __('Serial_no')},
|
|
{field: 'user_name', title: '用户'},
|
|
{field: 'createtime', title: __('Createtime'),formatter: Controller.api.createtime,
|
|
operate:'RANGE', addclass:'datetimerange', autocomplete:false,
|
|
formatter: Table.api.formatter.datetime},
|
|
{field: 'symbol', title: __('Symbol'), searchList: {"btcusdt":__('Btcusdt'),"bchusdt":__('Bchusdt'),"ethusdt":__('Ethusdt'),"ltcusdt":__('Ltcusdt'),"eosusdt":__('Eosusdt'),"etcusdt":__('Etcusdt')}, formatter: Table.api.formatter.normal},
|
|
{field: 'trade_num', title: __('Trade_num'), operate:'BETWEEN'},
|
|
{field: 'trade_cycle', title: __('Trade_cycle')},
|
|
{field: 'expect_percent', title: __('Expect_percent'), operate:'BETWEEN'},
|
|
{field: 'expect_income', title: __('Expect_income'), operate:'BETWEEN'},
|
|
{field: 'current_price', title: __('Current_price'), operate:'BETWEEN'},
|
|
{field: 'close_price', title: __('Close_price'), operate:'BETWEEN'},
|
|
{field: 'trade_result_num', title: __('Trade_result_num'), operate:'BETWEEN'},
|
|
{field: 'order_hash', title: __('Order_hash'), operate: 'LIKE'},
|
|
{field: 'open_time', title: __('Open_time')},
|
|
{field: 'trade_result', title: __('Trade_result'), searchList: {"win":__('Trade_result win'),"loss":__('Trade_result loss'),"equal":"平"}, formatter: Table.api.formatter.normal},
|
|
{field: 'rise_or_fall', title: __('Rise_or_fall'), searchList: {"rise":__('Rise_or_fall rise'),"fall":__('Rise_or_fall fall')}, formatter: Table.api.formatter.normal},
|
|
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
|
|
]
|
|
]
|
|
});
|
|
|
|
// 为表格绑定事件
|
|
Table.api.bindevent(table);
|
|
},
|
|
add: function () {
|
|
Controller.api.bindevent();
|
|
},
|
|
edit: function () {
|
|
Controller.api.bindevent();
|
|
},
|
|
api: {
|
|
bindevent: function () {
|
|
Form.api.bindevent($("form[role=form]"));
|
|
}
|
|
}
|
|
};
|
|
return Controller;
|
|
}); |