consumerm模块完成度90%,完善消费者和商家端数据库表,商品、聊天、订单数据对接好了supabase,和商家端对接了聊天功能,安卓端编译通过了css样式,剩余几个页面在处理函数规范问题

This commit is contained in:
cyh666666
2026-02-24 17:17:49 +08:00
parent e2f1dfb097
commit e606c597ca
174 changed files with 37917 additions and 4444 deletions

View File

@@ -24,7 +24,7 @@
<view v-else class="record-list">
<view v-for="item in records" :key="item.id" class="record-item">
<view class="record-left">
<text class="record-title">{{ item.description || getTypeText(item.type) }}</text>
<text class="record-title">{{ item.description ?? getTypeText(item.type) }}</text>
<text class="record-time">{{ formatTime(item.created_at) }}</text>
</view>
<view class="record-right">
@@ -105,11 +105,11 @@ const getTypeText = (type: string): string => {
'admin': '系统调整',
'register': '注册赠送'
}
return map[type] || '积分变动'
return map[type] ?? '积分变动'
}
const formatTime = (timeStr: string): string => {
if (!timeStr) return ''
if (timeStr == '') return ''
const date = new Date(timeStr)
const y = date.getFullYear()
const m = (date.getMonth() + 1).toString().padStart(2, '0')
@@ -122,8 +122,7 @@ const formatTime = (timeStr: string): string => {
<style>
.points-page {
min-height: 100vh;
background-color: #f5f7fa;
flex: 1;
}
.points-header {
@@ -174,7 +173,7 @@ const formatTime = (timeStr: string): string => {
font-weight: bold;
padding: 16px 0;
border-bottom: 1px solid #f0f0f0;
display: block;
display: flex;
}
.record-item {
@@ -188,10 +187,7 @@ const formatTime = (timeStr: string): string => {
.record-left {
display: flex;
flex-direction: column;
gap: 4px;
}
.record-title {
margin-bottom: 4px;
font-size: 15px;
color: #333;
}