订单管理-->
.welcome .layui-card {border:1px solid #f2f2f2;border-radius:5px;}
.welcome .icon {margin-right:10px;color:#1aa094;}
.welcome .icon-cray {color:#ffb800 !important;}
.welcome .icon-blue {color:#1e9fff !important;}
.welcome .icon-tip {color:#ff5722 !important;}
.welcome .layuimini-qiuck-module {text-align:center;margin-top:10px}
.welcome .layuimini-qiuck-module a i {display:inline-block;width:100%;height:60px;line-height:60px;text-align:center;border-radius:2px;font-size:30px;background-color:#F8F8F8;color:#333;transition:all .3s;-webkit-transition:all .3s;}
.welcome .layuimini-qiuck-module a cite {position:relative;top:2px;display:block;color:#666;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;font-size:14px;}
.welcome .welcome-module {width:100%;height:210px;}
.welcome .panel {background-color:#fff;border:1px solid transparent;border-radius:3px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}
.welcome .panel-body {padding:10px}
.welcome .panel-title {margin-top:0;margin-bottom:0;font-size:12px;color:inherit}
.welcome .label {display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em;margin-top:.3em;}
.welcome .layui-red {color:red}
.welcome .main_btn > p {height:40px;}
.welcome .layui-bg-number {background-color:#F8F8F8;}
.welcome .layuimini-notice:hover {background:#f6f6f6;}
.welcome .layuimini-notice {padding:7px 16px;clear:both;font-size:12px !important;cursor:pointer;position:relative;transition:background 0.2s ease-in-out;}
.welcome .layuimini-notice-title,.layuimini-notice-label {padding-right:70px !important;text-overflow:ellipsis !important;overflow:hidden !important;white-space:nowrap !important;}
.welcome .layuimini-notice-title {line-height:28px;font-size:14px;}
.welcome .layuimini-notice-extra {position:absolute;top:50%;margin-top:-8px;right:16px;display:inline-block;height:16px;color:#999;}
.welcome .layui-card {border:1px solid #f2f2f2;border-radius:5px;}
.welcome .icon {margin-right:10px;color:#1aa094;}
.welcome .icon-cray {color:#ffb800 !important;}
.welcome .icon-blue {color:#1e9fff !important;}
.welcome .icon-tip {color:#ff5722 !important;}
.welcome .layuimini-qiuck-module {text-align:center;margin-top:10px}
.welcome .layuimini-qiuck-module a i {display:inline-block;width:100%;height:60px;line-height:60px;text-align:center;border-radius:2px;font-size:30px;background-color:#F8F8F8;color:#333;transition:all .3s;-webkit-transition:all .3s;}
.welcome .layuimini-qiuck-module a cite {position:relative;top:2px;display:block;color:#666;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;font-size:14px;}
.welcome .welcome-module {width:100%;height:210px;}
.welcome .panel {background-color:#fff;border:1px solid transparent;border-radius:3px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}
.welcome .panel-body {padding:10px}
.welcome .panel-title {margin-top:0;margin-bottom:0;font-size:12px;color:inherit}
.welcome .label {display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em;margin-top:.3em;}
.welcome .layui-red {color:red}
.welcome .main_btn > p {height:40px;}
.welcome .layui-bg-number {background-color:#F8F8F8;}
.welcome .layuimini-notice:hover {background:#f6f6f6;}
.welcome .layuimini-notice {padding:7px 16px;clear:both;font-size:12px !important;cursor:pointer;position:relative;transition:background 0.2s ease-in-out;}
.welcome .layuimini-notice-title,.layuimini-notice-label {padding-right:70px !important;text-overflow:ellipsis !important;overflow:hidden !important;white-space:nowrap !important;}
.welcome .layuimini-notice-title {line-height:28px;font-size:14px;}
.welcome .layuimini-notice-extra {position:absolute;top:50%;margin-top:-8px;right:16px;display:inline-block;height:16px;color:#999;}
.viewport{
width:100%;
}
/** 应用快捷块样式 */
.console-app-group {
padding: 16px;
border-radius: 4px;
text-align: center;
background-color: #fff;
cursor: pointer;
display: block;
}
.console-app-group .console-app-icon {
width: 32px;
height: 32px;
line-height: 32px;
margin-bottom: 6px;
display: inline-block;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
font-size: 32px;
color: #69c0ff;
}
.console-app-group:hover {
box-shadow: 0 0 15px rgba(0, 0, 0, .08);
}
/** //应用快捷块样式 */
/** 小组成员 */
.console-user-group {
position: relative;
padding: 10px 0 10px 60px;
}
.console-user-group .console-user-group-head {
width: 32px;
height: 32px;
position: absolute;
top: 50%;
left: 12px;
margin-top: -16px;
border-radius: 50%;
}
.console-user-group .layui-badge {
position: absolute;
top: 50%;
right: 8px;
margin-top: -10px;
}
.console-user-group .console-user-group-name {
line-height: 1.2;
}
.console-user-group .console-user-group-desc {
color: #8c8c8c;
line-height: 1;
font-size: 12px;
margin-top: 5px;
}
.gg-time{
position: absolute;
right: 10px;
top: 13px;
}
/** 卡片轮播图样式 */
.admin-carousel .layui-carousel-ind {
position: absolute;
top: -41px;
text-align: right;
}
.admin-carousel .layui-carousel-ind ul {
background: 0 0;
}
.admin-carousel .layui-carousel-ind li {
background-color: #e2e2e2;
}
.admin-carousel .layui-carousel-ind li.layui-this {
background-color: #999;
}
/** 广告位轮播图 */
.admin-news .layui-carousel-ind {
height: 45px;
}
.admin-news a {
display: block;
line-height: 70px;
text-align: center;
}
/** 最新动态时间线 */
.layui-timeline-dynamic .layui-timeline-item {
padding-bottom: 0;
}
.layui-timeline-dynamic .layui-timeline-item:before {
top: 16px;
}
.layui-timeline-dynamic .layui-timeline-axis {
width: 9px;
height: 9px;
left: 1px;
top: 7px;
background-color: #cbd0db;
}
.layui-timeline-dynamic .layui-timeline-axis.active {
background-color: #0c64eb;
box-shadow: 0 0 0 2px rgba(12, 100, 235, .3);
}
.dynamic-card-body {
box-sizing: border-box;
overflow: hidden;
}
.dynamic-card-body:hover {
overflow-y: auto;
padding-right: 9px;
}
/** 优先级徽章 */
.layui-badge-priority {
border-radius: 50%;
width: 20px;
height: 20px;
padding: 0;
line-height: 18px;
border-width: 2px;
font-weight: 600;
}
我的信息
用户名 | {$row.username}(UID:{$row.id}) |
{$row.qq} | |
上级UID | {$row.uid}[/td] [tr] |
执行时间 | {$row.zctime}[/td] |
到期时间 | {$row.endtime} |
代{过}{滤}理余额 | {$row.money} |
{if $row.api == 1}
API信息
KEY | {$row.key} |
操作 | 重置 |
{/if}
{if $notice_count > 0}
最新公告
{foreach $notice as $row}
{$row.title}
?
{$row.date}
-->
{/foreach}
{/if}
订单
手机号:
执行时间:
 
提交
[/table] |
|
|
|
|
|
|
卡密: |
|
|
|
|
  |
提交 |
|
|
|
|
|
--> |
|
[table] |
layui.use(['form', 'miniPage', 'table', 'element'], function () {
var form = layui.form,
$ = layui.$,
layer = layui.layer,
miniPage = layui.miniPage,
table = layui.table,
element = layui.element;
// 这里是你的代码逻辑
/**
* 查看公告信息
**/
$('body').on('click', '.layuimini-notice', function () {
var title = $(this).children('.layuimini-notice-title').text(),
noticeTime = $(this).children('.layuimini-notice-extra').text(),
content = $(this).children('.layuimini-notice-content').html();
var html = '\n' +
'' + title + '\n' +
'' + content + '\n' +
'\n';
parent.layer.open({
type: 1,
title: '系统公告' + '' + noticeTime + '',
area: '300px;',
shade: 0.8,
id: 'layuimini-notice',
btn: ['确定', '取消'],
btnAlign: 'c',
moveType: 1,
content: html,
success: function (layero) {
var btn = layero.find('.layui-layer-btn');
//btn.find('.layui-layer-btn0').attr({
// href: 'https://gitee.com/zhongshaofa/layuimini',
// target: '_blank'
//});
}
});
});
table.render({
elem: '#currentTableId',
url: '{:_url("ajax/order/act/list")}',
toolbar: '#toolbarDemo',
defaultToolbar: ['filter', 'exports', 'print', {
title: '提示',
layEvent: 'LAYTABLE_TIPS',
icon: 'layui-icon-tips'
}],
cols: [[
{type: "checkbox", width: 50},
{field: 'id', width: 80, title: 'ID', sort: true},
{field: 'phone', width: 125, title: '手机号'},
{field: 'time', width: 125, title: '剩余时间'},
// {field: 'nzphone', width: 125, title: '闹钟手机号'},
{width: 120, title: '订单状态', toolbar: '#currentStatus', align: "center"},
{field: 'lasttime', width: 180, title: '上次执行', sort: true},
{field: 'addtime', width: 180, title: '创建时间', sort: true},
{title: '操作', minWidth: 150, toolbar: '#currentTableBar', align: "center"}
]],
limits: [10, 15, 20, 25, 50, 100],
limit: 15,
page: true,
parseData: function (res) { //将原始数据解析成 table 组件所规定的数据,res为从url中get到的数据
var result;
console.log(this);
console.log(JSON.stringify(res));
if (this.page.curr) {
result = res.data.slice(this.limit * (this.page.curr - 1), this.limit * this.page.curr);
} else {
result = res.data.slice(0, this.limit);
}
return {
"code": res.code, //解析接口状态
"msg": res.msg, //解析提示文本
"count": res.count, //解析数据长度
"data": result //解析数据列表
};
},
skin: 'line'
});
//重置KEY
form.on('submit(setKey)', function (data) {
layer.confirm('真的要重置吗', function (index) {
$.post("{:_url('ajax/change/act/key')}", null, function(res) {
if (res.code == "ok") {
layer.msg('重置成功', {
icon: 1,
time: 1000
}, function () {
miniPage.hashHome();
});
} else {
layer.msg(res.msg, {
icon: 2,
time: 1000
});
}
});
layer.close(index);
});
});
//设置IP白名单
form.on('submit(setApiIp)', function (data) {
var apiip = $("#apiip").val();
layer.open({
title: '设置IP白名单',
btn: ['保存', '取消'],
yes: function (index, layero) {
var ip = document.getElementById("ip").value;
$.post("{:_url('ajax/change/act/apiip')}", {ip: ip}, function(res) {
if (res.code == "ok") {
layer.msg('设置成功', {
icon: 1,
time: 1000
}, function () {
miniPage.hashHome();
});
} else {
layer.msg(res.msg, {
icon: 2,
time: 1000
});
}
});
},
});
});
//监听提交
form.on('submit(saveBtn)', function (data) {
$.post("{:_url('ajax/order/act/add')}", data.field, function(res) {
if (res.code == "ok") {
layer.msg('提交成功', {
icon: 1,
time: 1000
}, function () {
miniPage.hashHome();
});
} else {
layer.msg(res.msg, {
icon: 2,
time: 1000
});
}
});
return false;
});
/**
* toolbar事件监听
*/
table.on('toolbar(currentTableFilter)', function (obj) {
if (obj.event === 'deleteEnd') { // 监听添加操作
layer.confirm('真的删除行么', function (index) {
$.post("{:_url('ajax/order/act/delete3')}", null, function(res) {
if (res.code == "ok") {
layer.msg('删除成功', {
icon: 1,
time: 1000
}, function () {
miniPage.hashHome();
});
} else {
layer.msg(res.msg, {
icon: 2,
time: 1000
});
}
});
layer.close(index);
});
} else if (obj.event === 'delete') { // 监听删除操作
var checkStatus = table.checkStatus('currentTableId')
, data = checkStatus.data;
layer.confirm('真的删除行么', function (index) {
$.post("{:_url('ajax/order/act/delete2')}", {data: data}, function(res) {
if (res.code == "ok") {
layer.msg('删除成功', {
icon: 1,
time: 1000
}, function () {
miniPage.hashHome();
});
} else {
layer.msg(res.msg, {
icon: 2,
time: 1000
});
}
});
layer.close(index);
});
}
});
//监听表格复选框选择
table.on('checkbox(currentTableFilter)', function (obj) {
console.log(obj)
});
table.on('tool(currentTableFilter)', function (obj) {
var data = obj.data;
if (obj.event === 'delete') {
layer.confirm('真的删除行么', function (index) {
$.post("{:_url('ajax/order/act/delete')}", data, function(res) {
if (res.code == "ok") {
layer.msg('删除成功', {
icon: 1,
time: 1000
}, function () {
miniPage.hashHome();
});
} else {
layer.msg(res.msg, {
icon: 2,
time: 1000
});
}
});
layer.close(index);
});
}
});
});
form.render();
$('#submitBtn1').on('click', function () {
var kami = $('input[name="kami"]').val();
$.post("/index/ajax/recharge/token/{$token}", {kami: kami}, function(res) {
if (res.code == "ok") {
layer.msg('充值成功', {
icon: 1,
time: 1000
}, function () {
miniPage.hashHome();
});
} else {
layer.msg(res.msg, {
icon: 2,
time: 1000
});
}
});
return false;
});
});