Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
loveisland
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
刘小敏
loveisland
Commits
1ffd6a9e
Commit
1ffd6a9e
authored
Jul 07, 2026
by
刘小敏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(commission): 修复商品分销配置未初始化导致的报错
parent
de61974e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
+4
-5
Goods.php
addons/shopro/service/commission/Goods.php
+1
-1
Goods.php
application/admin/controller/shopro/goods/Goods.php
+3
-4
No files found.
addons/shopro/service/commission/Goods.php
View file @
1ffd6a9e
...
...
@@ -38,7 +38,7 @@ class Goods
if
(
$this
->
commissionGoods
)
{
$commission_config
=
$this
->
commissionGoods
->
commission_config
;
if
(
$commission_config
[
'status'
]
)
{
if
(
is_array
(
$commission_config
)
&&
!
empty
(
$commission_config
[
'status'
])
)
{
$this
->
commissionConfig
=
$commission_config
;
}
switch
(
$this
->
commissionGoods
->
self_rules
)
{
...
...
application/admin/controller/shopro/goods/Goods.php
View file @
1ffd6a9e
...
...
@@ -104,9 +104,6 @@ class Goods extends Common
$this
->
success
(
'获取成功'
,
null
,
$data
);
}
/**
* 添加
*/
...
...
@@ -132,9 +129,11 @@ class Goods extends Common
$data
=
Db
::
transaction
(
function
()
use
(
$params
)
{
$this
->
model
->
save
(
$params
);
// 新增商品默认设置为分销商品,参与分销
// 新增商品默认设置为分销商品,参与分销
,使用系统默认佣金配置
$commissionGoods
=
new
CommissionGoodsModel
();
$commissionGoods
->
save
([
'commission_rules'
=>
''
,
'commission_config'
=>
json_encode
(
sheep_config
(
'shop.commission'
)),
'goods_id'
=>
$this
->
model
->
id
,
'status'
=>
1
,
]);
...
...
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