Browse Source

数据校验

541469799@qq.com 10 months ago
parent
commit
178051013e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/index/controller/Index.php

+ 1 - 1
app/index/controller/Index.php

@@ -144,7 +144,7 @@ class Index extends Controller
 
         $goodsModel = new GoodsModel();
         $goods = $goodsModel->getDetails($goodsId);
-        if (empty($goods) || $goods['status'] != 200){
+        if (empty($goods) || (isset($goods['status']) && $goods['status'] == 500)){
             return \view('/error');
         }
         $goods = $goods->toArray();