Commit e07458d9 authored by rlgy's avatar rlgy

空投

parent 2659bb12
<?php
/**
* Created by PhpStorm.
* User: rlgyzhcn
* Date: 18-6-13
* Time: 下午5:28
*/
use common\models\pwallet\InvestmentType;
$type = InvestmentType::getList(1, 999, []);
?>
<div style="padding: 5px 20px;">
<br>
<form id="addData">
<input name="_csrf" type="hidden" value="<?= Yii::$app->request->getCsrfToken() ?>">
<div class="input-group my-group">
<span class="input-group-addon">UID</span>
<input name="uid" type="text" class="form-control">
</div>
<div class="input-group my-group">
<span class="input-group-addon">数量</span>
<input name="count" type="text" class="form-control">
</div>
<div class="input-group my-group">
<span class="input-group-addon">类型</span>
<select name="type" class="my-select select_row" style="border-radius: 0 4px 4px 0">
<?php if ($type['count'] > 0): ?>
<?php foreach ($type['data'] as $item): ?>
<option value="<?= $item['id'] ?>"><?= $item['name'] ?></option>
<?php endforeach; ?>
<?php endif; ?>
</select>
</div>
</form>
</div>
\ No newline at end of file
<?php
/**
* Created by PhpStorm.
* User: rlgyzhcn
* Date: 18-6-13
* Time: 下午3:27
*/
$this->registerJsFile('@web/js/investment/index.js');
?>
<h4>空投管理</h4>
<div class="layui-row">
<div class="layui-col-md8">
<form class="layui-form">
<div class="layui-inline">
<label class="layui-form-label" style="width: 100px;margin-bottom: 0">状态</label>
<div class="layui-input-inline">
<select name="status">
<option value="all">全部</option>
<option value="0">未处理</option>
<option value="1">已处理</option>
</select>
</div>
</div>
<div class="layui-inline">
<div class="layui-input-inline">
<input name="uid" class="layui-input" placeholder="UID">
</div>
</div>
<div class="layui-inline">
<div class="layui-input-inline">
<input name="coin" class="layui-input" placeholder="币种">
</div>
</div>
<div class="layui-inline">
<button class="layui-btn">搜索</button>
<button class="layui-btn" type="reset">重置</button>
<button class="layui-btn" id="add1">添加数据</button>
<button class="layui-btn" id="add2">导入文件</button>
</div>
</form>
</div>
<div class="layui-col-md4">
</div>
</div>
<div class="layui-row">
<table class="layui-table" id="table1"></table>
</div>
\ No newline at end of file
/**
* @author rlgyzhcn@qq.com
*/
var table = layui.table;
var form = layui.form;
form.render();
table.render({
elem: "#table1",
page: 1,
limit: 10,
cols: [[
{field: 'uid', title: "UID"},
{field: 'nickname', title: "昵称"},
{field: 'coin', title: "币种"},
{field: 'count', title: "数量"},
{field: 'type', title: "类型"},
{field: 'status', title: "状态"},
{field: 'address', title: "地址"},
{field: 'create_at', title: "添加时间"},
{field: 'dealwith_at', title: "处理时间"}
]]
});
$("#add1").click(function () {
//打开弹窗
$.get('/admin/investment/add-one', {}, function (str) {
var index = layer.open({
type: 1,
title: '添加数据',
id: 'add-one',
skin: 'layui-layer-lan',
area: ['320px', 'auto'],
content: str,
btn: ['确认', '取消'],
btn1: function () {
var uid = $('#addData input[name="uid"]').val();
var count = $('#addData input[name="count"]').val();
var type = $('#addData input[name="type"]').val();
if (uid !== "" && count !== "") {
$btn = $('.layui-layer-btn0').button('loading');
$.post('/admin/investment/add-one', {}, function (rev) {
});
$btn.button('reset');
} else {
layer.msg("请输入完整!");
}
return false;
}
});
layui.form.render();
});
return false;
});
$("#add2").click(function () {
return false;
});
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment