Przeglądaj źródła

Merge branch 'master' into dev

shish 1 dzień temu
rodzic
commit
5f414e30ce

+ 1 - 1
app-ghs/controllers/ConsoleController.php

@@ -44,7 +44,7 @@ class ConsoleController extends BaseController
         $overview = [
             ['name' => "库存数", "url" => '/admin/stat/stock', 'value' => $totalItemNum, 'type' => 1],
             ['name' => "库存值", "url" => '/admin/stat/stock', 'value' => $totalCost, 'type' => 1],
-            ['name' => "应收款", "url" => '/admin/shop/debtChange', 'value' => $may, 'type' => 1],
+            ['name' => "应收款", "url" => '', 'value' => $may, 'type' => 1],
             ['name' => "未命名", "url" => '/admin/home/member', 'value' => 0, 'type' => 4],
             ['name' => "总访客", "url" => '/admin/home/member', 'value' => 0, 'type' => 4],
             ['name' => "总订单", "url" => '/admin/home/order', 'value' => 0, 'type' => 4],

+ 13 - 4
app-hd/controllers/GhsBalanceChangeController.php

@@ -4,25 +4,35 @@ namespace hd\controllers;
 
 use bizHd\ghs\classes\GhsBalanceChangeClass;
 use bizHd\ghs\classes\GhsClass;
-use common\components\dict;
 use common\components\util;
 use Yii;
 
+/**
+ * 花店端供货商余额变动
+ * 小程序登录态与 H5 扫码付款(salt)共用 list 接口
+ */
 class GhsBalanceChangeController extends BaseController
 {
-
+    /** H5 付款页未登录也可查明细,依赖 salt 校验归属 */
     public $guestAccess = ['list'];
 
-    //余额变动明细
+    /**
+     * 余额变动明细列表
+     * 无 salt:校验当前店铺是否拥有该供货商;有 salt:与 get-ghs-data 一致按 salt 放行(H5 访客)
+     */
     public function actionList()
     {
         $get = Yii::$app->request->get();
         $ghsId = $get['ghsId'] ?? 0;
         $salt = $get['salt'] ?? '';
         $ghs = GhsClass::getById($ghsId, true);
+        if (empty($ghs)) {
+            util::fail('无法查看');
+        }
         if (empty($salt)) {
             GhsClass::valid($ghs, $this->shopId);
         } else {
+            // 扫码付款链接携带 salt,与小程序余额明细共用同一套数据
             if ($ghs->salt != $salt) {
                 util::fail('无法查看');
             }
@@ -32,5 +42,4 @@ class GhsBalanceChangeController extends BaseController
         $list = GhsBalanceChangeClass::getChangeList($where);
         util::success($list);
     }
-
 }

+ 4 - 1
app-hd/controllers/ShopController.php

@@ -120,7 +120,7 @@ class ShopController extends BaseController
     {
         $get = Yii::$app->request->get();
         $mobile = $get['mobile'] ?? '';
-        if(empty($mobile)){
+        if (empty($mobile)) {
             util::success(['has' => 0]);
         }
         $shop = ShopClass::getByCondition(['mobile' => $mobile], true);
@@ -136,6 +136,9 @@ class ShopController extends BaseController
         $shopExt = ShopExtClass::getByCondition(['shopId' => $this->shop->id], false, false, 'reachVip');
         $shop = $this->shop->attributes;
         $shop['reachVip'] = $shopExt['reachVip'];
+
+        $shop['warning'] = '明天凌晨1:00~2:00系统升级,暂停使用';
+
         util::success($shop);
     }