@@ -320,9 +320,9 @@ class ItemController extends BaseController
$get = Yii::$app->request->get();
$customId = $get['customId'] ?? 0;
$custom = CustomClass::getById($customId, true);
- if ($custom->ownMainId != $this->mainId) {
- util::fail('不是你的客户');
- }
+// if ($custom->ownMainId != $this->mainId) {
+// util::fail('不是你的客户');
+// }
$where['mainId'] = $this->mainId;
$where['delStatus'] = 0;
@@ -190,7 +190,7 @@ class ItemClass extends BaseClass
public static function getShowList($where, $custom)
{
- $level = $custom->level ?? 1;
+ $level = isset($custom->level) ? $custom->level : 1;
$field = 'id,cover,name,cost,itemId,classId,property,skPrice,variety,price,hjPrice,discountPrice,stock,stockWarning,presell,ratioType,smallRatio,smallUnit,bigUnit,ratio,hjAddPrice,addPrice';
$list = self::getAllByCondition($where, ['inTurn' => SORT_DESC, 'actualSold' => SORT_DESC], $field);
if (empty($list)) {