Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
ylc.llewan.com
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
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
llewan
ylc.llewan.com
Commits
ba669288
Commit
ba669288
authored
Sep 19, 2018
by
734642908@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化竞拍
parent
553a8e29
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
11 deletions
+7
-11
AuctionController.class.php
Application/Home/Controller/AuctionController.class.php
+4
-4
GameController.class.php
Application/Home/Controller/GameController.class.php
+3
-7
No files found.
Application/Home/Controller/AuctionController.class.php
View file @
ba669288
...
...
@@ -194,7 +194,7 @@ class AuctionController extends BaseController
$goodsList
=
$this
->
goodsList
;
//获取竞拍商品信息
$redis
=
S
(
C
(
'REDIS'
));
M
(
"testw"
,
""
,
C
(
"LEWAN_HEZI"
))
->
add
(
array
(
'name'
=>
'ylc'
,
'ctime'
=>
date
(
'Y-m-d H:i:s'
)));
//
M("testw","",C("LEWAN_HEZI"))->add(array('name'=>'ylc','ctime'=>date('Y-m-d H:i:s')));
$leftArray
=
array
();
$rightArray
=
array
();
foreach
(
$goodsList
as
$key
=>
$val
)
{
...
...
@@ -405,7 +405,7 @@ class AuctionController extends BaseController
}
$uid
=
$token
[
'uid'
];
$num
=
M
(
"game_auction_enroll"
,
""
,
C
(
"LEWAN_HEZI"
))
->
where
(
array
(
'uid'
=>
$uid
,
'goods_id'
=>
$goodsId
))
->
count
();
$num
=
M
(
"game_auction_enroll"
,
""
,
C
(
"LEWAN_HEZI"
))
->
where
(
array
(
'
game_code'
=>
'ylc'
,
'
uid'
=>
$uid
,
'goods_id'
=>
$goodsId
))
->
count
();
if
(
$num
>
0
)
{
$result
=
array
(
'c'
=>
2
...
...
@@ -492,7 +492,7 @@ class AuctionController extends BaseController
,
'msg'
=>
'出价高于当前商品竞拍价格范围'
);
}
else
{
//保存
报名
信息
//保存
出价
信息
$model
=
new
\Home\Model\AuctionModel
();
$result
=
$model
->
bidSave
(
$uid
,
$goodsId
,
$price
,
$goodsInfo
);
}
...
...
@@ -552,7 +552,7 @@ class AuctionController extends BaseController
$uid
=
$token
[
'uid'
];
//获取用户报名参与竞拍
$auctionArr
=
M
(
"game_auction_enroll"
,
""
,
C
(
"LEWAN_HEZI"
))
->
where
(
array
(
'uid'
=>
$uid
))
->
order
(
'create_time desc'
)
->
select
();
$auctionArr
=
M
(
"game_auction_enroll"
,
""
,
C
(
"LEWAN_HEZI"
))
->
where
(
array
(
'
game_code'
=>
'ylc'
,
'
uid'
=>
$uid
))
->
order
(
'create_time desc'
)
->
select
();
if
(
!
empty
(
$auctionArr
))
{
//获取竞拍商品信息
...
...
Application/Home/Controller/GameController.class.php
View file @
ba669288
...
...
@@ -144,7 +144,9 @@ class GameController extends BaseController
$gameList
=
M
(
"yl_game"
,
""
,
C
(
"LEWAN_HEZI"
))
->
where
(
$where
)
->
field
(
'sysid,name,gamer,icon,appid,gourl'
)
->
order
(
'rand()'
)
->
limit
(
4
)
->
select
();
if
(
!
empty
(
$gameList
))
{
if
(
empty
(
$gameList
))
{
$gameList
=
M
(
"yl_game"
,
""
,
C
(
"LEWAN_HEZI"
))
->
field
(
'sysid,name,gamer,icon,appid,gourl'
)
->
order
(
'rand()'
)
->
limit
(
4
)
->
select
();
}
$result
=
array
(
'c'
=>
1
,
'msg'
=>
'获取成功'
...
...
@@ -152,12 +154,6 @@ class GameController extends BaseController
'gameList'
=>
$gameList
)
);
}
else
{
$result
=
array
(
'c'
=>
2
,
'msg'
=>
'暂无数据'
);
}
}
echo
$this
->
formatRes
(
$result
);
}
...
...
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