修改未完成
This commit is contained in:
@@ -1,67 +1,62 @@
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
$source = Get-Content 'pages/profile/m01-profile-home.vue' -Raw -Encoding UTF8
|
||||
$profiles = Get-Content 'styles/adaptive-frame-profiles.scss' -Raw -Encoding UTF8
|
||||
$required = @(
|
||||
|
||||
foreach ($required in @(
|
||||
'profile-state--ready',
|
||||
'profile-state--error',
|
||||
'@include adaptive.adaptive-profile-summary;',
|
||||
'@include adaptive.adaptive-scroll-button(primary);',
|
||||
'brand-seal.png',
|
||||
'auth-divider-knot.png',
|
||||
'chevron-right.png',
|
||||
'root-header-hall.png',
|
||||
'a01-icon-lock-v1.png',
|
||||
'notice.png',
|
||||
'm01-profile-archive-hero-v2.png',
|
||||
'm01-profile-tree-medallion.png',
|
||||
'class="profile-hero__art"',
|
||||
'class="profile-hero__content"',
|
||||
'class="profile-metadata"',
|
||||
'class="profile-service-row"',
|
||||
'grid-area: 1 / 1',
|
||||
'height: 503rpx',
|
||||
'height: 480rpx',
|
||||
'white-space: nowrap',
|
||||
'pointer-events: none',
|
||||
'AppButton',
|
||||
'import { openPage } from "@/utils/navigation.js";',
|
||||
'AppTabbar',
|
||||
'routeKey: "M03"',
|
||||
'routeKey: "N01"',
|
||||
'routeKey: "M06"',
|
||||
'routeKey: "M10"',
|
||||
'routeKey: "M08"',
|
||||
'routeKey: "M09"',
|
||||
'routeKey: "M10"',
|
||||
'openPage("M02", {}, "M01")',
|
||||
'openPage("N01", {}, "M01")',
|
||||
'openPage(item.routeKey, {}, "M01")'
|
||||
)
|
||||
|
||||
foreach ($token in $required) {
|
||||
if (-not $source.Contains($token)) {
|
||||
throw "M01 missing contract token: $token"
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($forbiddenNavigation in @('uni.navigateTo', 'uni.navigateBack', 'uni.redirectTo', 'uni.reLaunch', 'getCurrentPages(', '<navigator', '/pages/')) {
|
||||
if ($source.Contains($forbiddenNavigation)) {
|
||||
throw "M01 must use the registered navigation gateway: $forbiddenNavigation"
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($forbidden in @('m01-profile-notice-card.png', 'm01-profile-menu-frame.png', 'g03-create-flow-panel.png', 'application-status-card.png', 'g06-search-input-wide.png')) {
|
||||
if ($source.Contains($forbidden)) {
|
||||
throw "M01 must not reuse opaque business asset: $forbidden"
|
||||
}
|
||||
}
|
||||
|
||||
if ($source -match '<image\s+(?:[^>]*\s)?class="(?:profile-hero__frame|profile-scroll-notice__skin|profile-error__skin)"') {
|
||||
throw 'M01 decorative frames must be container backgrounds instead of positioned image layers'
|
||||
}
|
||||
if ($source -match 'position\s*:') { throw 'M01 must keep content and local decoration in flex/grid document flow' }
|
||||
foreach ($token in @(
|
||||
'class="profile-hero__content"',
|
||||
'grid-area: 1 / 1'
|
||||
)) {
|
||||
if (-not $source.Contains($token)) { throw "M01 missing document-flow token: $token" }
|
||||
if (-not $source.Contains($required)) {
|
||||
throw "M01 missing archive redesign contract: $required"
|
||||
}
|
||||
}
|
||||
|
||||
if ($profiles -notmatch '(?s)@mixin\s+adaptive-profile-summary\s*\{.*?m01-profile-summary-card\.png') {
|
||||
throw 'The adaptive profile owner must retain the M01 summary-card artwork'
|
||||
foreach ($forbidden in @(
|
||||
'auth-divider-knot.png',
|
||||
'root-header-hall.png',
|
||||
'm01-profile-notice-card.png',
|
||||
'm01-profile-menu-frame.png',
|
||||
'uni.navigateTo',
|
||||
'uni.navigateBack',
|
||||
'uni.redirectTo',
|
||||
'uni.reLaunch',
|
||||
'getCurrentPages(',
|
||||
'<navigator',
|
||||
'/pages/'
|
||||
)) {
|
||||
if ($source.Contains($forbidden)) {
|
||||
throw "M01 must not retain obsolete navigation or separate-decoration contract: $forbidden"
|
||||
}
|
||||
}
|
||||
if ($profiles -notmatch '(?s)@mixin\s+adaptive-scroll-button\s*\(\$type\).*?a01-scroll-primary-v3\.png') {
|
||||
throw 'The adaptive profile owner must retain the primary scroll-button artwork'
|
||||
|
||||
if ($source -notmatch '(?s)\.profile-hero__identity\s*\{[^}]*position\s*:\s*relative\s*;' -or
|
||||
$source -notmatch '(?s)\.profile-hero__edit\s*\{[^}]*position\s*:\s*absolute\s*;') {
|
||||
throw 'M01 archive redesign must anchor the edit action to the hero identity block'
|
||||
}
|
||||
if ($source -match '100%\s+100%\s+no-repeat|border-image-slice\s*:') {
|
||||
throw 'M01 must consume adaptive frame geometry without page-local stretching or slicing'
|
||||
|
||||
if ($source -match '\.profile-page\s*:deep\(\.app-tabbar\)|\.profile-page\s*:deep\(\.tab-label\)') {
|
||||
throw 'M01 must preserve the shared AppTabbar appearance'
|
||||
}
|
||||
|
||||
Write-Output 'M01-MODULE-BASELINE-CONTRACT PASS'
|
||||
|
||||
Reference in New Issue
Block a user