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

108 lines
2.8 KiB
Vue
Raw 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>
2024-09-20 18:12:20 +08:00
<view class="menu-title ss-m-t-28">余额</view>
2024-08-07 21:40:27 +08:00
</view>
2024-09-20 18:12:20 +08:00
2024-08-07 21:40:27 +08:00
<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>
2024-09-20 18:12:20 +08:00
<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
2024-08-07 21:40:27 +08:00
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>
2024-09-20 18:12:20 +08:00
</view> -->
2024-08-07 21:40:27 +08:00
</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;
2024-09-20 18:12:20 +08:00
color: white;
2024-08-07 21:40:27 +08:00
}
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;
2024-09-20 18:12:20 +08:00
color: white;
2024-08-07 21:40:27 +08:00
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;
2024-09-20 18:12:20 +08:00
color: white;
2024-08-07 21:40:27 +08:00
line-height: 24rpx;
}
}
}
}
2024-08-07 10:31:42 +08:00
</style>