Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
service
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
aimeiyue
service
Commits
29c68379
Commit
29c68379
authored
Nov 04, 2024
by
lizhilin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新
parent
9d7f0591
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
5 deletions
+13
-5
app/Http/Controllers/Api/GoodController.php
+6
-5
app/Http/Controllers/Api/IncomeController.php
+4
-0
app/Http/Controllers/Api/LoginController.php
+3
-0
No files found.
app/Http/Controllers/Api/GoodController.php
View file @
29c68379
...
...
@@ -189,9 +189,9 @@ public function getIndexGoods(Request $request)
'id'
=>
$datum
->
id
,
'goods_name'
=>
$datum
->
goods_name
,
'is_hot'
=>
$datum
->
is_hot
,
'dg_price'
=>
ceil
(
$dg_price
),
'market_price'
=>
ceil
(
$market_price
),
'goods_price'
=>
$mer_id
?
ceil
(
$dg_price
)
:
ceil
(
$market_price
),
'dg_price'
=>
floor
(
$dg_price
),
'market_price'
=>
floor
(
$market_price
),
'goods_price'
=>
$mer_id
?
floor
(
$dg_price
)
:
floor
(
$market_price
),
'tags'
=>
$tags
,
'cover_img'
=>
(
$datum
->
cover_img
)
?
env
(
'IMAGE_URL'
)
.
$datum
->
cover_img
:
''
,
];
...
...
@@ -262,8 +262,9 @@ public function getDetail(Request $request)
$data
=
[
'id'
=>
$goods
->
id
,
'goods_img'
=>
$cover
,
'goods_price'
=>
$mer_id
?
ceil
(
$dg_price
)
:
ceil
(
$market_price
),
'market_price'
=>
$mer_id
?
ceil
(
$market_price
)
:
''
,
'dg_price'
=>
floor
(
$dg_price
),
'goods_price'
=>
$mer_id
?
floor
(
$dg_price
)
:
floor
(
$market_price
),
'market_price'
=>
floor
(
$market_price
),
'stock'
=>
$stock
,
'goods_name'
=>
$goods
->
goods_name
,
'sale'
=>
$goods
->
sale
??
0
,
...
...
app/Http/Controllers/Api/IncomeController.php
View file @
29c68379
...
...
@@ -85,8 +85,12 @@ public function add(Request $request)
}
else
{
//用户
$memObj
=
User
::
find
(
$um_id
);
}
$balance
=
$memObj
->
balance
;
$freeze_balance
=
$memObj
->
balance
;
Log
::
add
(
'提现前'
,
[
$balance
,
$freeze_balance
]);
$memObj
->
balance
-=
$money
;
$memObj
->
freeze_balance
+=
$money
;
Log
::
add
(
'提现人员'
,
$memObj
->
toArray
());
$memObj
->
save
();
$comObj
=
new
Income
();
...
...
app/Http/Controllers/Api/LoginController.php
View file @
29c68379
...
...
@@ -96,6 +96,9 @@ public function login(Request $request)
$user
->
name
=
'wx_'
.
uniqid
();
$user
->
openid
=
$openId
;
$user
->
phone
=
$data
->
phoneNumber
;
$user
->
balance
=
0
;
$user
->
freeze_balance
=
0
;
$user
->
total_revenue
=
0
;
$user
->
save
();
}
if
(
$user
->
openid
!=
$openId
)
{
...
...
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