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
7707b03d
Commit
7707b03d
authored
Nov 05, 2018
by
ZhuChunYang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加时时彩查询接口
parent
33866811
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
62 additions
and
2 deletions
+62
-2
index.js
backend/web/js/applicate-rank/index.js
+16
-2
CoinLottery.php
common/models/psources/CoinLottery.php
+10
-0
LotteryController.php
h5/controllers/LotteryController.php
+36
-0
No files found.
backend/web/js/applicate-rank/index.js
View file @
7707b03d
...
@@ -10,7 +10,7 @@ table1.render({
...
@@ -10,7 +10,7 @@ table1.render({
cols
:
[[
cols
:
[[
{
field
:
'id'
,
title
:
'应用id'
},
{
field
:
'id'
,
title
:
'应用id'
},
{
field
:
'name'
,
title
:
'应用名称'
},
{
field
:
'name'
,
title
:
'应用名称'
},
{
field
:
'sort'
,
title
:
'排序'
},
{
field
:
'sort'
,
title
:
'排序'
,
edit
:
'text'
},
{
title
:
'操作'
,
templet
:
'#operTpl'
},
{
title
:
'操作'
,
templet
:
'#operTpl'
},
]]
]]
});
});
...
@@ -21,7 +21,7 @@ table2.render({
...
@@ -21,7 +21,7 @@ table2.render({
cols
:
[[
cols
:
[[
{
field
:
'id'
,
title
:
'应用id'
},
{
field
:
'id'
,
title
:
'应用id'
},
{
field
:
'name'
,
title
:
'应用名称'
},
{
field
:
'name'
,
title
:
'应用名称'
},
{
field
:
'sort'
,
title
:
'排序'
},
{
field
:
'sort'
,
title
:
'排序'
,
edit
:
'text'
},
{
title
:
'操作'
,
templet
:
'#operTpl'
},
{
title
:
'操作'
,
templet
:
'#operTpl'
},
]]
]]
});
});
...
@@ -98,3 +98,17 @@ function after_close_add(reflush = true) {
...
@@ -98,3 +98,17 @@ function after_close_add(reflush = true) {
$
(
'select[name="applicate_id"]'
).
val
(
0
);
$
(
'select[name="applicate_id"]'
).
val
(
0
);
form
.
render
();
form
.
render
();
}
}
//监听单元格编辑
table
.
on
(
'edit(table1)'
,
function
(
obj
){
var
value
=
obj
.
value
;
//得到修改后的值
var
data
=
obj
.
data
;
//得到所在行所有键值
$
.
get
(
'/admin/applicate-rank/set-sort'
,
{
id
:
data
.
id
,
type
:
data
.
type
,
sort
:
value
},
function
(
rev
)
{
layer
.
msg
(
rev
.
msg
);
if
(
0
==
rev
.
code
)
{
table
.
reload
(
'table1'
,{});
}
else
{
}
});
});
common/models/psources/CoinLottery.php
View file @
7707b03d
...
@@ -52,4 +52,13 @@ class CoinLottery extends BaseActiveRecord
...
@@ -52,4 +52,13 @@ class CoinLottery extends BaseActiveRecord
$coin_lottery
->
save
();
$coin_lottery
->
save
();
}
}
/**
* @return array|null|\yii\db\ActiveRecord
* 获取最新记录
*/
public
static
function
getLastRecord
()
{
return
self
::
find
()
->
orderBy
([
'id'
=>
SORT_DESC
])
->
asArray
()
->
one
();
}
}
}
\ No newline at end of file
h5/controllers/LotteryController.php
0 → 100644
View file @
7707b03d
<?php
/**
* Created by PhpStorm.
* User: ZCY
* Date: 2018/11/5
* Time: 10:15
*/
namespace
h5\controllers
;
use
common\models\psources\CoinApplicateRank
;
use
common\models\psources\CoinLottery
;
use
h5\base\ResponseBuild
;
use
Yii
;
use
common\models\psources\Coin
;
use
h5\base\BaseController
;
/**
* Class CoinController
* 时时彩控制器
*
* @package h5\controllers
*/
class
LotteryController
extends
BaseController
{
public
function
actionLotteryInfo
()
{
$lottery_config
=
Yii
::
$app
->
params
[
'lottery'
];
$period_num
=
$lottery_config
[
'period_num'
];
$response_
=
new
ResponseBuild
();
$data
=
CoinLottery
::
getLastRecord
();
$data
[
'end_round'
]
=
$period_num
-
$data
[
'stage'
]
+
$data
[
'round'
];
$response_
->
build
(
ResponseBuild
::
STATUS_SUCCEED
,
''
,
$data
);
return
$response_
;
}
}
\ 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