fix:前后端校验手机号区域码 #104

Merged
kdletters merged 9 commits from fix-login-autofill+86 into master 2026-07-23 14:52:57 +08:00
Member

来自今早群友反映
before:
shotmd-1784692399.jpg
and failed
after:
shotmd-1784702966.jpg
shotmd-1784702843.jpg
shotmd-1784787134.jpg

来自今早群友反映 before: ![shotmd-1784692399.jpg](/attachments/3ab36252-78f4-44e2-bb51-fca84badc79e) and failed after: ![shotmd-1784702966.jpg](/attachments/3eea7ec9-8aca-43f6-a675-1316162619d4) ![shotmd-1784702843.jpg](/attachments/29182a41-26cf-4954-be16-de060d844d9c) ![shotmd-1784787134.jpg](/attachments/c04a1981-c6bf-4a26-b5ad-d2af51d74a29) * https://developers.weixin.qq.com/miniprogram/dev/server/API/user-info/phone-number/api_getphonenumber.html#Res-phone-info-Object-Payload 参考微信这个文档修改了微信返回的struct 手机号 区域码字段不应是Optional * 登录注册改密码改绑定等 api 把单一 phone字段改成 country_code(可选,缺省为86) + pure_phone_number 分别进行了前后端校验
k88936 added 1 commit 2026-07-22 12:00:04 +08:00
fix: improve phone number input handling and standardize browser autofill behavior
Project CI / Native shell tests (pull_request) Successful in 6m10s
Project CI / Frontend tests (pull_request) Successful in 1m37s
Project CI / Repository checks (pull_request) Successful in 2m49s
Project CI / Backend tests (pull_request) Successful in 6m59s
bfb4d3d3b9
- Updated `autoComplete` attributes to `tel-national` for better compatibility with domestic phone numbers.
- Added `normalizePhoneInput` in `authService` to handle browser autofills with `+86` or `86` prefixes for mainland China numbers.
- Enhanced tests to cover phone number normalization logic.
k88936 changed title from fix: improve phone number input handling and standardize browser autofill behavior to fix:登录 手机号浏览器自动填充+86导致格式错误 2026-07-22 12:01:42 +08:00
k88936 requested review from kdletters 2026-07-22 13:07:37 +08:00
Member

不建议修改自动填充,而是主动过滤区号

不建议修改自动填充,而是主动过滤区号
k88936 added 1 commit 2026-07-22 14:52:21 +08:00
revert: retain tel autocomplete for phone fields
Project CI / Backend tests (pull_request) Successful in 10m57s
Project CI / Repository checks (pull_request) Successful in 3m23s
Project CI / Frontend tests (pull_request) Successful in 2m31s
Project CI / Native shell tests (pull_request) Successful in 6m47s
afe847c400
k88936 added 1 commit 2026-07-22 18:08:52 +08:00
Merge branch 'master' into fix-login-autofill+86
Project CI / Repository checks (pull_request) Successful in 1m0s
Project CI / Frontend tests (pull_request) Successful in 31s
Project CI / Native shell tests (pull_request) Successful in 2m31s
Project CI / Backend tests (pull_request) Failing after 1m39s
4db7d4cc5d
k88936 added 1 commit 2026-07-22 19:07:54 +08:00
Merge branch 'master' into fix-login-autofill+86
Project CI / Repository checks (pull_request) Successful in 40s
Project CI / Frontend tests (pull_request) Successful in 1m22s
Project CI / Native shell tests (pull_request) Successful in 2m29s
Project CI / Backend tests (pull_request) Successful in 3m31s
c45aa287b0
k88936 added 1 commit 2026-07-23 10:12:07 +08:00
Merge branch 'master' into fix-login-autofill+86
Project CI / Frontend tests (pull_request) Successful in 33s
Project CI / Repository checks (pull_request) Successful in 2m23s
Project CI / Backend tests (pull_request) Successful in 3m22s
Project CI / Native shell tests (pull_request) Successful in 2m6s
3ad79572ba
k88936 added 2 commits 2026-07-23 14:10:01 +08:00
按微信官方响应文档将 phoneNumber、purePhoneNumber、countryCode 设为必填字段
补充字段缺失、错误响应和空字符串的失败关闭测试
统一手机号国家码与纯号码校验
Project CI / Frontend tests (pull_request) Successful in 30s
Project CI / Native shell tests (pull_request) Successful in 2m10s
Project CI / Backend tests (pull_request) Failing after 7s
Project CI / Repository checks (pull_request) Failing after 8s
994b7119ec
认证请求以 countryCode 与 purePhoneNumber 替换旧 phone 字段
后端默认国家码 86 并拒绝其他国家码,复用纯手机号规范化生成 E.164
微信手机号绑定强制使用 provider 返回的国家码和纯号码并补齐前后端测试文档
k88936 added 1 commit 2026-07-23 14:10:52 +08:00
Merge branch 'master' into fix-login-autofill+86
Project CI / Frontend tests (pull_request) Successful in 47s
Project CI / Repository checks (pull_request) Successful in 57s
Project CI / Native shell tests (pull_request) Successful in 2m11s
Project CI / Backend tests (pull_request) Successful in 3m50s
c6d60affec
Author
Member
* https://developers.weixin.qq.com/miniprogram/dev/server/API/user-info/phone-number/api_getphonenumber.html#Res-phone-info-Object-Payload 参考微信这个文档修改了微信返回的struct 手机号 区域码字段不应是Optional * 登录注册改密码改绑定等 api 把单一 phone字段改成 country_code(可选,缺省为86) + pure_phone_number 分别进行了前后端校验
k88936 changed title from fix:登录 手机号浏览器自动填充+86导致格式错误 to fix:前后端校验手机号区域码 2026-07-23 14:33:58 +08:00
k88936 added 1 commit 2026-07-23 14:44:30 +08:00
Merge branch 'master' into fix-login-autofill+86
Project CI / Frontend tests (pull_request) Successful in 38s
Project CI / Repository checks (pull_request) Successful in 52s
Project CI / Native shell tests (pull_request) Successful in 2m18s
Project CI / Backend tests (pull_request) Successful in 3m35s
60c6425c86
# Conflicts:
#	docs/project-memory/shared-memory/decision-log.md
kdletters scheduled this pull request to auto merge when all checks succeed 2026-07-23 14:52:39 +08:00
kdletters approved these changes 2026-07-23 14:52:55 +08:00
kdletters merged commit 44748b7846 into master 2026-07-23 14:52:57 +08:00
kdletters deleted branch fix-login-autofill+86 2026-07-23 14:52:58 +08:00
Sign in to join this conversation.