diff --git a/frontend/pages/asset-detail/asset-detail.vue b/frontend/pages/asset-detail/asset-detail.vue index 686aa3e..d44b347 100644 --- a/frontend/pages/asset-detail/asset-detail.vue +++ b/frontend/pages/asset-detail/asset-detail.vue @@ -114,6 +114,19 @@ --> + + + + + 链上哈希 + + + + + {{ displayTxHash }} + + + @@ -143,8 +156,7 @@ 链上哈希 - {{ showTxHash ? displayTxHash - : hiddenTxHash }} + {{ hiddenTxHash }} @@ -1026,6 +1038,62 @@ onUnmounted(() => { color: rgba(255, 255, 255, 0.75); } +/* 链上哈希遮罩层 */ +.txhash-mask { + position: fixed; + left: 0; + right: 0; + bottom: 24rpx; + z-index: 999; + display: flex; + align-items: center; + justify-content: center; + padding: 0 64rpx; + +} + +.txhash-popup { + border-radius: 24rpx; + padding: 32rpx; + background: url('/static/rank/activity-support-icon/beijingkuang.png') no-repeat center center; + background-size: 105% 120%; +} + +.txhash-popup-header { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 24rpx; +} + +.txhash-popup-title { + font-size: 32rpx; + font-weight: bold; + color: #fff; + font-family: 'yt', sans-serif; +} + +.txhash-popup-close { + padding: 8rpx; +} + +.close-icon { + width: 40rpx; + height: 40rpx; +} + +.txhash-popup-content { + display: block; + font-size: 26rpx; + color: #fff; + font-family: 'yt', sans-serif; + word-break: break-all; + line-height: 1.6; + background-color: rgba(0, 0, 0, 0.2); + padding: 20rpx; + border-radius: 12rpx; +} + /* 点赞用户列表 */ .like-users-list { display: flex; diff --git a/frontend/pages/components/BottomNav.vue b/frontend/pages/components/BottomNav.vue index 0761970..4bc61ce 100644 --- a/frontend/pages/components/BottomNav.vue +++ b/frontend/pages/components/BottomNav.vue @@ -56,7 +56,8 @@ const navItems = [ name: '铸爱', icon: '/static/icon/castlove.png', angle: 90.01, // 正上方 - path: '/pages/castlove/mall' + path: '/pages/castlove/mall', + rotate: '8deg' }, { name: '星城', @@ -107,7 +108,8 @@ const getNavIconStyle = (index) => { return { '--x': `${x}rpx`, '--y': `${y}rpx`, - '--delay': `${delay}s` + '--delay': `${delay}s`, + '--rotate': item.rotate || '0deg' }; }; @@ -237,6 +239,7 @@ const handleNavClick = (index) => { transition: transform 0.3s ease, filter 0.3s ease; filter: drop-shadow(0 6rpx 16rpx rgba(0, 0, 0, 0.4)) drop-shadow(0 2rpx 8rpx rgba(0, 0, 0, 0.2)); position: relative; + transform: rotate(var(--rotate)); } /* 底部倒影效果 */ diff --git a/frontend/pages/profile/profile.vue b/frontend/pages/profile/profile.vue index c41e995..e4cd31d 100644 --- a/frontend/pages/profile/profile.vue +++ b/frontend/pages/profile/profile.vue @@ -2,256 +2,273 @@ - + - - + + - - - - - - - + + @@ -268,7 +285,7 @@ import Avatar from '../components/Avatar.vue'; import { getUserProfileApi, deleteAccountApi, updateNicknameApi, updatePasswordApi, getFanIdentitiesApi, addFanIdentityApi, getMyFanIdentitiesApi, switchFanIdentityApi, getOssSignatureApi, updateAvatarApi } from '@/utils/api'; import { validateNickname } from '@/utils/validator.js'; import { clearAvatarCache } from '@/utils/avatarCache'; -import GuideListModal from '@/components/GuideListModal.vue'; +import GuideModal from '@/pages/tasks/GuideModal.vue'; import GuideOverlay from '@/components/GuideOverlay.vue'; import { getClaimableRewardCount @@ -295,8 +312,13 @@ const newPassword = ref(''); const showOldPassword = ref(false); // 新手引导 -const showGuideListModal = ref(false); +const showGuideModal = ref(false); const guideClaimableCount = computed(() => getClaimableRewardCount()); + +// 引导更新回调 +const handleGuideUpdated = () => { + console.log('[Profile] Guide updated'); +}; const showNewPassword = ref(false); // 添加身份弹窗 @@ -325,18 +347,33 @@ const avatarKey = ref(0); // 用于强制刷新Avatar组件 // 手机号 const mobile = ref(''); -// 显示脱敏后的手机号(后端已脱敏,直接显示) +// 显示手机号/地址 +const showBlockNumber = ref(false); +const showMobile = ref(false); + +// 显示手机号(根据showMobile状态显示脱敏或未脱敏) const displayMobile = computed(() => { - return mobile.value || ''; + console.log('displayMobile computed, mobile:', mobile.value, 'showMobile:', showMobile.value); + if (!mobile.value) return ''; + // showMobile为true时显示完整号码,false时显示脱敏号码 + if (showMobile.value) { + return mobile.value; + } + // 脱敏显示:显示前3位和后4位 + const phone = mobile.value; + return phone.length === 11 ? phone.slice(0, 3) + '****' + phone.slice(-4) : phone; }); // 显示截断后的区块链地址 const displayAddress = computed(() => { const address = blockchainAddress.value; + console.log('displayAddress computed, address:', address, 'showBlockNumber:', showBlockNumber.value); // 如果没有地址,显示默认地址 if (!address) return '0xabcd...123c'; + // showBlockNumber为true时显示完整地址,false时显示截断地址 + if (showBlockNumber.value) return address; if (address.length <= 20) return address; - // 显示前10个字符和后8个字符 + // 显示前4个字符和后4个字符 return address.substring(0, 4) + '...' + address.substring(address.length - 4); }); @@ -392,7 +429,7 @@ const fetchUserInfo = async (forceRefresh = false) => { fanTag.value = userForCache.fan_identity?.name || ''; blockchainAddress.value = userForCache.blockchain_address || ''; userAvatarUrl.value = userForCache.avatar_url || ''; - mobile.value = uni.getStorageSync('login_mobile') || ''; + mobile.value = userForCache.mobile || uni.getStorageSync('login_mobile') || ''; } } catch (error) { console.error('获取用户信息失败:', error); @@ -408,7 +445,7 @@ const fetchUserInfo = async (forceRefresh = false) => { fanTag.value = cachedUser.fan_identity?.tag || ''; blockchainAddress.value = cachedUser.blockchain_address || ''; userAvatarUrl.value = cachedUser.avatar_url || ''; - mobile.value = uni.getStorageSync('login_mobile') || ''; + mobile.value = cachedUser.mobile || uni.getStorageSync('login_mobile') || ''; } catch (e) { console.error('解析缓存用户信息失败:', e); } @@ -423,6 +460,12 @@ const fetchUserInfo = async (forceRefresh = false) => { } }; +// 切换手机号显示 +const toggleMobileDisplay = () => { + console.log('toggleMobileDisplay called, showMobile:', showMobile.value); + showMobile.value = !showMobile.value; +}; + // 复制UID const copyUid = () => { if (!uid.value) { @@ -445,19 +488,6 @@ const handleViewNickname = () => { }); }; -// 查看手机号 -const handleViewMobile = () => { - if (!displayMobile.value) { - uni.showToast({ title: '未绑定手机号', icon: 'none' }); - return; - } - uni.setClipboardData({ - data: displayMobile.value, - success: () => uni.showToast({ title: '已复制手机号', icon: 'success' }), - fail: () => uni.showToast({ title: '复制失败', icon: 'none' }) - }); -}; - // 复制区块链地址 const copyAddress = () => { if (!blockchainAddress.value) { @@ -917,50 +947,7 @@ const handleDeleteAccount = () => { // 点击新手指引 const handleGuideClick = () => { - showGuideListModal.value = true; -}; - -// 执行引导 -const handleStartGuide = (params) => { - // 支持传入对象 { key, fromStep, targetPage } 或直接传 key - const key = typeof params === 'string' ? params : (params?.key || ''); - const fromStep = typeof params === 'object' ? (params.fromStep ?? 0) : 0; - const targetPage = typeof params === 'object' ? (params.targetPage || '') : ''; - - console.log('[Profile] handleStartGuide:', { key, fromStep, targetPage }); - - showGuideListModal.value = false; - - // 根据引导类型跳转到对应页面 - if (key === 'square_home') { - // 使用 targetPage 跳转到对应页面 - const navigateUrl = targetPage || '/pages/square/square'; - uni.navigateTo({ - url: navigateUrl, - success: () => { - // 延迟执行确保页面已加载 - setTimeout(() => { - if (fromStep === 0) { - store.dispatch("guide/startGuideFromBeginning", key); - } else { - store.dispatch("guide/resumeGuide", key); - } - }, 500); - } - }); - } else { - // 其他引导在当前页面触发 - if (fromStep === 0) { - store.dispatch("guide/startGuideFromBeginning", key); - } else { - store.dispatch("guide/resumeGuide", key); - } - } -}; - -// 领取奖励成功 -const handleClaimSuccess = (reward) => { - console.log("[Profile] 领取奖励成功:", reward); + showGuideModal.value = true; }; // 关闭注销账号弹窗 @@ -1309,12 +1296,12 @@ onShow(() => { display: none; } -.close-icon-img{ +.close-icon-img { width: 80rpx; height: 80rpx; position: relative; - top: 32rpx; - left: 32rpx; + top: 32rpx; + left: 32rpx; } .user-info-card { @@ -1335,7 +1322,7 @@ onShow(() => { align-items: flex-start; /* gap: 30rpx; */ margin-bottom: 0; - + } .avatar-container { @@ -1353,8 +1340,8 @@ onShow(() => { gap: 8rpx; margin-left: 8rpx; background-image: url(/static/rank/activity-support-icon/beijingkuang.png); - background-size: 100% 110%; - background-position: center; + background-size: 100% 110%; + background-position: center; padding: 24rpx 24rpx 24rpx 240rpx; min-width: 356rpx; } @@ -1371,6 +1358,11 @@ onShow(() => { min-width: 112rpx; } +.address-row { + display: flex; + align-items: center; +} + .info-value { font-size: 24rpx; color: #ffffff; @@ -1378,15 +1370,18 @@ onShow(() => { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; + min-width: 200rpx; + } -.uid-value { - max-width: 200rpx; +.uid-value {} + +.toggle-icon { + width: 32rpx; + height: 32rpx; } -.address-value { - max-width: 160rpx; -} +.address-value {} .info-btn { font-size: 20rpx; @@ -1619,8 +1614,10 @@ onShow(() => { .logout-section { padding: 10rpx 30rpx; - padding-bottom: calc(40rpx + constant(safe-area-inset-bottom)); /* iOS 11.0 */ - padding-bottom: calc(40rpx + env(safe-area-inset-bottom)); /* iOS 11.2+ */ + padding-bottom: calc(40rpx + constant(safe-area-inset-bottom)); + /* iOS 11.0 */ + padding-bottom: calc(40rpx + env(safe-area-inset-bottom)); + /* iOS 11.2+ */ display: flex; position: relative; } @@ -1686,7 +1683,10 @@ onShow(() => { .modal-content { width: 80%; max-width: 600rpx; - background: #ffffff; + /* background: #ffffff; */ + background-image: url('/static/starbookcontent/beijing.png'); + background-size: cover; + background-position: center bottom; border-radius: 30rpx; padding: 60rpx 40rpx; box-sizing: border-box; diff --git a/frontend/pages/tasks/GuideModal.vue b/frontend/pages/tasks/GuideModal.vue index 70e7de4..f3b3639 100644 --- a/frontend/pages/tasks/GuideModal.vue +++ b/frontend/pages/tasks/GuideModal.vue @@ -17,7 +17,7 @@ - + diff --git a/frontend/static/icon/castlove.png b/frontend/static/icon/castlove.png index 0023a64..ed9643a 100644 Binary files a/frontend/static/icon/castlove.png and b/frontend/static/icon/castlove.png differ diff --git a/frontend/static/icon/square.png b/frontend/static/icon/square.png index 8cec21f..71f6c45 100644 Binary files a/frontend/static/icon/square.png and b/frontend/static/icon/square.png differ diff --git a/frontend/store/modules/user.js b/frontend/store/modules/user.js index 8842011..0e83320 100644 --- a/frontend/store/modules/user.js +++ b/frontend/store/modules/user.js @@ -96,8 +96,8 @@ const actions = { // 缓存用户信息 const user = res.data.user - // 缓存登录手机号(优先使用后端返回的脱敏手机号) - const loginMobile = user.mobile_masked || mobile + // 缓存登录手机号 + const loginMobile = mobile uni.setStorageSync('login_mobile', loginMobile) uni.setStorageSync('user', JSON.stringify(user)) @@ -131,8 +131,8 @@ const actions = { // 缓存用户信息 const user = res.data.user - // 缓存登录手机号(优先使用后端返回的脱敏手机号) - const loginMobile = user.mobile_masked || mobile + // 缓存登录手机号 + const loginMobile = mobile uni.setStorageSync('login_mobile', loginMobile) uni.setStorageSync('user', JSON.stringify(user))