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
4da3a64e
Commit
4da3a64e
authored
Nov 05, 2018
by
ZhuChunYang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
7707b03d
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
34 additions
and
14 deletions
+34
-14
ApplicationController.php
api/controllers/ApplicationController.php
+9
-0
CoinController.php
api/controllers/CoinController.php
+0
-1
ApplicateRankController.php
backend/controllers/ApplicateRankController.php
+7
-7
index.php
backend/views/applicate-rank/index.php
+2
-2
index.js
backend/web/js/applicate-rank/index.js
+16
-2
LotteryController.php
h5/controllers/LotteryController.php
+0
-2
No files found.
api/controllers/ApplicationController.php
View file @
4da3a64e
...
...
@@ -76,4 +76,12 @@ class ApplicationController extends BaseController
return
[
'code'
=>
1
,
'data'
=>
[],
'msg'
=>
'id不能为空'
];
}
}
/**
* 应用排行榜
*/
public
function
actionRankList
()
{
}
}
\ No newline at end of file
api/controllers/CoinController.php
View file @
4da3a64e
...
...
@@ -67,7 +67,6 @@ class CoinController extends BaseController
}
$select
=
[
'id'
,
'sid'
,
'icon'
,
'name'
,
'nickname'
,
'platform'
,
'chain'
];
$datas
=
CoinRecommend
::
getList
(
$page
,
$limit
,
$condition
,
[],
$select
);
//获取详细信息
$coin_recommends
=
&
$datas
[
'data'
];
if
(
!
empty
(
$coin_recommends
))
{
...
...
backend/controllers/ApplicateRankController.php
View file @
4da3a64e
...
...
@@ -88,15 +88,15 @@ class ApplicateRankController extends BaseController
$type
=
$request
->
get
(
'type'
,
''
);
$sort
=
$request
->
get
(
'sort'
,
1
);
if
(
$id
&&
$type
)
{
$r
ecommend
=
CoinApplicateRecommend
::
getRecommend
(
$id
,
$type
);
if
(
!
$r
ecommend
)
{
return
[
'code'
=>
1
,
'msg'
=>
'
首页推荐
不存在,不能设置排序'
];
$r
ank
=
CoinApplicateRank
::
getApplicate
(
$id
,
$type
);
if
(
!
$r
ank
)
{
return
[
'code'
=>
1
,
'msg'
=>
'
应用
不存在,不能设置排序'
];
}
$r
ecommend
->
sort
=
$sort
;
$r
ecommend
->
save
();
return
[
'code'
=>
0
,
'msg'
=>
'
首页推荐
排序设置成功'
];
$r
ank
->
sort
=
$sort
;
$r
ank
->
save
();
return
[
'code'
=>
0
,
'msg'
=>
'排序设置成功'
];
}
else
{
return
[
'code'
=>
1
,
'msg'
=>
'
首页推荐
排序设置失败'
];
return
[
'code'
=>
1
,
'msg'
=>
'排序设置失败'
];
}
}
}
...
...
backend/views/applicate-rank/index.php
View file @
4da3a64e
...
...
@@ -19,11 +19,11 @@ IndexAsset::register($this);
<div
class=
"layui-tab-content"
>
<div
class=
"layui-tab-item layui-show"
>
<button
class=
"layui-btn layui-btn-default"
id=
"add1"
>
添加热度应用
</button>
<table
class=
"layui-table"
id=
"table1"
lay-filter=
"table"
></table>
<table
class=
"layui-table"
id=
"table1"
lay-filter=
"table
1
"
></table>
</div>
<div
class=
"layui-tab-item"
>
<button
class=
"layui-btn layui-btn-default"
id=
"add2"
>
添加新品应用
</button>
<table
class=
"layui-table"
id=
"table2"
lay-filter=
"table"
></table>
<table
class=
"layui-table"
id=
"table2"
lay-filter=
"table
2
"
></table>
</div>
</div>
</div>
...
...
backend/web/js/applicate-rank/index.js
View file @
4da3a64e
...
...
@@ -100,13 +100,27 @@ function after_close_add(reflush = true) {
}
//监听单元格编辑
table
.
on
(
'edit(table1)'
,
function
(
obj
){
layui
.
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'
,{});
table1
.
reload
(
'table1'
,{});
}
else
{
}
});
});
//监听单元格编辑
layui
.
table
.
on
(
'edit(table2)'
,
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
)
{
table2
.
reload
(
'table2'
,{});
}
else
{
}
...
...
h5/controllers/LotteryController.php
View file @
4da3a64e
...
...
@@ -7,11 +7,9 @@
*/
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
;
/**
...
...
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