activity.vue 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <template>
  2. <view class="wrapper">
  3. <view class="flex-align" v-if="data && data.coupon && data.coupon.length > 0">
  4. <view class="color-2 font2 marginR16">优惠</view>
  5. <view class="light color-theme font2">
  6. {{data.coupon[0].name}}
  7. </view>
  8. <view class="font4 color-1 text-right flex1" @click="showCoupons">领券</view>
  9. </view>
  10. </view>
  11. </template>
  12. <script>
  13. export default {
  14. props: {
  15. data: Object
  16. },
  17. mounted() {
  18. },
  19. methods: {
  20. showCoupons() {
  21. this.$router.push('coupon_take', { scene: 'MALL', id: this.data.id})
  22. }
  23. }
  24. }
  25. </script>
  26. <style lang="scss" scoped>
  27. .wrapper {
  28. margin-top: 20rpx;
  29. background: #fff;
  30. border-radius: 20rpx;
  31. padding: 40rpx 28rpx;
  32. .light {
  33. background: rgba($color: #a76ef4, $alpha: 0.3);
  34. height: 40rpx;
  35. border-radius: 8rpx;
  36. padding: 0 10rpx;
  37. }
  38. .light-2 {
  39. border-radius: 4rpx;
  40. border: 2rpx solid #a76ef4;
  41. height: 40rpx;
  42. line-height: 40rpx;
  43. padding: 0 10rpx;
  44. }
  45. }
  46. </style>