Selaa lähdekoodia

change:活动入口限制;

Wang Chen 4 vuotta sitten
vanhempi
commit
fdbdf3fb99
1 muutettua tiedostoa jossa 3 lisäystä ja 2 poistoa
  1. 3 2
      app/Http/Controllers/QuickApp/Activity/ActivityController.php

+ 3 - 2
app/Http/Controllers/QuickApp/Activity/ActivityController.php

@@ -197,7 +197,8 @@ class ActivityController extends BaseController
         $channelId  = (int)$this->distribution_channel_id;
         $activity   = ActivityService::getByToken($token);
         $activityId = getProp($activity, 'id');
-        if (!$activityId || !getProp($activity, 'setting') || (int)getProp($activity, 'create_type') !== 5) {
+        if (!$activityId || !getProp($activity, 'setting') || (int)getProp($activity, 'create_type') !== 5 ||
+            (int)getProp($activity, 'distribution_channel_id') !== $channelId) {
             Utils::throwError(ErrorConst::ACTIVITY_NOT_FOUND);
         }
 
@@ -208,7 +209,7 @@ class ActivityController extends BaseController
             $sendOrder   = QuickAppSendOrder::getSendOrderById($sendOrderId);
             $qappAccount = QappChannelAccount::getByAccount(getProp($sendOrder, 'account'));
             if ($qappAccountId !== (int)getProp($qappAccount, 'id')) {
-                // Utils::throwError(ErrorConst::ACTIVITY_INVALID);
+                Utils::throwError(ErrorConst::ACTIVITY_INVALID);
             }
         }