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
ed851adc
Commit
ed851adc
authored
Oct 18, 2024
by
lizhilin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新
parent
3342603a
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
6 deletions
+14
-6
app/Admin/Controllers/GoodController.php
+3
-0
app/Admin/Controllers/SystemSettingController.php
+6
-0
app/Http/Controllers/Api/OrderController.php
+1
-0
app/Http/Controllers/Api/UserCollectController.php
+4
-6
No files found.
app/Admin/Controllers/GoodController.php
View file @
ed851adc
...
...
@@ -233,6 +233,9 @@ protected function form()
$skuCon
=
json_encode
(
$skuArr
,
JSON_UNESCAPED_UNICODE
);
DB
::
table
(
'li_goods'
)
->
where
(
"id"
,
$goods_id
)
->
update
([
'sku'
=>
$skuCon
]);
}
if
(
isset
(
$_POST
[
'is_show'
])
&&
$_POST
[
'is_show'
]
==
0
)
{
DB
::
table
(
'li_user_collect'
)
->
where
(
'goods_id'
,
$goods_id
)
->
update
([
'deleted_at'
=>
DB
::
raw
(
'CURRENT_TIMESTAMP'
)]);
}
});
$form
->
submitted
(
function
(
Form
$form
)
{
$goods_id
=
$form
->
getKey
();
...
...
app/Admin/Controllers/SystemSettingController.php
View file @
ed851adc
...
...
@@ -76,6 +76,12 @@ protected function form()
$form
->
disableViewCheck
();
$form
->
disableDeleteButton
();
$form
->
disableViewButton
();
$form
->
disableListButton
();
$form
->
disableResetButton
();
$form
->
saved
(
function
(
Form
$form
)
{
return
$form
->
response
()
->
success
(
'保存成功'
)
->
redirect
(
'/setting/1/edit'
);
});
});
}
}
app/Http/Controllers/Api/OrderController.php
View file @
ed851adc
...
...
@@ -586,6 +586,7 @@ public function OrderInfo(Request $request)
'mobile'
=>
$orderObj
->
mobile
,
'order_status'
=>
$order_status
,
'status_txt'
=>
$status_txt
,
'verification_code'
=>
$orderObj
->
verification_code
??
''
,
'delivery'
=>
$delivery
,
'delivery_type'
=>
$orderObj
->
delivery_type
,
'delivery_typename'
=>
(
$orderObj
->
delivery_type
==
1
)
?
'快递代收点'
:
'送货上门'
,
...
...
app/Http/Controllers/Api/UserCollectController.php
View file @
ed851adc
...
...
@@ -46,7 +46,9 @@ public function collectOpt(Request $request)
public
function
collectList
(
Request
$request
)
{
$user_id
=
$request
->
user
()
->
id
;
$userObj
=
$request
->
user
();
$user_id
=
$userObj
->
id
;
$merchant_id
=
$userObj
->
merchant_id
;
$page
=
$request
->
page
??
1
;
$limit
=
$request
->
limit
??
10
;
$sql
=
UserCollect
::
where
([
'uid'
=>
$user_id
,
'deleted_at'
=>
null
]);
...
...
@@ -60,18 +62,14 @@ public function collectList(Request $request)
foreach
(
$listData
as
$datum
)
{
$goods_id
=
$datum
->
goods_id
;
$goodObj
=
GoodModel
::
select
([
'goods_name'
,
'cover_img'
,
'tags'
])
->
find
(
$goods_id
);
$is_jd
=
(
int
)
$goodObj
->
is_jd
;
$attrRowObj
=
GoodSku
::
where
(
"goods_id"
,
$goods_id
)
->
first
();
$attrcon
=
$attrRowObj
?
json_decode
(
$attrRowObj
->
content
,
true
)
:
[];
$jd_price
=
isset
(
$attrcon
[
'jd_price'
])
?
(
float
)
$attrcon
[
'jd_price'
]
:
0
;
$market_price
=
isset
(
$attrcon
[
'market_price'
])
?
(
float
)
$attrcon
[
'market_price'
]
:
0
;
$tags
=
$goodObj
->
tags
?
json_decode
(
$goodObj
->
tags
,
true
)
:
[];
$data
[
'list'
][]
=
[
'goods_id'
=>
$goods_id
,
'goods_name'
=>
$goodObj
->
goods_name
??
''
,
'attr'
=>
$attrRowObj
?
$attrRowObj
->
attr_val
:
''
,
'tags'
=>
$tags
,
'goods_price'
=>
$
is_jd
?
sprintf
(
"%.2f"
,
$jd_price
)
:
sprintf
(
"%.2f"
,
$
market_price
),
'goods_price'
=>
$
merchant_id
?
sprintf
(
"%.2f"
,
$attrRowObj
->
cg_price
)
:
sprintf
(
"%.2f"
,
$attrRowObj
->
market_price
),
'cover_img'
=>
(
$goodObj
->
cover_img
?
env
(
'IMAGE_URL'
)
.
$goodObj
->
cover_img
:
''
),
'addtime'
=>
date
(
'Y-m-d H:i:s'
,
strtotime
(
$datum
->
created_at
))
];
...
...
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