Explorar el Código

Merge remote-tracking branch 'origin/dev' into dev

ouyang hace 10 horas
padre
commit
fe976125ba
Se han modificado 1 ficheros con 11 adiciones y 2 borrados
  1. 11 2
      app-hd/controllers/GhsBalanceChangeController.php

+ 11 - 2
app-hd/controllers/GhsBalanceChangeController.php

@@ -11,17 +11,26 @@ use Yii;
 class GhsBalanceChangeController extends BaseController
 {
 
+    public $guestAccess = ['list'];
+
     //余额变动明细
     public function actionList()
     {
         $get = Yii::$app->request->get();
         $ghsId = $get['ghsId'] ?? 0;
+        $salt = $get['salt'] ?? '';
         $ghs = GhsClass::getById($ghsId, true);
-        GhsClass::valid($ghs, $this->shopId);
+        if (empty($salt)) {
+            GhsClass::valid($ghs, $this->shopId);
+        } else {
+            if ($ghs->salt != $salt) {
+                util::fail('无法查看');
+            }
+        }
         $where = [];
         $where['ghsId'] = $ghsId;
         $list = GhsBalanceChangeClass::getChangeList($where);
         util::success($list);
     }
 
-}
+}