diff --git a/resources/views/business/pages/financial-risk-control/index.blade.php b/resources/views/business/pages/financial-risk-control/index.blade.php index 00f7855a..8d991d36 100644 --- a/resources/views/business/pages/financial-risk-control/index.blade.php +++ b/resources/views/business/pages/financial-risk-control/index.blade.php @@ -1,56 +1,276 @@ +@php + $platforms = [ + 'taobao' => ['label' => '淘系', 'icon' => 'shopping_bag', 'description' => '集中查看淘宝、天猫店铺的违规和处罚风险。'], + 'alibaba' => ['label' => '阿里巴巴', 'icon' => 'inventory_2', 'description' => '集中查看阿里巴巴店铺的违规和处罚风险。'], + 'jd' => ['label' => '京东', 'icon' => 'local_mall', 'description' => '集中查看京东店铺的违规和处罚风险。'], + 'pinduoduo' => ['label' => '拼多多', 'icon' => 'grid_view', 'description' => '集中查看拼多多店铺的违规和处罚风险。'], + 'douyin' => ['label' => '抖音', 'icon' => 'play_circle', 'description' => '集中查看抖音店铺的违规和处罚风险。'], + ]; + $requestedPlatform = (string) request()->query('platform', 'taobao'); + $activePlatform = array_key_exists($requestedPlatform, $platforms) ? $requestedPlatform : 'taobao'; +@endphp + -
-
- -

暂无风险事项

-

风险规则和数据接入后,相关事项将在此展示。

-
+
+ + + @foreach ($platforms as $slug => $platform) + + @endforeach
+ + diff --git a/tests/Feature/Settings/NavigationTest.php b/tests/Feature/Settings/NavigationTest.php index 12d705f7..babb5686 100644 --- a/tests/Feature/Settings/NavigationTest.php +++ b/tests/Feature/Settings/NavigationTest.php @@ -57,10 +57,18 @@ class NavigationTest extends FeatureTestCase $this->assertSame([], $navigation[$riskControlIndex]['pages']); $this->loginAs() - ->get(route('business.pages.show', ['section' => 'financial-risk-control'])) + ->get(route('business.pages.show', ['section' => 'financial-risk-control']) . '?platform=jd') ->assertOk() ->assertSeeText('财务经营风险管控') - ->assertSeeText('暂无风险事项') + ->assertSeeText('淘系') + ->assertSeeText('阿里巴巴') + ->assertSeeText('京东') + ->assertSeeText('拼多多') + ->assertSeeText('抖音') + ->assertSeeText('京东店铺违规信息预警') + ->assertSee('data-active-platform="jd"', false) + ->assertSee('id="financial-risk-control-panel-jd"', false) + ->assertSee('data-platform-tab="jd"', false) ->assertSee('/workspace/financial-risk-control', false); }