|
@@ -256,10 +256,10 @@ class ProductController extends BaseController
|
|
|
if (empty($data) || empty($type)) {
|
|
if (empty($data) || empty($type)) {
|
|
|
util::fail("参数错误");
|
|
util::fail("参数错误");
|
|
|
}
|
|
}
|
|
|
- if (in_array($type, ['inTurn', 'addPrice', 'cost', 'weight', 'ratio', 'status', 'ratio', 'price', 'stockWarning', 'shelfLife'])) {
|
|
|
|
|
|
|
+ if (in_array($type, ['inTurn', 'addPrice', 'cost', 'weight', 'ratio', 'ratio', 'price', 'stockWarning', 'shelfLife'])) {
|
|
|
$data = json_decode($data, true);
|
|
$data = json_decode($data, true);
|
|
|
} else {
|
|
} else {
|
|
|
- util::fail('不允许的类型');
|
|
|
|
|
|
|
+ util::fail('非法操作');
|
|
|
}
|
|
}
|
|
|
foreach ($data as $v) {
|
|
foreach ($data as $v) {
|
|
|
if ($type == 'status') {
|
|
if ($type == 'status') {
|