feat(spec-3): complete section 3.1/3.2/3.3 activity verify settlement, role_flags, and distribution_relations
这个提交包含在:
@@ -390,7 +390,7 @@ import { ICONS } from '@/common/icons.js';
|
||||
import { getCurrentThemeKey, setTheme, THEME_KEYS, applyThemeToNativeUI } from '@/common/theme.js';
|
||||
import { getCurrentRole, setCurrentRole, ROLE_TYPES, toggleRole as toggleUserRole, isExpertCertified, getExpertCertStatus, setExpertCertStatus, CERT_STATUS } from '@/common/role.js';
|
||||
import { getNavBarInfo } from '@/common/nav.js';
|
||||
import { getUserProfile, rechargeBalance, withdrawCommission, getUserFinanceRecords, updateUserProfile, uploadImage, getRechargeTiers, getPlatformConfigs, applyExpertCert, getUserWithdrawals, getFavorites, removeFavorite, getDistributionTeam, getDistributionRecords, getMyReports } from '@/common/api.js';
|
||||
import { getUserProfile, rechargeBalance, withdrawCommission, getUserFinanceRecords, updateUserProfile, uploadImage, getRechargeTiers, getPlatformConfigs, applyExpertCert, getUserWithdrawals, getFavorites, removeFavorite, getDistributionTeam, getDistributionRecords, getMyReports, bindInviteCode } from '@/common/api.js';
|
||||
|
||||
const DEFAULT_GUEST_AVATAR = 'https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?w=200';
|
||||
const isLoggedIn = ref(true);
|
||||
@@ -624,6 +624,20 @@ const loadUserProfile = async (targetId) => {
|
||||
...(uni.getStorageSync('PW_USER_INFO') || {}),
|
||||
...user.value
|
||||
});
|
||||
// 若通过小程序太阳码海报进入带有待绑定的推荐人标识且当前尚未绑定上级,首次登录自动建立父子关联
|
||||
const pendingInviter = uni.getStorageSync('PENDING_INVITER_CODE');
|
||||
if (pendingInviter && !profile.inviterId) {
|
||||
bindInviteCode(uid, pendingInviter)
|
||||
.then((res) => {
|
||||
uni.removeStorageSync('PENDING_INVITER_CODE');
|
||||
if (res && res.inviterId) {
|
||||
user.value.inviterId = res.inviterId;
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
uni.removeStorageSync('PENDING_INVITER_CODE');
|
||||
});
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
console.warn('[User] 加载用户信息异常:', err.message);
|
||||
|
||||
在新工单中引用
屏蔽一个用户