提交 b4a9cbc6 编写于 作者: F fengcheche

后台添加地址库时带上区域级别

上级 87e7da2c
......@@ -152,6 +152,9 @@ class RegionService
'sort' => isset($params['sort']) ? intval($params['sort']) : 0,
'is_enable' => isset($params['is_enable']) ? intval($params['is_enable']) : 0,
];
// 得到level,风车车
$data['level'] = ($data['pid'] > 0) ? (Db::name('Region')->where(['id'=>intval($data['pid'])])->value('level')+1) : 0;
// 添加
if(empty($params['id']))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册