fix: rebuild A01 as responsive page

This commit is contained in:
rain
2026-07-13 14:57:57 +08:00
parent 225c5272b6
commit 5a3adbc5d0
7 changed files with 290 additions and 93 deletions
+9 -8
View File
@@ -48,12 +48,13 @@ $login = Get-Content -LiteralPath $loginPath -Raw -Encoding utf8
$accountPasswordLogin = ConvertFrom-Utf8Base64 '6LSm5Y+35a+G56CB55m75b2V'
$wechatLogin = ConvertFrom-Utf8Base64 '5b6u5L+h55m75b2V'
$registerLink = ConvertFrom-Utf8Base64 '6L+Y5rKh5pyJ6LSm5Y+377yf5rOo5YaM6LSm5Y+3'
$registerPrompt = ConvertFrom-Utf8Base64 '6L+Y5rKh5pyJ6LSm5Y+377yf'
$registerEntry = ConvertFrom-Utf8Base64 '5rOo5YaM6LSm5Y+3'
$loginEntry = ConvertFrom-Utf8Base64 '55m75b2V'
$agreementRequired = ConvertFrom-Utf8Base64 '6K+35YWI6ZiF6K+75bm25ZCM5oSP55u45YWz5Y2P6K6u'
$wechatPending = ConvertFrom-Utf8Base64 '5b6u5L+h55m75b2V5Yqf6IO95YeG5aSH5Lit'
$registerPending = ConvertFrom-Utf8Base64 '5rOo5YaM6aG16Z2i5YeG5aSH5Lit'
$agreementPending = ConvertFrom-Utf8Base64 '5Y2P6K6u6aG16Z2i5YeG5aSH5Lit'
$entryVisualSource = ConvertFrom-Utf8Base64 'QC9kb2NzL2Rlc2lnbi9zY3JlZW5zL0EwMS3lkK/liqjnmbvlvZXlvJXlr7wt5pWI5p6c56i/LXYzLeaWh+Wtl+azqOWGjOWFpeWPoy5wbmc='
$smsLogin = ConvertFrom-Utf8Base64 '5omL5py66aqM6K+B56CB55m75b2V'
$forgotPassword = ConvertFrom-Utf8Base64 '5b+Y6K6w5a+G56CB'
$getCode = ConvertFrom-Utf8Base64 '6I635Y+W6aqM6K+B56CB'
@@ -63,17 +64,17 @@ $forgotPasswordPending = ConvertFrom-Utf8Base64 '5b+Y6K6w5a+G56CB6aG16Z2i5YeG5aS
$getCodePending = ConvertFrom-Utf8Base64 '6I635Y+W6aqM6K+B56CB5Yqf6IO95b6F5o6l5YWl'
$implicitAgreement = ConvertFrom-Utf8Base64 '55m75b2V5Y2z6KGo56S65ZCM5oSP'
foreach ($requiredEntryCopy in @($wechatLogin, $agreementRequired, $wechatPending, $registerPending, $agreementPending)) {
foreach ($requiredEntryCopy in @($wechatLogin, $registerPrompt, $registerEntry, $agreementRequired, $wechatPending, $registerPending, $agreementPending)) {
Assert-Contains -Content $entry -Expected $requiredEntryCopy -Message "Missing A-01 copy: $requiredEntryCopy"
}
Assert-Contains -Content $entry -Expected "url: '/pages/auth/login?agreed=1'" -Message 'A-01 account login must navigate with agreed=1'
Assert-Contains -Content $entry -Expected "import entryGuideVisual from '$entryVisualSource'" -Message 'A-01 must import the selected v3 visual source'
foreach ($requiredClass in @('guide-art', 'entry-login-hit', 'entry-wechat-hit', 'entry-register-hit', 'entry-agreement-hit')) {
Assert-Contains -Content $entry -Expected $requiredClass -Message "Missing A-01 interaction region: $requiredClass"
Assert-Contains -Content $entry -Expected "<text>$loginEntry</text>" -Message 'A-01 primary entry copy must be 登录'
foreach ($requiredClass in @('auth-header', 'brand-intro', 'entry-actions', 'agreement-row')) {
Assert-Contains -Content $entry -Expected $requiredClass -Message "Missing A-01 page structure: $requiredClass"
}
foreach ($forbiddenClass in @('auth-header', 'brand-intro', 'entry-actions', 'cloud')) {
Assert-NotContains -Content $entry -Unexpected $forbiddenClass -Message "A-01 must not redraw the v3 visual with $forbiddenClass"
foreach ($forbiddenClass in @('entryGuideVisual', 'guide-art', 'entry-hit', 'width: 750rpx', 'min-height: 1625rpx')) {
Assert-NotContains -Content $entry -Unexpected $forbiddenClass -Message "A-01 must not render the whole design image with $forbiddenClass"
}
if ($entry -match '(?s)\.auth-page\s*\{[^}]*overflow\s*:\s*hidden') {
throw 'A-01 must allow vertical scrolling on small screens'
+10 -9
View File
@@ -23,12 +23,13 @@ foreach ($rule in $rules) {
}
$layoutRules = @(
(ConvertFrom-Utf8Base64 '5Zu65a6a6K6+6K6h55S75biD5Li6IGA3NTBycHhgIOWuvQ=='),
(ConvertFrom-Utf8Base64 'ODUyIMOXIDE4NDZweA=='),
(ConvertFrom-Utf8Base64 'NzUwIMOXIDE2MjVycHg='),
(ConvertFrom-Utf8Base64 '6L+Q6KGM5pe26KeG6KeJ5rqQ'),
(ConvertFrom-Utf8Base64 '5Li75oyJ6ZKu5paH5qGI5Zu65a6a5Li64oCc55m75b2V4oCd'),
(ConvertFrom-Utf8Base64 'b3ZlcmZsb3c6IGhpZGRlbg==')
(ConvertFrom-Utf8Base64 '6aG16Z2i5qC55a655Zmo5a695bqm5b+F6aG75Li6IDEwMCU='),
(ConvertFrom-Utf8Base64 '5pyx56CC5a6256Wg5aS05Zu+6auYIDI0NHJweA=='),
(ConvertFrom-Utf8Base64 '5pON5L2c5Yy65bem5Y+z5YaF6L656LedIDEwMHJweA=='),
(ConvertFrom-Utf8Base64 '5Li75oyJ6ZKu6auY5bqmIDEyNHJweA=='),
(ConvertFrom-Utf8Base64 '5Y2P6K6u6KGM5Zyo5rOo5YaM5YWl5Y+j5LiL5pa5IDE2MHJweA=='),
(ConvertFrom-Utf8Base64 'ZW52KHNhZmUtYXJlYS1pbnNldC1ib3R0b20p'),
(ConvertFrom-Utf8Base64 '5pWI5p6c56i/IHYzIOS7heS9nOinhuinieavlOWvueS+neaNrg==')
)
foreach ($rule in $layoutRules) {
@@ -37,9 +38,9 @@ foreach ($rule in $layoutRules) {
}
}
$legacyLayoutRule = ConvertFrom-Utf8Base64 '5YaF5a655a695bqmIDYzOHJweA=='
if ($record -match [regex]::Escape($legacyLayoutRule)) {
throw "Legacy A01 layout rule remains: $legacyLayoutRule"
$forbiddenLayoutRule = ConvertFrom-Utf8Base64 '6L+Q6KGM5pe26KeG6KeJ5rqQ'
if ($record -match [regex]::Escape($forbiddenLayoutRule)) {
throw "Whole-image A01 layout rule remains: $forbiddenLayoutRule"
}
$currentStructure = [regex]::Match($record, '(?s)## 2\..*?(?=## 3\.)').Value