✨ 个人中心:优化登录后的数据读取
This commit is contained in:
@@ -9,11 +9,11 @@
|
||||
>
|
||||
<uni-badge
|
||||
class="uni-badge-left-margin"
|
||||
:text="numData.order_num[item.type]"
|
||||
:text="numData.orderCount[item.count]"
|
||||
absolute="rightTop"
|
||||
size="small"
|
||||
>
|
||||
<image class="item-icon" :src="sheep.$url.static(item.icon)" mode="aspectFit"></image>
|
||||
<image class="item-icon" :src="sheep.$url.static(item.icon)" mode="aspectFit" />
|
||||
</uni-badge>
|
||||
<view class="menu-title ss-m-t-28">{{ item.title }}</view>
|
||||
</view>
|
||||
@@ -34,6 +34,7 @@
|
||||
icon: '/static/img/shop/order/no_pay.png',
|
||||
path: '/pages/order/list',
|
||||
type: 'unpaid',
|
||||
count: 'unpaidCount',
|
||||
},
|
||||
{
|
||||
title: '待收货',
|
||||
@@ -41,6 +42,7 @@
|
||||
icon: '/static/img/shop/order/no_take.png',
|
||||
path: '/pages/order/list',
|
||||
type: 'noget',
|
||||
count: 'deliveredCount',
|
||||
},
|
||||
{
|
||||
title: '待评价',
|
||||
@@ -48,6 +50,7 @@
|
||||
icon: '/static/img/shop/order/no_comment.png',
|
||||
path: '/pages/order/list',
|
||||
type: 'nocomment',
|
||||
count: 'uncommentedCount',
|
||||
},
|
||||
{
|
||||
title: '售后单',
|
||||
@@ -55,6 +58,7 @@
|
||||
icon: '/static/img/shop/order/change_order.png',
|
||||
path: '/pages/order/aftersale/list',
|
||||
type: 'aftersale',
|
||||
count: 'afterSaleCount',
|
||||
},
|
||||
{
|
||||
title: '全部订单',
|
||||
@@ -65,7 +69,6 @@
|
||||
];
|
||||
|
||||
const numData = computed(() => sheep.$store('user').numData);
|
||||
console.log('更换后的yuda订单数量',numData)
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<view class="menu-item ss-flex-1 ss-flex-col ss-row-center ss-col-center"
|
||||
@tap="sheep.$router.go('/pages/user/wallet/money')">
|
||||
<view class="value-box ss-flex ss-col-bottom">
|
||||
<view class="value-text ss-line-1">{{ fen2yuan(userInfo.money) || '0.00' }}</view>
|
||||
<view class="value-text ss-line-1">{{ fen2yuan(userWallet.balance) || '0.00' }}</view>
|
||||
<view class="unit-text ss-m-l-6">元</view>
|
||||
</view>
|
||||
<view class="menu-title ss-m-t-28">账户余额</view>
|
||||
@@ -23,15 +23,14 @@
|
||||
})
|
||||
">
|
||||
<view class="value-box ss-flex ss-col-bottom">
|
||||
<view class="value-text">{{ numData.coupons_num || '0.00' }}</view>
|
||||
<view class="value-text">{{ numData.unusedCouponCount }}</view>
|
||||
<view class="unit-text ss-m-l-6">张</view>
|
||||
</view>
|
||||
<view class="menu-title ss-m-t-28">优惠券</view>
|
||||
</view>
|
||||
<view class="menu-item ss-flex-col ss-row-center ss-col-center menu-wallet"
|
||||
@tap="sheep.$router.go('/pages/user/wallet/money')">
|
||||
<image class="item-icon" :src="sheep.$url.static('/static/img/shop/user/wallet_icon.png')" mode="aspectFit">
|
||||
</image>
|
||||
@tap="sheep.$router.go('/pages/user/wallet/money')">
|
||||
<image class="item-icon" :src="sheep.$url.static('/static/img/shop/user/wallet_icon.png')" mode="aspectFit" />
|
||||
<view class="menu-title ss-m-t-30">我的钱包</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -41,13 +40,11 @@
|
||||
/**
|
||||
* 装修组件 - 订单菜单组
|
||||
*/
|
||||
import {
|
||||
computed,
|
||||
ref
|
||||
} from 'vue';
|
||||
import { computed } from 'vue';
|
||||
import sheep from '@/sheep';
|
||||
import { fen2yuan } from '../../hooks/useGoods';
|
||||
|
||||
const userWallet = computed(() => sheep.$store('user').userWallet);
|
||||
const userInfo = computed(() => sheep.$store('user').userInfo);
|
||||
const numData = computed(() => sheep.$store('user').numData);
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user