rename(app): 将应用名称从"干杯日记"更改为"碰盏日记"

- 替换所有文件中的品牌名称引用,包括App.vue、pages.json、uni.scss等
- 更新全局样式、导航栏标题和组件中的文案显示
- 修改分享功能中的应用名称显示
- 调整聊天页面的输入栏键盘适配逻辑
- 在多个页面组件中添加事件发射声明以支持交互功能
This commit is contained in:
cg
2026-07-21 22:20:08 +08:00
parent c4d30b8990
commit 99723497fa
25 changed files with 81 additions and 44 deletions
+2 -2
View File
@@ -5,7 +5,7 @@ import wsManager from './common/websocket'
export default { export default {
onLaunch() { onLaunch() {
console.log('干杯日记 App Launch') console.log('碰盏日记 App Launch')
// 初始化主题 // 初始化主题
this.initTheme() this.initTheme()
// 尝试刷新 token // 尝试刷新 token
@@ -84,7 +84,7 @@ export default {
<style lang="scss"> <style lang="scss">
/* ========================================== /* ==========================================
* 干杯日记 - 全局样式 * 碰盏日记 - 全局样式
* 设计概念: 琥珀夜光 Amber Night * 设计概念: 琥珀夜光 Amber Night
* ========================================== */ * ========================================== */
+1 -1
View File
@@ -1,4 +1,4 @@
/* 干杯日记 - API 服务层 /* 碰盏日记 - API 服务层
* 基于 HaveADrink SDK 封装后端接口 * 基于 HaveADrink SDK 封装后端接口
*/ */
import HaveADrink from 'HaveADrink' import HaveADrink from 'HaveADrink'
+1 -1
View File
@@ -1,4 +1,4 @@
/* 干杯日记 - 常量定义 */ /* 碰盏日记 - 常量定义 */
// 酒类分类 // 酒类分类
export const DRINK_CATEGORIES = [ export const DRINK_CATEGORIES = [
+1 -1
View File
@@ -1,4 +1,4 @@
/* 干杯日记 - Mock 数据 */ /* 碰盏日记 - Mock 数据 */
import { formatDate, calcStandardCups, unitToMl } from './utils' import { formatDate, calcStandardCups, unitToMl } from './utils'
// 模拟用户数据 // 模拟用户数据
+1 -1
View File
@@ -1,4 +1,4 @@
/* 干杯日记 - 主题混入 (Theme Mixin) /* 碰盏日记 - 主题混入 (Theme Mixin)
* 每个页面混入此mixin,自动在onShow时刷新日夜主题 * 每个页面混入此mixin,自动在onShow时刷新日夜主题
* 页面根视图需绑定 :class="themeClass" * 页面根视图需绑定 :class="themeClass"
*/ */
+1 -1
View File
@@ -1,4 +1,4 @@
/* 干杯日记 - 工具函数 */ /* 碰盏日记 - 工具函数 */
import { DRINK_CATEGORIES } from './constants' import { DRINK_CATEGORIES } from './constants'
+1 -1
View File
@@ -1,4 +1,4 @@
/* 干杯日记 - WebSocket 管理器 /* 碰盏日记 - WebSocket 管理器
* 单例模式,负责私信实时通信 * 单例模式,负责私信实时通信
* 支持心跳、自动重连、消息队列 * 支持心跳、自动重连、消息队列
*/ */
+1 -1
View File
@@ -89,7 +89,7 @@
<!-- 品牌底栏 --> <!-- 品牌底栏 -->
<view class="card-brand"> <view class="card-brand">
<view class="brand-left"> <view class="brand-left">
<text class="brand-name">干杯日记</text> <text class="brand-name">碰盏日记</text>
<text class="brand-slogan">记录每一杯的故事</text> <text class="brand-slogan">记录每一杯的故事</text>
</view> </view>
<view class="brand-qr"></view> <view class="brand-qr"></view>
+1
View File
@@ -46,6 +46,7 @@ export default {
props: { props: {
event: { type: Object, default: () => ({}) } event: { type: Object, default: () => ({}) }
}, },
emits: ['tap'],
computed: { computed: {
statusLabel() { statusLabel() {
const map = { open: '报名中', ongoing: '进行中', ended: '已结束' } const map = { open: '报名中', ongoing: '进行中', ended: '已结束' }
+1
View File
@@ -68,6 +68,7 @@ export default {
props: { props: {
feed: { type: Object, default: () => ({}) } feed: { type: Object, default: () => ({}) }
}, },
emits: ['tap', 'like', 'comment', 'share'],
methods: { methods: {
getCatIcon, getCatIcon,
isIconPath, isIconPath,
+2 -1
View File
@@ -20,7 +20,8 @@ export default {
name: 'FriendItem', name: 'FriendItem',
props: { props: {
friend: { type: Object, default: () => ({}) } friend: { type: Object, default: () => ({}) }
} },
emits: ['tap']
} }
</script> </script>
+2 -2
View File
@@ -1,8 +1,8 @@
# 干杯日记 - 后端接口文档 # 碰盏日记 - 后端接口文档
> 版本: v1.0 > 版本: v1.0
> 日期: 2026-07-13 > 日期: 2026-07-13
> 小程序: 干杯日记(uni-app 微信小程序) > 小程序: 碰盏日记(uni-app 微信小程序)
> 基础URL: `https://your-domain.com/api/v1` > 基础URL: `https://your-domain.com/api/v1`
--- ---
+2 -2
View File
@@ -1,9 +1,9 @@
# 干杯日记 - 私信模块接口文档 # 碰盏日记 - 私信模块接口文档
> 版本: v1.0 > 版本: v1.0
> 日期: 2026-07-21 > 日期: 2026-07-21
> 模块: 私信(实时通信) > 模块: 私信(实时通信)
> 小程序: 干杯日记(uni-app 微信小程序) > 小程序: 碰盏日记(uni-app 微信小程序)
> 基础URL: `https://dev.wash-painting.cn/api/v1` > 基础URL: `https://dev.wash-painting.cn/api/v1`
> WebSocket: `wss://dev.wash-painting.cn/ws` > WebSocket: `wss://dev.wash-painting.cn/ws`
+3 -3
View File
@@ -1,16 +1,16 @@
# 干杯日记 - 酒友圈模块接口文档 # 碰盏日记 - 酒友圈模块接口文档
> 版本: v1.0 > 版本: v1.0
> 日期: 2026-07-20 > 日期: 2026-07-20
> 模块: 酒友圈(社交模块) > 模块: 酒友圈(社交模块)
> 小程序: 干杯日记(uni-app 微信小程序) > 小程序: 碰盏日记(uni-app 微信小程序)
> 基础URL: `https://your-domain.com/api/v1` > 基础URL: `https://your-domain.com/api/v1`
--- ---
## 1. 模块概述 ## 1. 模块概述
酒友圈是干杯日记的核心社交模块,包含三大子功能: 酒友圈是碰盏日记的核心社交模块,包含三大子功能:
| 子功能 | 说明 | | 子功能 | 说明 |
|--------|------| |--------|------|
+9 -3
View File
@@ -102,20 +102,26 @@
"path": "pages/chat-list/chat-list", "path": "pages/chat-list/chat-list",
"style": { "style": {
"navigationStyle": "custom", "navigationStyle": "custom",
"navigationBarTitleText": "" "navigationBarTitleText": "",
"backgroundColor": "#0B0B14",
"backgroundColorTop": "#0B0B14",
"backgroundColorBottom": "#0B0B14"
} }
}, },
{ {
"path": "pages/chat/chat", "path": "pages/chat/chat",
"style": { "style": {
"navigationStyle": "custom", "navigationStyle": "custom",
"navigationBarTitleText": "" "navigationBarTitleText": "",
"backgroundColor": "#0B0B14",
"backgroundColorTop": "#0B0B14",
"backgroundColorBottom": "#0B0B14"
} }
} }
], ],
"globalStyle": { "globalStyle": {
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"navigationBarTitleText": "干杯日记", "navigationBarTitleText": "碰盏日记",
"navigationBarBackgroundColor": "#0B0B14", "navigationBarBackgroundColor": "#0B0B14",
"backgroundColor": "#0B0B14", "backgroundColor": "#0B0B14",
"backgroundColorTop": "#0B0B14", "backgroundColorTop": "#0B0B14",
+4 -4
View File
@@ -505,7 +505,7 @@ export default {
ctx.font = `bold 26px ${F}` ctx.font = `bold 26px ${F}`
ctx.setFillStyle(AMBER_DIM) ctx.setFillStyle(AMBER_DIM)
ctx.fillText('干杯日记', P, y) ctx.fillText('碰盏日记', P, y)
y += 30 y += 30
ctx.font = `normal 20px ${F}` ctx.font = `normal 20px ${F}`
ctx.setFillStyle(WHITE_30) ctx.setFillStyle(WHITE_30)
@@ -731,8 +731,8 @@ export default {
const first = drinks[0] const first = drinks[0]
const cat = first ? DRINK_CATEGORIES.find(c => c.id === first.category) : null const cat = first ? DRINK_CATEGORIES.find(c => c.id === first.category) : null
const title = cat const title = cat
? `今晚喝了${cat.name}${first.brand || ''}」- 干杯日记` ? `今晚喝了${cat.name}${first.brand || ''}」- 碰盏日记`
: '今晚的酒局记录 - 干杯日记' : '今晚的酒局记录 - 碰盏日记'
return { return {
title, title,
path: '/pages/index/index', path: '/pages/index/index',
@@ -741,7 +741,7 @@ export default {
}, },
onShareTimeline() { onShareTimeline() {
return { return {
title: '今晚的酒局记录 - 干杯日记', title: '今晚的酒局记录 - 碰盏日记',
query: '' query: ''
} }
}, },
+30 -2
View File
@@ -90,7 +90,7 @@
</scroll-view> </scroll-view>
<!-- 底部输入栏 --> <!-- 底部输入栏 -->
<view class="chat-input-bar"> <view class="chat-input-bar" :style="inputBarStyle">
<view class="chat-input-wrap"> <view class="chat-input-wrap">
<input <input
class="chat-input" class="chat-input"
@@ -98,7 +98,9 @@
placeholder="说点什么..." placeholder="说点什么..."
placeholder-class="chat-input-ph" placeholder-class="chat-input-ph"
confirm-type="send" confirm-type="send"
:adjust-position="true" :adjust-position="false"
:focus="inputFocus"
:hold-keyboard="true"
@confirm="sendMessage" @confirm="sendMessage"
@input="onInput" @input="onInput"
/> />
@@ -130,6 +132,8 @@ export default {
conversationId: '', conversationId: '',
messages: [], messages: [],
inputText: '', inputText: '',
inputFocus: false,
keyboardHeight: 0,
scrollToId: '', scrollToId: '',
isOnline: false, isOnline: false,
peerTyping: false, peerTyping: false,
@@ -145,12 +149,28 @@ export default {
this.loadMessages() this.loadMessages()
this.markRead() this.markRead()
this.bindWsEvents() this.bindWsEvents()
//
uni.onKeyboardHeightChange(res => {
this.keyboardHeight = res.height
if (res.height > 0) {
this.$nextTick(() => this.scrollToBottom())
}
})
}, },
onUnload() { onUnload() {
this.unbindWsEvents() this.unbindWsEvents()
if (this.typingTimer) { if (this.typingTimer) {
clearTimeout(this.typingTimer) clearTimeout(this.typingTimer)
} }
uni.offKeyboardHeightChange()
},
computed: {
inputBarStyle() {
if (this.keyboardHeight > 0) {
return { paddingBottom: this.keyboardHeight + 'px' }
}
return {}
}
}, },
methods: { methods: {
// === === // === ===
@@ -258,6 +278,12 @@ export default {
this.inputText = '' this.inputText = ''
this.$nextTick(() => this.scrollToBottom()) this.$nextTick(() => this.scrollToBottom())
// 仿
this.inputFocus = false
this.$nextTick(() => {
this.inputFocus = true
})
// WebSocket // WebSocket
wsManager.send('chat', { wsManager.send('chat', {
receiverId: this.friendId, receiverId: this.friendId,
@@ -288,6 +314,7 @@ export default {
/** 输入时通知对方 */ /** 输入时通知对方 */
onInput() { onInput() {
this.inputFocus = true
wsManager.send('typing', { receiverId: this.friendId }) wsManager.send('typing', { receiverId: this.friendId })
}, },
@@ -549,6 +576,7 @@ export default {
padding-bottom: calc(env(safe-area-inset-bottom) + #{$sp-md}); padding-bottom: calc(env(safe-area-inset-bottom) + #{$sp-md});
background: $bg-base; background: $bg-base;
border-top: 1rpx solid var(--border-faint, rgba(255,255,255,0.08)); border-top: 1rpx solid var(--border-faint, rgba(255,255,255,0.08));
transition: padding-bottom 0.15s ease-out;
} }
.chat-input-wrap { .chat-input-wrap {
+1 -1
View File
@@ -174,7 +174,7 @@ export default {
}, },
onShareAppMessage() { onShareAppMessage() {
return { return {
title: '来「干杯日记」一起记录饮酒生活吧!', title: '来「碰盏日记」一起记录饮酒生活吧!',
path: '/pages/index/index' path: '/pages/index/index'
} }
} }
+2 -2
View File
@@ -181,13 +181,13 @@ export default {
}, },
onShareAppMessage() { onShareAppMessage() {
return { return {
title: '干杯日记 - 让每一杯酒都有迹可循', title: '碰盏日记 - 让每一杯酒都有迹可循',
path: '/pages/index/index' path: '/pages/index/index'
} }
}, },
onShareTimeline() { onShareTimeline() {
return { return {
title: '干杯日记 - 让每一杯酒都有迹可循', title: '碰盏日记 - 让每一杯酒都有迹可循',
query: '' query: ''
} }
}, },
+3 -3
View File
@@ -6,7 +6,7 @@
<view class="brand-icon"> <view class="brand-icon">
<text class="brand-emoji">🍻</text> <text class="brand-emoji">🍻</text>
</view> </view>
<text class="brand-name">干杯日记</text> <text class="brand-name">碰盏日记</text>
<text class="brand-slogan">让每一杯酒都有迹可循</text> <text class="brand-slogan">让每一杯酒都有迹可循</text>
</view> </view>
@@ -105,13 +105,13 @@ export default {
}, },
onShareAppMessage() { onShareAppMessage() {
return { return {
title: '干杯日记 - 让每一杯酒都有迹可循', title: '碰盏日记 - 让每一杯酒都有迹可循',
path: '/pages/index/index' path: '/pages/index/index'
} }
}, },
onShareTimeline() { onShareTimeline() {
return { return {
title: '干杯日记 - 让每一杯酒都有迹可循', title: '碰盏日记 - 让每一杯酒都有迹可循',
query: '' query: ''
} }
}, },
+2 -2
View File
@@ -100,13 +100,13 @@ export default {
}, },
onShareAppMessage() { onShareAppMessage() {
return { return {
title: '干杯日记 - 让每一杯酒都有迹可循', title: '碰盏日记 - 让每一杯酒都有迹可循',
path: '/pages/index/index' path: '/pages/index/index'
} }
}, },
onShareTimeline() { onShareTimeline() {
return { return {
title: '干杯日记 - 让每一杯酒都有迹可循', title: '碰盏日记 - 让每一杯酒都有迹可循',
query: '' query: ''
} }
}, },
+3 -3
View File
@@ -26,7 +26,7 @@
<text class="hero-level-text">{{ drinkLevel }}</text> <text class="hero-level-text">{{ drinkLevel }}</text>
</view> </view>
</view> </view>
<text class="hero-joined">{{ joinedDate }} 加入 · 干杯日记</text> <text class="hero-joined">{{ joinedDate }} 加入 · 碰盏日记</text>
</view> </view>
</view> </view>
</view> </view>
@@ -250,14 +250,14 @@ export default {
onShareAppMessage() { onShareAppMessage() {
const name = this.user.nickname || '我' const name = this.user.nickname || '我'
return { return {
title: `${name}的饮酒名片 - 干杯日记`, title: `${name}的饮酒名片 - 碰盏日记`,
path: `/pages/share-profile/share-profile?${this.buildShareQuery()}` path: `/pages/share-profile/share-profile?${this.buildShareQuery()}`
} }
}, },
onShareTimeline() { onShareTimeline() {
const name = this.user.nickname || '我' const name = this.user.nickname || '我'
return { return {
title: `${name}的饮酒名片 - 干杯日记`, title: `${name}的饮酒名片 - 碰盏日记`,
query: this.buildShareQuery() query: this.buildShareQuery()
} }
}, },
+2 -2
View File
@@ -391,13 +391,13 @@ export default {
}, },
onShareAppMessage() { onShareAppMessage() {
return { return {
title: '干杯日记 - 记录每一杯酒', title: '碰盏日记 - 记录每一杯酒',
path: '/pages/index/index' path: '/pages/index/index'
} }
}, },
onShareTimeline() { onShareTimeline() {
return { return {
title: '干杯日记 - 记录每一杯酒', title: '碰盏日记 - 记录每一杯酒',
query: '' query: ''
} }
}, },
+4 -4
View File
@@ -10,7 +10,7 @@
<view class="biz-card"> <view class="biz-card">
<!-- 品牌条 --> <!-- 品牌条 -->
<view class="card-brand"> <view class="card-brand">
<text class="brand-mark">🍻 干杯日记</text> <text class="brand-mark">🍻 碰盏日记</text>
<text class="brand-label"> </text> <text class="brand-label"> </text>
</view> </view>
@@ -71,7 +71,7 @@
<!-- CTA --> <!-- CTA -->
<button class="cta-btn" @click="enterApp"> <button class="cta-btn" @click="enterApp">
<text class="cta-text">我也想记 · 打开干杯日记</text> <text class="cta-text">我也想记 · 打开碰盏日记</text>
</button> </button>
</view> </view>
@@ -121,13 +121,13 @@ export default {
// //
onShareAppMessage() { onShareAppMessage() {
return { return {
title: `${this.info.nick}的饮酒名片 - 干杯日记`, title: `${this.info.nick}的饮酒名片 - 碰盏日记`,
path: `/pages/share-profile/share-profile?${this.buildQuery()}` path: `/pages/share-profile/share-profile?${this.buildQuery()}`
} }
}, },
onShareTimeline() { onShareTimeline() {
return { return {
title: `${this.info.nick}的饮酒名片 - 干杯日记`, title: `${this.info.nick}的饮酒名片 - 碰盏日记`,
query: this.buildQuery() query: this.buildQuery()
} }
}, },
+1 -1
View File
@@ -1,5 +1,5 @@
/* ========================================== /* ==========================================
* 干杯日记 - 设计令牌 (Design Tokens) * 碰盏日记 - 设计令牌 (Design Tokens)
* 设计概念: 琥珀夜光 Amber Night / 暖白琥珀 Warm Day * 设计概念: 琥珀夜光 Amber Night / 暖白琥珀 Warm Day
* 支持日夜主题自动切换 * 支持日夜主题自动切换
* ========================================== */ * ========================================== */