- 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: 新闻自动采集脚本
66 lines
3.5 KiB
JavaScript
Executable File
66 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/app_coin_trade/index' + location.search,
|
|
add_url: 'app/app_coin_trade/add',
|
|
edit_url: 'app/app_coin_trade/edit',
|
|
del_url: 'app/app_coin_trade/del',
|
|
// multi_url: 'app/app_coin_trade/multi',
|
|
// import_url: 'app/app_coin_trade/import',
|
|
table: 'app_coin_trade',
|
|
}
|
|
});
|
|
|
|
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: 'order_sn', title: __('Order_sn'), operate: 'LIKE'},
|
|
{field: 'user_id', title: __('用户ID')},
|
|
{field: 'user_name', title: __('用户')},
|
|
{field: 'curr_name', title: __('币种')},
|
|
{field: 'type', title: __('Type'), searchList: {"sell":__('Type sell'),"buy":__('Type buy')}, formatter: Table.api.formatter.normal},
|
|
{field: 'cart', title: __('Cart'), searchList: {"market":__('Cart market'),"limit":__('Cart limit')}, formatter: Table.api.formatter.normal},
|
|
{field: 'num', title: __('Num'), operate:'BETWEEN'},
|
|
{field: 'price', title: __('Price'), operate:'BETWEEN'},
|
|
{field: 'amount', title: __('Amount'), operate:'BETWEEN'},
|
|
{field: 'have_num', title: __('Have_num'), operate:'BETWEEN'},
|
|
{field: 'status', title: __('Status'), searchList: {"0":__('Status 0'),"1":__('Status 1'),"2":__('Status 2'),"3":__('Status 3')}, formatter: Table.api.formatter.status},
|
|
{field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
|
|
{field: 'updatetime', title: __('Updatetime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
|
|
{field: 'canceltime', title: __('Canceltime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
|
|
{field: 'finishtime', title: __('Finishtime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
|
|
{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;
|
|
}); |