consumer模块完成度95%,安卓端大部分页面能正常获取数据,页面样式显示基本正常,逐渐完善;消费者端的积分、余额、评价、优惠券等小模块正在完善
This commit is contained in:
@@ -13,8 +13,8 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 导航栏占位符 -->
|
||||
<view class="navbar-placeholder" :style="{ height: (statusBarHeight + 10) + 'px' }"></view>
|
||||
<!-- 导航栏占位符 - 需要包含statusBarHeight + 导航栏高度44px -->
|
||||
<view class="navbar-placeholder" :style="{ height: (statusBarHeight + 44) + 'px' }"></view>
|
||||
|
||||
<!-- 消息分类标签 - 固定在顶部,方便随时切换 -->
|
||||
<view class="tabs-container">
|
||||
@@ -350,9 +350,15 @@ const loadMessages = async () => {
|
||||
promoMessages.length = 0
|
||||
|
||||
// 1. 获取通知 (系统、订单、优惠)
|
||||
console.log('[loadMessages] 开始获取通知...')
|
||||
const notes = await supabaseService.getUserNotifications()
|
||||
console.log('[loadMessages] 获取到通知数量:', notes.length)
|
||||
|
||||
notes.forEach((note: Notification) => {
|
||||
// 使用 for 循环替代 forEach
|
||||
for (let i = 0; i < notes.length; i++) {
|
||||
const note = notes[i]
|
||||
console.log('[loadMessages] 通知类型:', note.type, '标题:', note.title)
|
||||
|
||||
const item: MessageItem = {
|
||||
id: note.id,
|
||||
title: note.title,
|
||||
@@ -361,7 +367,7 @@ const loadMessages = async () => {
|
||||
read: note.is_read,
|
||||
type: note.type,
|
||||
avatar: note.icon_url,
|
||||
important: note.type === 'system',
|
||||
important: note.type == 'system',
|
||||
coupon: '点击查看',
|
||||
expiry: '',
|
||||
claimed: false,
|
||||
@@ -378,15 +384,17 @@ const loadMessages = async () => {
|
||||
active: false
|
||||
}
|
||||
|
||||
if (note.type === 'system') {
|
||||
if (note.type == 'system') {
|
||||
systemMessages.push(item)
|
||||
} else if (note.type === 'order') {
|
||||
} else if (note.type == 'order') {
|
||||
orderMessages.push(item)
|
||||
} else if (note.type === 'promotion') {
|
||||
} else if (note.type == 'promotion') {
|
||||
item.type = 'promo'
|
||||
promoMessages.push(item)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
console.log('[loadMessages] 系统消息:', systemMessages.length, '订单消息:', orderMessages.length, '优惠消息:', promoMessages.length)
|
||||
|
||||
// 2. 获取客服消息 (Chat)
|
||||
const rooms = await supabaseService.getChatRooms()
|
||||
@@ -641,15 +649,13 @@ const onRefresh = () => {
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
|
||||
background-color: #4CAF50;
|
||||
z-index: 1000;
|
||||
box-shadow: 0 2px 12px rgba(76, 175, 80, 0.15);
|
||||
/* height: 50px; 移除固定高度,由内容决定 */
|
||||
display: flex;
|
||||
flex-direction: row; /* 显式设置行方向 */
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-shrink: 0; /* 防止被压缩 */
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.nav-container {
|
||||
|
||||
Reference in New Issue
Block a user