consumer模块完成90%,前端完成supabase对接

This commit is contained in:
2026-02-04 17:21:15 +08:00
parent 8a535e3f38
commit 39aa1b6bec
1335 changed files with 191376 additions and 4 deletions

View File

@@ -15,14 +15,14 @@
<view class="nav-user-stats">
<text class="nav-user-name">{{ userInfo.nickname || userInfo.phone }}</text>
<view class="nav-stat-item">
<view class="nav-stat-item" @click="goToPoints">
<text class="nav-stat-label">积分</text>
<text class="nav-stat-value">{{ userStats.points }}</text>
</view>
<view class="nav-stat-item">
<view class="nav-stat-item" @click="goToWallet">
<text class="nav-stat-label">余额</text>
<text class="nav-stat-value" @click="goToWallet">¥{{ userStats.balance }}</text>
<text class="nav-stat-value">¥{{ userStats.balance }}</text>
</view>
<view class="nav-stat-item" @click="goToCoupons">
@@ -249,6 +249,7 @@
<script>
import { UserType, OrderType } from '@/types/mall-types.uts'
import supabaseService from '@/utils/supabaseService.uts'
import { getCurrentUser } from '@/utils/store.uts'
type UserStatsType = {
points: number
@@ -584,10 +585,39 @@ export default {
// 跳转钱包
goToWallet() {
const user = getCurrentUser()
if (!user) {
uni.showToast({
title: '请先登录',
icon: 'none'
})
uni.navigateTo({
url: '/pages/user/login'
})
return
}
uni.navigateTo({
url: '/pages/mall/consumer/wallet'
})
},
// 跳转积分
goToPoints() {
const user = getCurrentUser()
if (!user) {
uni.showToast({
title: '请先登录',
icon: 'none'
})
uni.navigateTo({
url: '/pages/user/login'
})
return
}
uni.navigateTo({
url: '/pages/mall/consumer/points'
})
},
goToOrders(type: string) {
uni.navigateTo({