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
8 months ago
by
lizhilin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新
parent
9688fd29
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
8 deletions
+12
-8
app/Admin/Controllers/GoodController.php
+1
-1
app/Admin/Controllers/MerchantGoodsStoreController.php
+4
-0
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
''
;
});
...
...
This diff is collapsed.
Click to expand it.
app/Admin/Controllers/MerchantGoodsStoreController.php
View file @
9d7f0591
...
...
@@ -60,8 +60,12 @@ protected function grid()
});
$grid
->
actions
(
function
(
Grid\Displayers\Actions
$actions
)
{
$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
));
}
});
});
}
...
...
This diff is collapsed.
Click to expand it.
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
))
:
''
,
...
...
This diff is collapsed.
Click to expand it.
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
,
...
...
This diff is collapsed.
Click to expand it.
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