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

@@ -1,6 +1,6 @@
<template>
<view class="red-packets-page">
<view class="tab-header">
<view class="tab-header" style="position: fixed; top: 0; left: 0; right: 0; z-index: 10;">
<text
class="tab-item"
:class="{ active: currentTab === 0 }"
@@ -82,19 +82,19 @@ const loadData = async () => {
let createdAt = ''
if (item instanceof UTSJSONObject) {
id = item.getString('id') || ''
amount = item.getNumber('amount') || 0
name = item.getString('name') || ''
status = item.getNumber('status') || 0
expireAt = item.getString('expire_at') || ''
createdAt = item.getString('created_at') || ''
id = item.getString('id') ?? ''
amount = item.getNumber('amount') ?? 0
name = item.getString('name') ?? ''
status = item.getNumber('status') ?? 0
expireAt = item.getString('expire_at') ?? ''
createdAt = item.getString('created_at') ?? ''
} else {
id = (item['id'] as string) || ''
amount = (item['amount'] as number) || 0
name = (item['name'] as string) || ''
status = (item['status'] as number) || 0
expireAt = (item['expire_at'] as string) || ''
createdAt = (item['created_at'] as string) || ''
id = (item['id'] as string) ?? ''
amount = (item['amount'] as number) ?? 0
name = (item['name'] as string) ?? ''
status = (item['status'] as number) ?? 0
expireAt = (item['expire_at'] as string) ?? ''
createdAt = (item['created_at'] as string) ?? ''
}
return {
@@ -127,7 +127,7 @@ const getStatusText = (status: number): string => {
}
const formatTime = (timeStr: string): string => {
if (!timeStr) return '永久有效'
if (timeStr == '') return '永久有效'
const date = new Date(timeStr)
return `${date.getFullYear()}-${(date.getMonth() + 1).toString().padStart(2, '0')}-${date.getDate().toString().padStart(2, '0')}`
}
@@ -136,18 +136,14 @@ const formatTime = (timeStr: string): string => {
<style>
.red-packets-page {
background-color: #f5f5f5;
min-height: 100vh;
display: flex;
flex-direction: column;
flex: 1;
}
.tab-header {
display: flex;
background-color: #fff;
padding: 10px 0;
position: sticky;
top: 0;
z-index: 10;
/* position: sticky is removed in flavor of inline fixed style */
}
.tab-item {