Quellcode durchsuchen

采购单详情

shish vor 2 Monaten
Ursprung
Commit
5fa1891f27
1 geänderte Dateien mit 5 neuen und 10 gelöschten Zeilen
  1. 5 10
      app-hd/controllers/PurchaseController.php

+ 5 - 10
app-hd/controllers/PurchaseController.php

@@ -1196,20 +1196,15 @@ class PurchaseController extends BaseController
         if (empty($info)) {
             util::fail('没有找到采购单');
         }
-
         $salt = $get['salt'] ?? '';
+
         if (!empty($salt)) {
-            if (empty($info['salt']) || $info['salt'] != $salt) {
-                util::fail('无效采购单呢!');
+            if (!isset($info['salt']) || $info['salt'] != $salt) {
+                util::fail('无效采购单呢!');
             }
         } else {
-            if (empty($this->shopId)) {
-                //util::fail('暂时无法查看采购单。');
-            }
-            if (empty($info['mainId']) || $info['mainId'] != $this->mainId) {
-                //不能注释,分享付款功能要用,客户没有登录也能付款
-                //util::fail('无法访问');
-                //todo 后面要关闭
+            if (!isset($info['mainId']) || $info['mainId'] != $this->mainId) {
+                util::fail('采购单不能访问');
             }
         }