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
9d7f0591
Commit
9d7f0591
authored
Oct 28, 2024
by
lizhilin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新
parent
9688fd29
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
10 deletions
+14
-10
app/Admin/Controllers/GoodController.php
+1
-1
app/Admin/Controllers/MerchantGoodsStoreController.php
+6
-2
app/Http/Controllers/Api/ArticleController.php
+2
-2
app/Http/Controllers/Api/GoodController.php
+5
-5
No files found.
app/Admin/Controllers/GoodController.php
View file @
9d7f0591
...
...
@@ -44,7 +44,7 @@ protected function grid()
$card
=
new
Card
(
null
,
$this
->
goods_desc
);
return
"<div style='padding:10px 10px 0;width:100%;'>
$card
</div>"
;
return
"<div style='padding:10px 10px 0;width:100%;
overflow:auto;
'>
$card
</div>"
;
})
->
else
(
function
(
$column
)
{
return
''
;
});
...
...
app/Admin/Controllers/MerchantGoodsStoreController.php
View file @
9d7f0591
...
...
@@ -60,8 +60,12 @@ protected function grid()
});
$grid
->
actions
(
function
(
Grid\Displayers\Actions
$actions
)
{
$actions
->
append
(
new
MerchantAddStore
(
'增加库存'
,
$actions
->
row
->
goods_id
));
$actions
->
append
(
new
MerchantSubStore
(
'减少库存'
,
$actions
->
row
->
goods_id
));
$gid
=
$actions
->
row
->
goods_id
;
$goodObj
=
Good
::
find
(
$gid
);
if
(
$goodObj
)
{
$actions
->
append
(
new
MerchantAddStore
(
'增加库存'
,
$actions
->
row
->
goods_id
));
$actions
->
append
(
new
MerchantSubStore
(
'减少库存'
,
$actions
->
row
->
goods_id
));
}
});
});
}
...
...
app/Http/Controllers/Api/ArticleController.php
View file @
9d7f0591
...
...
@@ -29,8 +29,8 @@ public function getList(Request $request)
foreach
(
$listData
as
$item
)
{
$data
[
'list'
][]
=
[
'id'
=>
$item
->
id
,
'title'
=>
$item
->
title
,
'brief'
=>
$item
->
brief
,
'title'
=>
$item
->
title
??
''
,
'brief'
=>
$item
->
brief
??
''
,
'cover'
=>
$item
->
cover
?
env
(
'IMAGE_URL'
)
.
$item
->
cover
:
''
,
'content'
=>
$item
->
content
,
'created_at'
=>
$item
->
created_at
?
date
(
"Y-m-d H:i:s"
,
strtotime
(
$item
->
created_at
))
:
''
,
...
...
app/Http/Controllers/Api/GoodController.php
View file @
9d7f0591
...
...
@@ -189,9 +189,9 @@ public function getIndexGoods(Request $request)
'id'
=>
$datum
->
id
,
'goods_name'
=>
$datum
->
goods_name
,
'is_hot'
=>
$datum
->
is_hot
,
'dg_price'
=>
sprintf
(
"%.2f"
,
$dg_price
),
'market_price'
=>
sprintf
(
"%.2f"
,
$market_price
),
'goods_price'
=>
$mer_id
?
sprintf
(
"%.2f"
,
$dg_price
)
:
sprintf
(
"%.2f"
,
$market_price
),
'dg_price'
=>
ceil
(
$dg_price
),
'market_price'
=>
ceil
(
$market_price
),
'goods_price'
=>
$mer_id
?
ceil
(
$dg_price
)
:
ceil
(
$market_price
),
'tags'
=>
$tags
,
'cover_img'
=>
(
$datum
->
cover_img
)
?
env
(
'IMAGE_URL'
)
.
$datum
->
cover_img
:
''
,
];
...
...
@@ -262,8 +262,8 @@ public function getDetail(Request $request)
$data
=
[
'id'
=>
$goods
->
id
,
'goods_img'
=>
$cover
,
'goods_price'
=>
$mer_id
?
$dg_price
:
$market_price
,
'market_price'
=>
$mer_id
?
$market_price
:
''
,
'goods_price'
=>
$mer_id
?
ceil
(
$dg_price
)
:
ceil
(
$market_price
)
,
'market_price'
=>
$mer_id
?
ceil
(
$market_price
)
:
''
,
'stock'
=>
$stock
,
'goods_name'
=>
$goods
->
goods_name
,
'sale'
=>
$goods
->
sale
??
0
,
...
...
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