Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
token
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wallet
token
Commits
e07458d9
Commit
e07458d9
authored
Jun 20, 2018
by
rlgy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
空投
parent
2659bb12
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
144 additions
and
0 deletions
+144
-0
form_add_one.php
backend/views/investment/form_add_one.php
+37
-0
index.php
backend/views/investment/index.php
+49
-0
index.js
backend/web/js/investment/index.js
+58
-0
No files found.
backend/views/investment/form_add_one.php
0 → 100644
View file @
e07458d9
<?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
backend/views/investment/index.php
0 → 100644
View file @
e07458d9
<?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
backend/web/js/investment/index.js
0 → 100644
View file @
e07458d9
/**
* @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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment