chore: remove debug code and restore phone authorization as required

- Remove debug register page entry and console.log from login
- Remove phone skip option, phone authorization is mandatory
- Restore incomplete registration check (no phone → redirect to register)
这个提交包含在:
Guoguo
2026-05-07 05:54:37 -07:00
父节点 b17f8cbfb3
当前提交 8427d35fb3
修改 6 个文件,包含 8 行新增65 行删除
+4 -21
查看文件
@@ -18,8 +18,7 @@ Page({
loading: false,
avatarUrl: DEFAULT_AVATAR,
nickname: '',
phone: '',
phoneSkipped: false
phone: ''
},
onLoad: function () {
@@ -48,26 +47,10 @@ Page({
}
},
onSkipPhone: function () {
var self = this
wx.showModal({
title: '跳过手机号',
content: '跳过后部分功能可能受限,确定跳过吗?',
success: function (res) {
if (res.confirm) {
self.setData({ phoneSkipped: true })
}
}
})
},
onGetPhoneNumber: function (e) {
var self = this
console.log('[register] getPhoneNumber detail:', JSON.stringify(e.detail))
if (!e.detail || !e.detail.code) {
var errMsg = (e.detail && e.detail.errMsg) || ''
console.log('[register] getPhoneNumber failed:', errMsg)
wx.showToast({ title: '手机号授权未成功,可跳过此步骤', icon: 'none' })
wx.showToast({ title: '需要授权手机号才能完成注册', icon: 'none' })
return
}
self.setData({ loading: true })
@@ -113,8 +96,8 @@ Page({
var nickname = (self.data.nickname || '').trim()
var avatarUrl = self.data.avatarUrl
if (!self.data.phone && !self.data.phoneSkipped) {
wx.showToast({ title: '请先授权手机号,或点击跳过', icon: 'none' })
if (!self.data.phone) {
wx.showToast({ title: '请先授权手机号', icon: 'none' })
return
}