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