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
5bc97bd7
Commit
5bc97bd7
authored
Jul 07, 2026
by
刘小敏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(goods): 修复新增商品分销配置缺失默认值
parent
1ffd6a9e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
Goods.php
application/admin/controller/shopro/goods/Goods.php
+9
-1
No files found.
application/admin/controller/shopro/goods/Goods.php
View file @
5bc97bd7
...
...
@@ -131,9 +131,17 @@ class Goods extends Common
// 新增商品默认设置为分销商品,参与分销,使用系统默认佣金配置
$commissionGoods
=
new
CommissionGoodsModel
();
$config
=
sheep_config
(
'shop.commission'
);
$commission_config
=
[
'status'
=>
0
,
'level'
=>
$config
[
'level'
]
??
2
,
'self_buy'
=>
$config
[
'self_buy'
]
??
0
,
'reward_type'
=>
$config
[
'reward_type'
]
??
'pay_price'
,
'reward_event'
=>
$config
[
'reward_event'
]
??
'paid'
,
];
$commissionGoods
->
save
([
'commission_rules'
=>
''
,
'commission_config'
=>
json_encode
(
sheep_config
(
'shop.commission'
)
),
'commission_config'
=>
json_encode
(
$commission_config
),
'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