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 行删除
+2 -1
查看文件
@@ -26,9 +26,10 @@ App({
loadProfile: function () {
var self = this
http.get('/api/v1/user/profile').then(function (profile) {
return http.get('/api/v1/user/profile').then(function (profile) {
self.globalData.userInfo = profile
self.globalData.userId = String(profile.user_id)
return profile
}).catch(function () {
wx.removeStorageSync('token')
})