shish 1 mesiac pred
rodič
commit
cd45ec1cdf
1 zmenil súbory, kde vykonal 14 pridanie a 1 odobranie
  1. 14 1
      app-hd/controllers/ClearController.php

+ 14 - 1
app-hd/controllers/ClearController.php

@@ -109,7 +109,20 @@ class ClearController extends BaseController
     public function actionGetFullInfo()
     {
         $id = Yii::$app->request->get('id');
+        $salt = Yii::$app->request->get('salt');
         $info = ClearClass::getById($id);
+        if (empty($info)) {
+            util::fail('没有结账单');
+        }
+        if (empty($salt)) {
+            if (!isset($info['customShopId']) || $info['customShopId'] != $this->shopId) {
+                util::fail('不是你的结账信息');
+            }
+        } else {
+            if (!isset($info['salt']) || $info['salt'] != $salt) {
+                util::fail('不是你的结账信息哦');
+            }
+        }
         $respond = ClearClass::getCgInfo($info);
         util::success($respond);
     }
@@ -202,4 +215,4 @@ class ClearController extends BaseController
 
     }
 
-}
+}