rename(app): 将应用名称从"干杯日记"更改为"碰盏日记"
- 替换所有文件中的品牌名称引用,包括App.vue、pages.json、uni.scss等 - 更新全局样式、导航栏标题和组件中的文案显示 - 修改分享功能中的应用名称显示 - 调整聊天页面的输入栏键盘适配逻辑 - 在多个页面组件中添加事件发射声明以支持交互功能
This commit is contained in:
+4
-4
@@ -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
@@ -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 {
|
||||
|
||||
@@ -174,7 +174,7 @@ export default {
|
||||
},
|
||||
onShareAppMessage() {
|
||||
return {
|
||||
title: '来「干杯日记」一起记录饮酒生活吧!',
|
||||
title: '来「碰盏日记」一起记录饮酒生活吧!',
|
||||
path: '/pages/index/index'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -181,13 +181,13 @@ export default {
|
||||
},
|
||||
onShareAppMessage() {
|
||||
return {
|
||||
title: '干杯日记 - 让每一杯酒都有迹可循',
|
||||
title: '碰盏日记 - 让每一杯酒都有迹可循',
|
||||
path: '/pages/index/index'
|
||||
}
|
||||
},
|
||||
onShareTimeline() {
|
||||
return {
|
||||
title: '干杯日记 - 让每一杯酒都有迹可循',
|
||||
title: '碰盏日记 - 让每一杯酒都有迹可循',
|
||||
query: ''
|
||||
}
|
||||
},
|
||||
|
||||
@@ -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: ''
|
||||
}
|
||||
},
|
||||
|
||||
@@ -100,13 +100,13 @@ export default {
|
||||
},
|
||||
onShareAppMessage() {
|
||||
return {
|
||||
title: '干杯日记 - 让每一杯酒都有迹可循',
|
||||
title: '碰盏日记 - 让每一杯酒都有迹可循',
|
||||
path: '/pages/index/index'
|
||||
}
|
||||
},
|
||||
onShareTimeline() {
|
||||
return {
|
||||
title: '干杯日记 - 让每一杯酒都有迹可循',
|
||||
title: '碰盏日记 - 让每一杯酒都有迹可循',
|
||||
query: ''
|
||||
}
|
||||
},
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
},
|
||||
|
||||
@@ -391,13 +391,13 @@ export default {
|
||||
},
|
||||
onShareAppMessage() {
|
||||
return {
|
||||
title: '干杯日记 - 记录每一杯酒',
|
||||
title: '碰盏日记 - 记录每一杯酒',
|
||||
path: '/pages/index/index'
|
||||
}
|
||||
},
|
||||
onShareTimeline() {
|
||||
return {
|
||||
title: '干杯日记 - 记录每一杯酒',
|
||||
title: '碰盏日记 - 记录每一杯酒',
|
||||
query: ''
|
||||
}
|
||||
},
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user