完成50%
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
$ErrorActionPreference = 'Stop'
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
function ConvertFrom-Utf8Base64 {
|
||||
param([string]$Value)
|
||||
@@ -18,13 +18,11 @@ function Assert-NotContains {
|
||||
$root = Split-Path -Parent $PSScriptRoot
|
||||
$pagePath = Join-Path $root 'pages/auth/a05-reset-password.vue'
|
||||
$pages = Get-Content -LiteralPath (Join-Path $root 'pages.json') -Raw -Encoding utf8 | ConvertFrom-Json
|
||||
$catalog = Get-Content -LiteralPath (Join-Path $root 'data/page-catalog.js') -Raw -Encoding utf8
|
||||
$page = Get-Content -LiteralPath $pagePath -Raw -Encoding utf8
|
||||
$resetCopy = ConvertFrom-Utf8Base64 '6YeN6K6+5a+G56CB'
|
||||
$confirmPasswordCopy = ConvertFrom-Utf8Base64 '56Gu6K6k5paw5a+G56CB'
|
||||
$getCodeCopy = ConvertFrom-Utf8Base64 '6I635Y+W6aqM6K+B56CB'
|
||||
$loginCopy = ConvertFrom-Utf8Base64 '6L+U5Zue55m75b2V'
|
||||
$sliderPendingCopy = ConvertFrom-Utf8Base64 '5ruR5Yqo6aqM6K+B5b6F5o6l5Y+j5o6l5YWl'
|
||||
|
||||
if (-not ($pages.pages.path -contains 'pages/auth/a05-reset-password')) { throw 'A-05 route must remain declared in pages.json' }
|
||||
Assert-NotContains -Content $page -Unexpected 'ModulePage' -Message 'A-05 must not remain a ModulePage shell'
|
||||
@@ -33,28 +31,29 @@ foreach ($required in @(
|
||||
'import AuthPageShell from "@/components/AuthPageShell.vue";',
|
||||
'a01-vnext-divider-v1.png',
|
||||
'a01-scroll-primary-v3.png',
|
||||
'adaptive.adaptive-feedback-toast',
|
||||
'a01-scroll-dialog-v3.png',
|
||||
'import AppToast from "@/components/AppToast.vue";',
|
||||
'chevron-right.png',
|
||||
'v-model.trim="phone"',
|
||||
'v-model.trim="verificationCode"',
|
||||
'v-model="password"',
|
||||
'v-model="confirmPassword"',
|
||||
'const prepareGetCode = () =>',
|
||||
'const submitReset = () =>',
|
||||
'const prepareGetCode = async () =>',
|
||||
'const submitReset = async () =>',
|
||||
'const fieldErrors = ref({',
|
||||
'const successVisible = ref(false)',
|
||||
'class="feedback-toast"',
|
||||
'class="success-layer"',
|
||||
'const prepareLogin = () => uni.redirectTo({ url: "/pages/auth/a01-entry" });',
|
||||
'if (!/^1\d{10}$/.test(phone.value))',
|
||||
'if (!/^\d{6}$/.test(verificationCode.value))',
|
||||
'<AppToast :visible="feedbackVisible" :message="feedbackMessage" />',
|
||||
'title="密码已重设"',
|
||||
'if (!isAuthPhone(phone.value))',
|
||||
'if (!/^\d{4}$/.test(verificationCode.value))',
|
||||
'<TacVerification',
|
||||
'AUTH_TAC_SCENE.FORGOT_PASSWORD',
|
||||
'await appApi.resetPassword',
|
||||
'validatePassword(password.value)',
|
||||
'PASSWORD_POLICY_MESSAGE',
|
||||
'if (password.value !== confirmPassword.value)',
|
||||
'adaptive.adaptive-feedback-toast;',
|
||||
'top: calc(var(--status-bar-height, 0px) + 24rpx);',
|
||||
'max-height: calc(var(--app-viewport-height) - 40px);'
|
||||
'role="alert"',
|
||||
'aria-describedby',
|
||||
':visible="successVisible"'
|
||||
)) {
|
||||
Assert-Contains -Content $page -Expected $required -Message "Missing A-05 reset-password contract: $required"
|
||||
}
|
||||
@@ -62,8 +61,7 @@ Assert-Contains -Content $page -Expected $resetCopy -Message 'A-05 must visibly
|
||||
Assert-Contains -Content $page -Expected $confirmPasswordCopy -Message 'A-05 must require password confirmation'
|
||||
Assert-Contains -Content $page -Expected $getCodeCopy -Message 'A-05 must expose the verification-code action'
|
||||
Assert-Contains -Content $page -Expected $loginCopy -Message 'A-05 must provide the A01 return path'
|
||||
Assert-Contains -Content $page -Expected $sliderPendingCopy -Message 'A-05 must defer the real slider to the interface stage'
|
||||
Assert-NotContains -Content $catalog -Unexpected 'a05:' -Message 'A-05 must not remain in the temporary page catalog'
|
||||
Assert-NotContains -Content $page -Unexpected '滑动验证待接口接入' -Message 'A-05 must not retain the retired TAC placeholder'
|
||||
foreach ($forbidden in @('class="page-canvas"', 'class="page-backdrop"', 'mode="scaleToFill"', '1665rpx', 'a01-red-hall-ink-backdrop-v1.png')) {
|
||||
Assert-NotContains -Content $page -Unexpected $forbidden -Message "A05 retains rejected page coordinates: $forbidden"
|
||||
}
|
||||
@@ -84,7 +82,7 @@ foreach ($obsoleteVisual in @(
|
||||
}
|
||||
|
||||
$primarySkinCount = ([regex]::Matches($page, 'a01-scroll-primary-v3\.png')).Count
|
||||
if ($primarySkinCount -ne 2) { throw "A-05 must use the approved primary skin exactly twice, found $primarySkinCount" }
|
||||
if ($primarySkinCount -ne 1) { throw "A-05 page-local submit action must use the approved primary skin exactly once, found $primarySkinCount" }
|
||||
foreach ($nativeUi in @('uni.showToast', 'uni.showModal', 'uni.showLoading', 'uni.showActionSheet')) {
|
||||
Assert-NotContains -Content $page -Unexpected $nativeUi -Message "A-05 must not use native UniApp feedback: $nativeUi"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user