s-wallet-card.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <!-- 装修用户组件:用户资产 -->
  2. <template>
  3. <view class="ss-wallet-menu-wrap ss-flex ss-col-center">
  4. <view class="menu-item ss-flex-1 ss-flex-col ss-row-center ss-col-center"
  5. @tap="sheep.$router.go('/pages/user/wallet/money')">
  6. <view class="value-box ss-flex ss-col-bottom">
  7. <view class="value-text ss-line-1">{{ fen2yuan(userWallet.balance) || '0.00' }}</view>
  8. <view class="unit-text ss-m-l-6">元</view>
  9. </view>
  10. <view class="menu-title ss-m-t-28">账户余额</view>
  11. </view>
  12. <view class="menu-item ss-flex-1 ss-flex-col ss-row-center ss-col-center"
  13. @tap="sheep.$router.go('/pages/user/wallet/score')">
  14. <view class="value-box ss-flex ss-col-bottom">
  15. <view class="value-text">{{ userInfo.point || 0 }}</view>
  16. <view class="unit-text ss-m-l-6">个</view>
  17. </view>
  18. <view class="menu-title ss-m-t-28">积分</view>
  19. </view>
  20. <view class="menu-item ss-flex-1 ss-flex-col ss-row-center ss-col-center" @tap="
  21. sheep.$router.go('/pages/coupon/list', {
  22. type: 'geted',
  23. })
  24. ">
  25. <view class="value-box ss-flex ss-col-bottom">
  26. <view class="value-text">{{ numData.unusedCouponCount }}</view>
  27. <view class="unit-text ss-m-l-6">张</view>
  28. </view>
  29. <view class="menu-title ss-m-t-28">优惠券</view>
  30. </view>
  31. <view class="menu-item ss-flex-col ss-row-center ss-col-center menu-wallet"
  32. @tap="sheep.$router.go('/pages/user/wallet/money')">
  33. <image class="item-icon" :src="sheep.$url.static('/static/img/shop/user/wallet_icon.png')" mode="aspectFit" />
  34. <view class="menu-title ss-m-t-30">我的钱包</view>
  35. </view>
  36. </view>
  37. </template>
  38. <script setup>
  39. /**
  40. * 装修组件 - 订单菜单组
  41. */
  42. import { computed } from 'vue';
  43. import sheep from '@/sheep';
  44. import { fen2yuan } from '../../hooks/useGoods';
  45. const userWallet = computed(() => sheep.$store('user').userWallet);
  46. const userInfo = computed(() => sheep.$store('user').userInfo);
  47. const numData = computed(() => sheep.$store('user').numData);
  48. </script>
  49. <style lang="scss" scoped>
  50. .ss-wallet-menu-wrap {
  51. .menu-wallet {
  52. width: 144rpx;
  53. }
  54. .menu-item {
  55. height: 160rpx;
  56. .menu-title {
  57. font-size: 24rpx;
  58. line-height: 24rpx;
  59. color: #333333;
  60. }
  61. .item-icon {
  62. width: 44rpx;
  63. height: 44rpx;
  64. }
  65. .value-box {
  66. height: 50rpx;
  67. text-align: center;
  68. .value-text {
  69. font-size: 28rpx;
  70. color: #000000;
  71. line-height: 28rpx;
  72. vertical-align: text-bottom;
  73. font-family: OPPOSANS;
  74. }
  75. .unit-text {
  76. font-size: 24rpx;
  77. color: #343434;
  78. line-height: 24rpx;
  79. }
  80. }
  81. }
  82. }
  83. </style>