From 399a3397c775cf1ea8cd73539cb9fd713d598842 Mon Sep 17 00:00:00 2001 From: wangfukang <15630117759@163.com> Date: Sat, 13 Jun 2026 09:33:26 +0800 Subject: [PATCH] 1 --- package1/ieBrowser/chat.vue | 548 ++++++++++++++++++++-------- package1/ieBrowser/index.vue | 176 +++++---- package1/ieBrowser/messages.vue | 50 ++- package1/ieBrowser/mySpace.vue | 414 +++++++++++++++++++++ package1/ieBrowser/profileSetup.vue | 39 +- package1/ieBrowser/space.vue | 137 +++++++ package1/ieBrowser/universe.vue | 479 ++++++++++++++++++++++-- 7 files changed, 1585 insertions(+), 258 deletions(-) create mode 100644 package1/ieBrowser/mySpace.vue create mode 100644 package1/ieBrowser/space.vue diff --git a/package1/ieBrowser/chat.vue b/package1/ieBrowser/chat.vue index 99ed2b4..e07ddb6 100644 --- a/package1/ieBrowser/chat.vue +++ b/package1/ieBrowser/chat.vue @@ -12,9 +12,6 @@ {{ companion.name }} {{ roomModeText }} · 可以随时回来继续聊 - - 🔥x{{ streak.streakDays }} - ··· @@ -23,7 +20,7 @@ FM 电台陪伴中 - 你们已经安静陪伴了 {{ silentMinutes }} 分钟 + 你们正在安静陪伴中 @@ -34,11 +31,13 @@ - + 请勿发送涉黄涉暴反动侮辱等内容 发送图片、音视频消息涉及内容审核,可能略有延迟 - 已连接 + + {{ streak.streakDays > 0 ? '🔥x' + streak.streakDays : '已连接' }} + - + - {{ waitingCount }} 个人正在等一句话 + 同频一题 + {{ dailyQuestion.content }} + {{ dailyQuestion.answered ? '看答案' : '去回答' }} › @@ -96,42 +98,39 @@ - - - - 🎫 - 今日漂流票 + + + + + 🎫 + 今日漂流票 + + + + {{ chancesLeft }} + + - - - {{ chancesLeft }} - + + + 想遇见谁 + 偏好设置 - - - 想遇见谁 - 偏好设置 - - - - 同频一题 - {{ dailyQuestion.content }} - {{ dailyQuestion.answered ? '看答案' : '去回答' }} › - + + “{{ displayMoodCopy }}” + - - - - {{ item.icon }} - {{ item.label }} + + + + {{ item.icon }} + {{ item.label }} + - - “{{ displayMoodCopy }}” - @@ -801,7 +800,7 @@ .ie-page { position: relative; min-height: 100vh; - padding: 0 32rpx 150rpx; + padding: 0 32rpx 230rpx; box-sizing: border-box; color: #161b2e; overflow: hidden; @@ -972,6 +971,7 @@ .hero-live { display: inline-flex; align-items: center; + max-width: 100%; margin-top: 12rpx; padding: 8rpx 22rpx; border-radius: 999rpx; @@ -984,15 +984,44 @@ font-weight: 600; } + .daily-live { + box-sizing: border-box; + gap: 10rpx; + padding-right: 18rpx; + } + .live-dot { width: 14rpx; height: 14rpx; - margin-right: 12rpx; border-radius: 50%; background: #2bd9a4; animation: liveDotPulse 1.8s ease-out infinite; } + .daily-live-tag, + .daily-live-go { + flex-shrink: 0; + font-weight: 900; + } + + .daily-live-tag { + color: #6c5ce7; + } + + .daily-live-text { + flex: 1; + min-width: 0; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + color: rgba(22, 27, 46, .66); + } + + .daily-live-go { + color: #8b7cff; + font-size: 21rpx; + } + .hero-profile { display: flex; align-items: center; @@ -1327,25 +1356,38 @@ animation: ctaBreath 2.2s ease-in-out infinite; } - /* ============ 漂流票 + 想遇见谁 ============ */ - .play-deck { + /* ============ 底部功能面板 ============ */ + .home-action-panel { position: relative; z-index: 4; + margin-top: 26rpx; + padding: 14rpx 14rpx 18rpx; + border-radius: 32rpx; + background: + linear-gradient(180deg, rgba(255, 255, 255, .82), rgba(255, 255, 255, .68)), + radial-gradient(circle at 16% 0%, rgba(169, 255, 231, .28), transparent 220rpx), + radial-gradient(circle at 88% 22%, rgba(162, 155, 254, .2), transparent 240rpx); + border: 1rpx solid rgba(255, 255, 255, .9); + backdrop-filter: blur(22rpx); + box-shadow: 0 22rpx 70rpx rgba(96, 112, 160, .14), inset 0 1rpx 0 rgba(255, 255, 255, .92); + } + + .play-deck { display: flex; align-items: stretch; - gap: 20rpx; - margin-top: 24rpx; + top: 12rpx; + gap: 12rpx; } .ticket { flex: 1.3; display: flex; align-items: stretch; - min-height: 100rpx; - border-radius: 26rpx; + min-height: 94rpx; + border-radius: 24rpx; overflow: hidden; background: #ffffff; - box-shadow: 0 14rpx 36rpx rgba(96, 112, 160, .14); + box-shadow: 0 12rpx 30rpx rgba(96, 112, 160, .12); transition: transform .16s ease; } @@ -1358,7 +1400,7 @@ display: flex; align-items: center; gap: 10rpx; - padding: 0 14rpx 0 22rpx; + padding: 0 12rpx 0 18rpx; background: linear-gradient(135deg, #dffef4, #aef5dd); } @@ -1368,9 +1410,10 @@ .ticket-label { color: #0e4a35; - font-size: 23rpx; + font-size: 22rpx; font-weight: 900; letter-spacing: 1rpx; + white-space: nowrap; } .ticket-divider { @@ -1399,11 +1442,12 @@ align-items: center; justify-content: center; gap: 6rpx; - padding: 0 26rpx; + min-width: 106rpx; + padding: 0 16rpx; } .ticket-num { - font-size: 48rpx; + font-size: 46rpx; font-weight: 900; color: #6c5ce7; background: linear-gradient(120deg, #6c5ce7, #00b894); @@ -1426,12 +1470,12 @@ align-items: center; justify-content: center; gap: 4rpx; - min-height: 100rpx; - border-radius: 26rpx; + min-height: 94rpx; + border-radius: 24rpx; overflow: hidden; color: #fff; background: linear-gradient(135deg, #6c5ce7, #a29bfe); - box-shadow: 0 16rpx 40rpx rgba(108, 92, 231, .32); + box-shadow: 0 14rpx 34rpx rgba(108, 92, 231, .28); transition: transform .16s ease; animation: entryWiggle 5s ease-in-out infinite; } @@ -1467,19 +1511,29 @@ z-index: 4; display: flex; align-items: center; - gap: 14rpx; - margin-top: 24rpx; - padding: 16rpx 22rpx; + gap: 12rpx; + margin-top: 28rpx; + padding: 22rpx 18rpx; border-radius: 999rpx; - background: rgba(255, 255, 255, .66); + background: rgba(255, 255, 255, .76); border: 1rpx solid rgba(255, 255, 255, .8); - box-shadow: 0 14rpx 32rpx rgba(96, 112, 160, .12); + box-shadow: 0 10rpx 26rpx rgba(96, 112, 160, .1); } .daily-q-bar:active { transform: scale(.98); } + .mood-copy-bar { + justify-content: center; + min-height: 58rpx; + color: rgba(22, 27, 46, .62); + font-size: 23rpx; + line-height: 32rpx; + text-align: center; + font-weight: 800; + } + .daily-q-tag { flex-shrink: 0; padding: 6rpx 16rpx; @@ -1510,7 +1564,8 @@ .mood-strip { position: relative; z-index: 4; - margin-top: 58rpx; + margin-top: 22rpx; + padding: 2rpx 4rpx 0; } .strip-tag { @@ -1529,21 +1584,20 @@ .mood-orbs { display: flex; justify-content: space-between; - margin-top: 22rpx; - padding: 0 10rpx; + padding: 0 8rpx; } .mood-orb { display: flex; flex-direction: column; align-items: center; - gap: 10rpx; + gap: 8rpx; } .orb-face { position: relative; - width: 104rpx; - height: 104rpx; + width: 94rpx; + height: 94rpx; border-radius: 50%; display: flex; align-items: center; @@ -1574,7 +1628,7 @@ } .orb-emoji { - font-size: 48rpx; + font-size: 44rpx; line-height: 1; } @@ -1598,11 +1652,11 @@ position: relative; width: fit-content; max-width: 620rpx; - margin: 40rpx auto 0; + margin: 24rpx auto 0; display: flex; align-items: center; justify-content: center; - padding: 14rpx 28rpx; + padding: 12rpx 24rpx; border-radius: 999rpx; color: rgba(22, 27, 46, .58); background: rgba(255, 255, 255, .76); diff --git a/package1/ieBrowser/messages.vue b/package1/ieBrowser/messages.vue index d55bab1..30bbbf4 100644 --- a/package1/ieBrowser/messages.vue +++ b/package1/ieBrowser/messages.vue @@ -9,15 +9,21 @@ 消息 - 这里不是聊天列表,只放未完成的陪伴。 + 聊天列表,未完成的陪伴。 - - {{ item.avatar }} + + + {{ item.avatar }} + {{ item.unreadCount > 99 ? '99+' : item.unreadCount }} + {{ item.name }} {{ item.desc }} + + 🔥x{{ item.streakDays }} + 再遇见 没有未完成的关系,也是一种轻松。 @@ -85,6 +91,7 @@ if (this.unreadTimer) return this.unreadTimer = setInterval(() => { this.refreshUnreadCount() + this.refreshRecords() }, 15000) }, stopUnreadTimer() { @@ -107,10 +114,27 @@ name: item.anonymousName || '半匿名漂流者', avatar: item.avatarText || ((item.currentMode || item.mode) === 'e' ? '光' : '月'), avatarUrl: item.avatarUrl || '', + unreadCount: Number(item.unreadCount) || 0, desc: (item.unreadCount > 0 ? `${item.unreadCount} 条未读 · ` : '') + (item.intro || (remeet ? '可以从聊天记录继续这段对话。' : (item.summary || '这段聊天已保留在记录里。'))), + streakDays: Number(item.streakDays) || 0, + streakExpiring: !!item.streakExpiring, + streakRewardInterval: item.streakRewardInterval || 7, remeet } }, + // 轮询刷新第一页:更新未读数/最新摘要,新会话或有新消息的会话提到顶部,不影响已加载的分页 + async refreshRecords() { + if (this.loading || this.deleting) return + try { + const page = await pageIeRecords(1, this.pageSize) + const list = page && page.records ? page.records.map(this.normalizeRecord) : [] + if (!list.length) return + const freshIds = new Set(list.map(item => item.id)) + this.requests = list.concat(this.requests.filter(item => !freshIds.has(item.id))) + } catch (e) { + // 轮询失败静默,下个周期再试 + } + }, async loadRecords() { if (this.loading || !this.hasMore) return this.loading = true @@ -125,7 +149,7 @@ this.loading = false } }, - backHome() { uni.redirectTo({ url: '/pages/index/index' }) }, + backHome() { uni.switchTab({ url: '/pages/index/index' }) }, confirmDelete(item) { if (!item || !item.id) return this.deleteTarget = item @@ -161,6 +185,13 @@ '&avatarUrl=' + encodeURIComponent(item.avatarUrl || '') + '"e=' + encodeURIComponent(item.desc || '') }) + }, + showStreakTip(item) { + if (!item || !item.streakDays) return + const tip = item.streakExpiring + ? `火花 x${item.streakDays},今天还没续上,互发一句就不会熄灭` + : `连续 ${item.streakDays} 天互相陪伴,每满 ${item.streakRewardInterval || 7} 天双方各得一次匹配机会` + uni.showToast({ title: tip, icon: 'none', duration: 2600 }) } } } @@ -169,17 +200,19 @@ diff --git a/package1/ieBrowser/mySpace.vue b/package1/ieBrowser/mySpace.vue new file mode 100644 index 0000000..2b635be --- /dev/null +++ b/package1/ieBrowser/mySpace.vue @@ -0,0 +1,414 @@ + + + + + diff --git a/package1/ieBrowser/profileSetup.vue b/package1/ieBrowser/profileSetup.vue index 9d40fdc..6e55e4c 100644 --- a/package1/ieBrowser/profileSetup.vue +++ b/package1/ieBrowser/profileSetup.vue @@ -84,7 +84,20 @@ 上一步 - {{ step === 5 ? '进入 i/e 此刻' : '继续' }} + {{ submitButtonText }} + + + + + + + + {{ form.currentMode }} + + 创建身份中 + 资料正在进行内容审核,请稍等一下 + + @@ -127,6 +140,10 @@ computed: { avatarPreview() { return (this.form.anonymousName || this.form.avatarText || '我').slice(0, 1) + }, + submitButtonText() { + if (this.submitting) return this.step === 5 ? '创建身份中...' : '处理中...' + return this.step === 5 ? '进入 i/e 此刻' : '继续' } }, onLoad(options) { @@ -310,7 +327,6 @@ return } this.submitting = true - uni.showLoading({ title: '正在进入 i/e', mask: true }) try { const areaInfo = this.getAreaInfo() if (!areaInfo.regionId) { @@ -326,7 +342,6 @@ uni.redirectTo({ url: this.isEdit ? '/package1/ieBrowser/universe' : '/package1/ieBrowser/index' }) } finally { this.submitting = false - uni.hideLoading() } }, back() { @@ -387,4 +402,22 @@ .ghost, .solid { flex: 1; height: 96rpx; border-radius: 999rpx; text-align: center; line-height: 96rpx; font-size: 28rpx; font-weight: 800; } .ghost { color: rgba(21,26,45,.58); background: rgba(255,255,255,.68); } .solid { color: #11162a; background: linear-gradient(135deg, #effffb, #a9ffe7); box-shadow: 0 22rpx 58rpx rgba(169,255,231,.28); } + .solid.disabled { opacity: .7; } + .creating-mask { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 48rpx; box-sizing: border-box; background: rgba(20,26,46,.24); backdrop-filter: blur(18rpx); } + .creating-card { width: 100%; padding: 52rpx 40rpx 42rpx; border-radius: 44rpx; text-align: center; background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(247,249,255,.9)); border: 1rpx solid rgba(255,255,255,.92); box-shadow: 0 34rpx 100rpx rgba(42,50,86,.22); box-sizing: border-box; } + .creating-orbit { position: relative; width: 132rpx; height: 132rpx; margin: 0 auto; border-radius: 50%; background: radial-gradient(circle, #effffb 0%, #a9ffe7 58%, rgba(169,255,231,.2) 100%); box-shadow: 0 20rpx 54rpx rgba(96,200,170,.26), inset 0 2rpx 0 rgba(255,255,255,.9); animation: creatingPulse 1.8s ease-in-out infinite; } + .creating-orbit::before { content: ''; position: absolute; inset: -18rpx; border-radius: 50%; border: 3rpx dashed rgba(108,105,216,.24); animation: creatingSpin 5s linear infinite; } + .creating-core { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); color: #151a2d; font-size: 48rpx; font-weight: 900; } + .creating-dot { position: absolute; width: 18rpx; height: 18rpx; border-radius: 50%; background: #8b7cff; box-shadow: 0 0 24rpx rgba(139,124,255,.45); } + .dot-a { right: 2rpx; top: 22rpx; animation: dotFloatA 1.7s ease-in-out infinite; } + .dot-b { left: 8rpx; bottom: 26rpx; background: #ff9fc1; animation: dotFloatB 1.9s ease-in-out infinite; } + .creating-title { margin-top: 34rpx; font-size: 36rpx; font-weight: 900; color: #151a2d; } + .creating-sub { margin-top: 12rpx; color: rgba(21,26,45,.52); font-size: 24rpx; line-height: 38rpx; } + .creating-progress { height: 10rpx; margin-top: 34rpx; border-radius: 999rpx; overflow: hidden; background: rgba(21,26,45,.06); } + .creating-progress view { width: 44%; height: 100%; border-radius: 999rpx; background: linear-gradient(90deg, #a9ffe7, #8b7cff, #ff9fc1); animation: loadingSlide 1.2s ease-in-out infinite; } + @keyframes creatingSpin { from { transform: rotate(0); } to { transform: rotate(360deg); } } + @keyframes creatingPulse { 0%, 100% { transform: scale(.98); } 50% { transform: scale(1.04); } } + @keyframes dotFloatA { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-10rpx, 8rpx); } } + @keyframes dotFloatB { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(12rpx, -8rpx); } } + @keyframes loadingSlide { 0% { transform: translateX(-120%); } 100% { transform: translateX(230%); } } diff --git a/package1/ieBrowser/space.vue b/package1/ieBrowser/space.vue new file mode 100644 index 0000000..d5c1d4d --- /dev/null +++ b/package1/ieBrowser/space.vue @@ -0,0 +1,137 @@ + + + + + diff --git a/package1/ieBrowser/universe.vue b/package1/ieBrowser/universe.vue index 6a4fc66..fa02973 100644 --- a/package1/ieBrowser/universe.vue +++ b/package1/ieBrowser/universe.vue @@ -12,11 +12,10 @@ {{ profile.avatarText || '我' }} {{ profile.anonymousName || '半匿名漂流者' }} {{ profile.intro || '不经营人设,不展示粉丝。这里只记录你更喜欢怎样被陪伴。' }} - 编辑资料 - {{ profile.dailyQuota || 3 }}今日机会 - {{ profile.currentMode || 'i' }}当前状态 + {{ profile.dailyQuota || 3 }}今日匹配总次数 + 我的空间查看动态 › {{ item }} @@ -27,14 +26,61 @@ - - 情绪轨道 - - {{ item.day }} - - {{ item.mood }} + + + + 我的 i/e 资料 + + + + i/e + + 当前身份 + {{ modeText(profile.currentMode) }} + + 更改 + + + + + 基础资料 + {{ profile.anonymousName || '未设置昵称' }} · {{ genderText(profile.gender) }} + + 更改 + + + # + + 兴趣标签 + {{ profileTagsText }} + + 更改 + + + + + 人格卡片 + {{ profilePersonaText }} + + 更改 + + + + + 匹配偏好 + {{ targetPreferenceText }} + + 更改 + + + + + 当前校区 + {{ profile.regionName || '暂未选择校区' }} + + @@ -45,12 +91,98 @@ + + + + + + {{ editTitle }} + 只修改这一项,其它资料会保留。 + + × + + + + + i + + 安静陪伴 + 慢回复、允许沉默、低压力靠近。 + + + + e + + 轻轻热闹 + 有人开场,聊点废话,把情绪拉亮。 + + + + + + + + {{ editAvatarPreview }} + 点一下换头像 + + 随机一个昵称 + + 性别 + + + {{ item.label }} + + +