推拿小程序前端代码仓库
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.

105 lines
2.2 KiB

  1. <template>
  2. <view class="page">
  3. <navbar title="代金券" leftClick @leftClick="$utils.navigateBack" color="#fff" />
  4. <view class="page-content">
  5. <!-- 代金券详情 -->
  6. <view class="coupon">
  7. <voucherCard :data="voucherDetail" :readonly="true"></voucherCard>
  8. </view>
  9. <view class="card info">
  10. <view class="info-header">代金券核销</view>
  11. <view class="flex flex-column info-content">
  12. <image class="info-qr" :src="voucherDetail.qrCodeImgUrl" mode="widthFix"></image>
  13. <view class="info-desc">{{ `有效时间:${voucherDetail.startTime}${voucherDetail.endTime}` }}</view>
  14. </view>
  15. </view>
  16. </view>
  17. </view>
  18. </template>
  19. <script>
  20. import voucherCard from '../components/voucher/voucherCard.vue'
  21. export default {
  22. components: {
  23. voucherCard,
  24. },
  25. data() {
  26. return {
  27. // todo: fetch
  28. voucherDetail: {
  29. id: '001',
  30. name: '【会员礼】50元代金券',
  31. startTime: '2025.03.12',
  32. endTime: '2025.09.12',
  33. desc: '只可在线下门店使用',
  34. orderNo: 'da123567',
  35. qrCodeImgUrl: '../static/verifyOrder/temp-qrcode.png',
  36. startTime: '2025-03-14',
  37. endTime: '2025-04-14',
  38. rights: ['过期退', '随时退']
  39. },
  40. }
  41. },
  42. onLoad(option) {
  43. const { id } = option
  44. // todo: fetch voucher data by voucher id
  45. },
  46. methods: {
  47. },
  48. }
  49. </script>
  50. <style scoped lang="scss">
  51. $bar-height: 132rpx;
  52. .page {
  53. background-color: #F5F5F5;
  54. /deep/ .nav-bar__view {
  55. background-image: linear-gradient(#84A73F, #D8FF8F);
  56. }
  57. &-header {
  58. color: #000000;
  59. font-size: 28rpx;
  60. margin-top: 24rpx;
  61. }
  62. &-content {
  63. padding: 33rpx 13rpx;
  64. }
  65. }
  66. .coupon {
  67. padding: 0 13rpx;
  68. }
  69. .info {
  70. margin-top: 26rpx;
  71. padding: 25rpx 41rpx 108rpx 41rpx;
  72. &-header {
  73. color: #000000;
  74. padding: 0 0 16rpx 7rpx;
  75. border-bottom: 1rpx dashed #C7C7C7;
  76. }
  77. &-qr {
  78. width: 279rpx;
  79. height: auto;
  80. margin-top: 57rpx;
  81. }
  82. &-desc {
  83. color: #999999;
  84. font-size: 22rpx;
  85. margin-top: 45rpx;
  86. }
  87. }
  88. </style>