推拿小程序前端代码仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

75 lines
1.3 KiB

3 weeks ago
3 weeks ago
  1. <template>
  2. <view class="card flex voucher">
  3. <image class="voucher-img" :src="data.massageItem.image"></image>
  4. <view class="voucher-info">
  5. <view class="voucher-name">{{ data }}</view>
  6. <view class="voucher-desc">{{ `核销时间:${data.createTime}` }}</view>
  7. </view>
  8. <view class="voucher-count">
  9. <text>代金券</text>
  10. <text class="voucher-value">{{ `${data.count}` }}</text>
  11. </view>
  12. </view>
  13. </template>
  14. <script>
  15. const TEST_DATA = {
  16. id: '001',
  17. imgUrl: 'http://gips3.baidu.com/it/u=70459541,3412285454&fm=3028&app=3028&f=JPEG&fmt=auto?w=960&h=1280',
  18. userName: '用户136xxxxxxxxx',
  19. createTime: '2025/03/05 14:45:36',
  20. count: '100',
  21. }
  22. export default {
  23. props: {
  24. data: {
  25. type: Object,
  26. default() {
  27. return TEST_DATA
  28. }
  29. },
  30. },
  31. }
  32. </script>
  33. <style scoped lang="scss">
  34. .voucher {
  35. padding: 33rpx 25rpx 33rpx 31rpx;
  36. &-img {
  37. width: 90rpx;
  38. height: 90rpx;
  39. border-radius: 50%;
  40. margin-right: 7rpx;
  41. }
  42. &-info {
  43. flex: 1;
  44. }
  45. &-name {
  46. color: #333333;
  47. font-size: 28rpx;
  48. line-height: 40rpx;
  49. }
  50. &-desc {
  51. color: #333333;
  52. font-size: 22rpx;
  53. line-height: 30rpx;
  54. margin-top: 5rpx;
  55. }
  56. &-count {
  57. color: #000000;
  58. font-size: 22rpx;
  59. }
  60. &-value {
  61. color: #FF2A2A;
  62. }
  63. }
  64. </style>