consumerm模块完成度90%,完善消费者和商家端数据库表,商品、聊天、订单数据对接好了supabase,和商家端对接了聊天功能,安卓端编译通过了css样式,剩余几个页面在处理函数规范问题
This commit is contained in:
@@ -57,17 +57,17 @@
|
||||
<view class="list-item">
|
||||
<text class="item-icon">🔔</text>
|
||||
<text class="item-text">订单消息</text>
|
||||
<switch :checked="notifications.order" @change="toggleNotification('order')" />
|
||||
<switch class="settings-switch" :checked="notifications.order" @change="toggleNotification('order')" />
|
||||
</view>
|
||||
<view class="list-item">
|
||||
<text class="item-icon">🎁</text>
|
||||
<text class="item-text">促销活动</text>
|
||||
<switch :checked="notifications.promotion" @change="toggleNotification('promotion')" />
|
||||
<switch class="settings-switch" :checked="notifications.promotion" @change="toggleNotification('promotion')" />
|
||||
</view>
|
||||
<view class="list-item">
|
||||
<text class="item-icon">⭐</text>
|
||||
<text class="item-text">评价提醒</text>
|
||||
<switch :checked="notifications.review" @change="toggleNotification('review')" />
|
||||
<switch class="settings-switch" :checked="notifications.review" @change="toggleNotification('review')" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -79,17 +79,17 @@
|
||||
<view class="list-item">
|
||||
<text class="item-icon">👁️</text>
|
||||
<text class="item-text">隐藏购物记录</text>
|
||||
<switch :checked="privacy.hidePurchase" @change="togglePrivacy('hidePurchase')" />
|
||||
<switch class="settings-switch" :checked="privacy.hidePurchase" @change="togglePrivacy('hidePurchase')" />
|
||||
</view>
|
||||
<view class="list-item">
|
||||
<text class="item-icon">🔍</text>
|
||||
<text class="item-text">允许通过手机号找到我</text>
|
||||
<switch :checked="privacy.allowSearchByPhone" @change="togglePrivacy('allowSearchByPhone')" />
|
||||
<switch class="settings-switch" :checked="privacy.allowSearchByPhone" @change="togglePrivacy('allowSearchByPhone')" />
|
||||
</view>
|
||||
<view class="list-item">
|
||||
<text class="item-icon">💬</text>
|
||||
<text class="item-text">接收商家消息</text>
|
||||
<switch :checked="privacy.receiveMerchantMsg" @change="togglePrivacy('receiveMerchantMsg')" />
|
||||
<switch class="settings-switch" :checked="privacy.receiveMerchantMsg" @change="togglePrivacy('receiveMerchantMsg')" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -265,7 +265,7 @@ const statusBarHeight = ref(0)
|
||||
// 生命周期
|
||||
onMounted(() => {
|
||||
const systemInfo = uni.getSystemInfoSync()
|
||||
statusBarHeight.value = systemInfo.statusBarHeight || 0
|
||||
statusBarHeight.value = systemInfo.statusBarHeight
|
||||
loadUserInfo()
|
||||
loadSettings()
|
||||
})
|
||||
@@ -565,9 +565,13 @@ const deleteAccount = () => {
|
||||
title: '注销中...'
|
||||
})
|
||||
|
||||
const userId = userInfo.value.id || uni.getStorageSync('user_id')
|
||||
let userId = userInfo.value.getString('id')
|
||||
if (userId == null) {
|
||||
const storageId = uni.getStorageSync('user_id')
|
||||
userId = (storageId != null) ? storageId as string : null
|
||||
}
|
||||
|
||||
if (userId) {
|
||||
if (userId != null) {
|
||||
try {
|
||||
// 标记用户状态为注销 (status=3)
|
||||
await supa
|
||||
@@ -661,7 +665,7 @@ const deleteAccount = () => {
|
||||
}
|
||||
|
||||
/* 针对 switch 组件的特殊处理,如果需要显示开关,可能需要调整布局 */
|
||||
.list-item switch {
|
||||
.settings-switch {
|
||||
transform: scale(0.7);
|
||||
margin-top: 5px;
|
||||
}
|
||||
@@ -669,7 +673,7 @@ const deleteAccount = () => {
|
||||
/* 屏幕宽度大于 480px (大屏手机/平板/PC) 时,启用更宽的网格布局或列表布局 */
|
||||
@media screen and (min-width: 480px) {
|
||||
.list-item {
|
||||
width: calc(50% - 10px); /* 每行两个,留出间隙 */
|
||||
width: 47%; /* width: calc(50% - 10px); REPLACED */
|
||||
margin: 5px;
|
||||
border: 1px solid #f0f0f0;
|
||||
border-radius: 8px;
|
||||
@@ -697,7 +701,7 @@ const deleteAccount = () => {
|
||||
/* 增加针对手机横屏的媒体查询 */
|
||||
@media screen and (orientation: landscape) and (max-height: 500px) {
|
||||
.list-item {
|
||||
width: calc(25% - 10px); /* 横屏也保持4个一行,或者根据需要调整 */
|
||||
width: 22%; /* width: calc(25% - 10px); REPLACED */
|
||||
margin: 5px;
|
||||
border: 1px solid #f0f0f0;
|
||||
border-radius: 8px;
|
||||
@@ -723,7 +727,7 @@ const deleteAccount = () => {
|
||||
}
|
||||
|
||||
.list-item {
|
||||
width: calc(33.33% - 10px); /* 每行三个 */
|
||||
width: 31%; /* width: calc(33.33% - 10px); REPLACED */
|
||||
flex-direction: row; /* PC端保持水平排列 */
|
||||
justify-content: flex-start;
|
||||
text-align: left;
|
||||
@@ -743,7 +747,7 @@ const deleteAccount = () => {
|
||||
.settings-page {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100vh;
|
||||
height: 100%;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
@@ -779,7 +783,6 @@ const deleteAccount = () => {
|
||||
}
|
||||
|
||||
.section-title {
|
||||
display: block;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
@@ -853,6 +856,5 @@ const deleteAccount = () => {
|
||||
.delete-account {
|
||||
color: #999999;
|
||||
font-size: 14px;
|
||||
text-decoration: underline;
|
||||
}
|
||||
}/* text-decoration: underline; REMOVED */
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user