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
d563234d
Commit
d563234d
authored
Jun 22, 2018
by
rlgy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
空投管理
parent
5b9acaa8
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
47 additions
and
8 deletions
+47
-8
InvestmentController.php
backend/controllers/InvestmentController.php
+20
-0
form_add_one.php
backend/views/investment/form_add_one.php
+1
-1
index.php
backend/views/investment/index.php
+22
-5
index.js
backend/web/js/investment/index.js
+2
-1
Investment.php
common/models/pwallet/Investment.php
+2
-1
No files found.
backend/controllers/InvestmentController.php
View file @
d563234d
...
@@ -16,6 +16,26 @@ class InvestmentController extends BaseController
...
@@ -16,6 +16,26 @@ class InvestmentController extends BaseController
{
{
public
function
actionIndex
()
public
function
actionIndex
()
{
{
if
(
Yii
::
$app
->
request
->
isAjax
)
{
$request
=
Yii
::
$app
->
request
;
$page
=
$request
->
get
(
'page'
,
1
);
$limit
=
$request
->
get
(
'limit'
,
10
);
$status
=
$request
->
get
(
'status'
,
0
);
$uid
=
$request
->
get
(
'uid'
,
0
);
$coin
=
$request
->
get
(
'coin'
,
''
);
$where
=
[];
if
(
$uid
)
{
$where
[]
=
[
'uid'
=>
$uid
];
}
if
(
$status
)
{
$where
[]
=
[
'status'
=>
$status
];
}
if
(
$coin
)
{
$where
[]
=
[
'coin'
=>
$coin
];
}
Yii
::
$app
->
response
->
format
=
'json'
;
return
Investment
::
getList
(
$page
,
$limit
,
$where
);
}
return
$this
->
render
(
'index'
);
return
$this
->
render
(
'index'
);
}
}
...
...
backend/views/investment/form_add_one.php
View file @
d563234d
...
@@ -28,7 +28,7 @@ $type = InvestmentType::getList(1, 999, []);
...
@@ -28,7 +28,7 @@ $type = InvestmentType::getList(1, 999, []);
</div>
</div>
<div
class=
"input-group my-group"
>
<div
class=
"input-group my-group"
>
<span
class=
"input-group-addon"
>
类型
</span>
<span
class=
"input-group-addon"
>
类型
</span>
<select
name=
"t
ype
"
class=
"my-select select_row"
style=
"border-radius: 0 4px 4px 0"
>
<select
name=
"t
id
"
class=
"my-select select_row"
style=
"border-radius: 0 4px 4px 0"
>
<?php
if
(
$type
[
'count'
]
>
0
)
:
?>
<?php
if
(
$type
[
'count'
]
>
0
)
:
?>
<?php
foreach
(
$type
[
'data'
]
as
$item
)
:
?>
<?php
foreach
(
$type
[
'data'
]
as
$item
)
:
?>
<option
value=
"
<?=
$item
[
'id'
]
?>
"
>
<?=
$item
[
'name'
]
?>
</option>
<option
value=
"
<?=
$item
[
'id'
]
?>
"
>
<?=
$item
[
'name'
]
?>
</option>
...
...
backend/views/investment/index.php
View file @
d563234d
...
@@ -6,18 +6,35 @@
...
@@ -6,18 +6,35 @@
* Time: 下午3:27
* Time: 下午3:27
*/
*/
$this
->
registerJsFile
(
'@web/js/investment/index.js'
);
$this
->
registerJsFile
(
'@web/js/investment/index.js'
);
use
common\models\pwallet\InvestmentType
;
$type
=
InvestmentType
::
getList
(
1
,
999
,
[]);
?>
?>
<h4>
空投管理
</h4>
<h4>
空投管理
</h4>
<div
class=
"layui-row"
>
<div
class=
"layui-row"
>
<div
class=
"layui-col-md
8
"
>
<div
class=
"layui-col-md
12
"
>
<form
class=
"layui-form"
>
<form
class=
"layui-form"
>
<div
class=
"layui-inline"
>
<div
class=
"layui-inline"
>
<label
class=
"layui-form-label"
style=
"width:
100px;margin-bottom: 0
"
>
状态
</label>
<label
class=
"layui-form-label"
style=
"width:
45px;margin-bottom: 0; padding-left: 0;text-align: left
"
>
状态
</label>
<div
class=
"layui-input-inline"
>
<div
class=
"layui-input-inline"
>
<select
name=
"status"
>
<select
name=
"status"
>
<option
value=
"all"
>
全部
</option>
<option
value=
"0"
>
全部
</option>
<option
value=
"0"
>
未处理
</option>
<option
value=
"1"
>
未处理
</option>
<option
value=
"1"
>
已处理
</option>
<option
value=
"2"
>
已处理
</option>
</select>
</div>
</div>
<div
class=
"layui-inline"
>
<label
class=
"layui-form-label"
style=
"width: 55px;margin-bottom: 0; padding-left: 10px;text-align: left"
>
类型
</label>
<div
class=
"layui-input-inline"
>
<select
name=
"type"
>
<option
value=
"0"
>
全部
</option>
<?php
if
(
$type
[
'count'
]
>
0
)
:
?>
<?php
foreach
(
$type
[
'data'
]
as
$item
)
:
?>
<option
value=
"
<?=
$item
[
'id'
]
?>
"
>
<?=
$item
[
'name'
]
?>
</option>
<?php
endforeach
;
?>
<?php
endif
;
?>
</select>
</select>
</div>
</div>
</div>
</div>
...
...
backend/web/js/investment/index.js
View file @
d563234d
...
@@ -8,12 +8,13 @@ table.render({
...
@@ -8,12 +8,13 @@ table.render({
elem
:
"#table1"
,
elem
:
"#table1"
,
page
:
1
,
page
:
1
,
limit
:
10
,
limit
:
10
,
url
:
'/admin/investment/index'
,
cols
:
[[
cols
:
[[
{
field
:
'uid'
,
title
:
"UID"
},
{
field
:
'uid'
,
title
:
"UID"
},
{
field
:
'nickname'
,
title
:
"昵称"
},
{
field
:
'nickname'
,
title
:
"昵称"
},
{
field
:
'coin'
,
title
:
"币种"
},
{
field
:
'coin'
,
title
:
"币种"
},
{
field
:
'count'
,
title
:
"数量"
},
{
field
:
'count'
,
title
:
"数量"
},
{
field
:
't
ype
'
,
title
:
"类型"
},
{
field
:
't
id
'
,
title
:
"类型"
},
{
field
:
'status'
,
title
:
"状态"
},
{
field
:
'status'
,
title
:
"状态"
},
{
field
:
'address'
,
title
:
"地址"
},
{
field
:
'address'
,
title
:
"地址"
},
{
field
:
'create_at'
,
title
:
"添加时间"
},
{
field
:
'create_at'
,
title
:
"添加时间"
},
...
...
common/models/pwallet/Investment.php
View file @
d563234d
...
@@ -43,7 +43,8 @@ class Investment extends BaseActiveRecord
...
@@ -43,7 +43,8 @@ class Investment extends BaseActiveRecord
{
{
return
[
return
[
[[
'id'
,
'uid'
,
'tid'
],
'integer'
],
[[
'id'
,
'uid'
,
'tid'
],
'integer'
],
[[
'coin'
,
'address'
],
'string'
]
[[
'coin'
,
'address'
],
'string'
],
[[
'count'
],
'default'
]
];
];
}
}
...
...
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