fix: audit fixes for registration flow

- loadProfile() now returns Promise (was missing return)
- Avatar upload via COS instead of storing WeChat temp path
- Add POST /user/avatar endpoint with multer + COS SDK
- Incomplete registration detection: redirect to register if phone is empty
这个提交包含在:
Guoguo
2026-05-06 06:18:21 -07:00
父节点 2f6ab74eab
当前提交 52456d850e
修改 6 个文件,包含 185 行新增5 行删除
+1 -1
查看文件
@@ -16,7 +16,7 @@ Page({
app.doLogin().then(function (data) {
self.setData({ loading: false })
if (data && data.is_new_user) {
if (data && (data.is_new_user || !data.user_info || !data.user_info.phone)) {
wx.redirectTo({ url: '/pages/register/register' })
} else {
wx.switchTab({ url: '/pages/index/index' })