1 line
4.6 KiB
Plaintext
1 line
4.6 KiB
Plaintext
|
{"version":3,"file":"s-wallet-card.js","sources":["../../../../../../src/sheep/components/s-wallet-card/s-wallet-card.vue","../../../../../../uniComponent:/RDovQXBwL1dvcmsvYWRkci9hY2RyLXVpL3NyYy9zaGVlcC9jb21wb25lbnRzL3Mtd2FsbGV0LWNhcmQvcy13YWxsZXQtY2FyZC52dWU"],"sourcesContent":["<!-- 装修用户组件:用户资产 -->\r\n<template>\r\n <view\r\n class=\"ss-wallet-menu-wrap ss-flex ss-col-center\"\r\n :style=\"[bgStyle, { marginLeft: `${data.space}px` }]\"\r\n >\r\n <view\r\n class=\"menu-item ss-flex-1 ss-flex-col ss-row-center ss-col-center\"\r\n @tap=\"sheep.$router.go('/modules/mall/user/wallet/money')\"\r\n >\r\n <view class=\"value-box ss-flex ss-col-bottom\">\r\n <view class=\"value-text ss-line-1\">{{ fen2yuan(userWallet.balance) || '0.00' }}</view>\r\n <view class=\"unit-text ss-m-l-6\">元</view>\r\n </view>\r\n <view class=\"menu-title ss-m-t-28\">账户余额</view>\r\n </view>\r\n <view\r\n class=\"menu-item ss-flex-1 ss-flex-col ss-row-center ss-col-center\"\r\n @tap=\"sheep.$router.go('/modules/mall/user/wallet/score')\"\r\n >\r\n <view class=\"value-box ss-flex ss-col-bottom\">\r\n <view class=\"value-text\">{{ userInfo.point || 0 }}</view>\r\n <view class=\"unit-text ss-m-l-6\">个</view>\r\n </view>\r\n <view class=\"menu-title ss-m-t-28\">积分</view>\r\n </view>\r\n <view\r\n class=\"menu-item ss-flex-1 ss-flex-col ss-row-center ss-col-center\"\r\n @tap=\"\r\n sheep.$router.go('/modules/mall/coupon/list', {\r\n type: 'geted',\r\n })\r\n \"\r\n >\r\n <view class=\"value-box ss-flex ss-col-bottom\">\r\n <view class=\"value-text\">{{ numData.unusedCouponCount }}</view>\r\n <view class=\"unit-text ss-m-l-6\">张</view>\r\n </view>\r\n <view class=\"menu-title ss-m-t-28\">优惠券</view>\r\n </view>\r\n <view\r\n class=\"menu-item ss-flex-col ss-row-center ss-col-center menu-wallet\"\r\n @tap=\"sheep.$router.go('/modules/mall/user/wallet/money')\"\r\n >\r\n <image\r\n class=\"item-icon\"\r\n :src=\"sheep.$url.static('/static/img/shop/user/wallet_icon.png')\"\r\n mode=\"aspectFit\"\r\n />\r\n <view class=\"menu-title ss-m-t-30\">我的钱包</view>\r\n </view>\r\n </view>\r\n</template>\r\n\r\n<script setup>\r\n/**\r\n * 装修组件 - 订单菜单组\r\n */\r\nimport { computed } from 'vue'\r\nimport sheep from '@/sheep'\r\nimport { fen2yuan } from '../../hooks/useGoods'\r\n\r\n// 接收参数\r\nconst props = defineProps({\r\n // 装修数据\r\n data: {\r\n type: Object,\r\n default: () => ({}),\r\n },\r\n // 装修样式\r\n styles: {\r\n type: Object,\r\n default: () => ({}),\r\n },\r\n})\r\n// 设置背景样式\r\nconst bgStyle = computed(() => {\r\n // 直接从 props.styles 解构\r\n const { bgType, bgImg, bgColor } = props.styles\r\n\r\n // 根据 bgType 返回相应的样式\r\n return {\r\n background: bgType === 'img' ? `url(${bgImg}) no-repeat top center / 100% 100%` : bgColor,\r\n }\r\n})\r\n\r\nconst userWallet = computed(() => sheep.$store('user').userWallet)\r\nconst userInfo = computed(() => sheep.$store('user').userInfo)\r\nconst numData = computed(() => sheep.$store('user').numData)\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n \r\n.ss-wallet-menu-wrap {\r\n .menu-wallet {\r\n width: 144rpx;\r\n }\r\n\r\n .menu-item {\r\n height: 160rpx;\r\n\r\n .menu-title {\r\n font-size: 24rpx;\r\n line-height: 24rpx;\r\n color: #333333;\r\n }\r\n\r\n .item-icon {\r\n width: 44rpx;\r\n height: 44rpx;\r\n }\r\n\r\n .value-box {\r\n height: 50rpx;\r\n text-align: center;\r\n\r\n .value-text {\r\n font-family: OPPOSANS;\r\n font-size: 28rpx;\r\n line-height: 28rpx;\r\n color: #000000;\r\n vertical-align: text-bottom;\r\n }\r\n\r\n .unit-text {\r\n font-size: 24rpx;\r\n line-height: 24rpx;\r\n color: #3434
|