zyejMAll-mobile/sheep/components/s-wallet-card/s-wallet-card.vue

107 lines
2.9 KiB
Vue
Raw Permalink Normal View History

2024-08-07 10:31:42 +08:00
<!-- 装修用户组件用户资产 -->
<template>
2024-08-07 21:40:27 +08:00
<view class="ss-wallet-menu-wrap ss-flex ss-col-center">
<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(userWallet.balance) || '0.00' }}</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-1 ss-flex-col ss-row-center ss-col-center"
@tap="sheep.$router.go('/pages/user/wallet/score')"
>
<view class="value-box ss-flex ss-col-bottom">
<view class="value-text">{{ userInfo.point || 0 }}</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-1 ss-flex-col ss-row-center ss-col-center"
@tap="
2024-08-07 10:31:42 +08:00
sheep.$router.go('/pages/coupon/list', {
type: 'geted',
})
2024-08-07 21:40:27 +08:00
"
>
<view class="value-box ss-flex ss-col-bottom">
<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"
2024-09-19 17:57:12 +08:00
:src="walleticon"
2024-08-07 21:40:27 +08:00
mode="aspectFit"
/>
<view class="menu-title ss-m-t-30">我的钱包</view>
</view>
</view>
2024-08-07 10:31:42 +08:00
</template>
<script setup>
2024-09-19 17:57:12 +08:00
import walleticon from '@/static/images/wallet_icon.png'
2024-08-07 21:40:27 +08:00
/**
* 装修组件 - 订单菜单组
*/
import { computed } from 'vue';
import sheep from '@/sheep';
2024-08-07 10:31:42 +08:00
import { fen2yuan } from '../../hooks/useGoods';
2024-08-07 21:40:27 +08:00
const userWallet = computed(() => sheep.$store('user').userWallet);
const userInfo = computed(() => sheep.$store('user').userInfo);
const numData = computed(() => sheep.$store('user').numData);
2024-08-07 10:31:42 +08:00
</script>
<style lang="scss" scoped>
2024-08-07 21:40:27 +08:00
.ss-wallet-menu-wrap {
.menu-wallet {
width: 144rpx;
}
2024-08-07 10:31:42 +08:00
2024-08-07 21:40:27 +08:00
.menu-item {
height: 160rpx;
2024-08-07 10:31:42 +08:00
2024-08-07 21:40:27 +08:00
.menu-title {
font-size: 24rpx;
line-height: 24rpx;
color: #333333;
}
2024-08-07 10:31:42 +08:00
2024-08-07 21:40:27 +08:00
.item-icon {
width: 44rpx;
height: 44rpx;
}
2024-08-07 10:31:42 +08:00
2024-08-07 21:40:27 +08:00
.value-box {
height: 50rpx;
text-align: center;
2024-08-07 10:31:42 +08:00
2024-08-07 21:40:27 +08:00
.value-text {
font-size: 28rpx;
color: #000000;
line-height: 28rpx;
vertical-align: text-bottom;
font-family: OPPOSANS;
}
2024-08-07 10:31:42 +08:00
2024-08-07 21:40:27 +08:00
.unit-text {
font-size: 24rpx;
color: #343434;
line-height: 24rpx;
}
}
}
}
2024-08-07 10:31:42 +08:00
</style>