index.vue 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. <template>
  2. <base-drawer mode="bottom" :visible="visible" background-color="transparent" mask maskClosable @close="closeDrawer">
  3. <view class="w-full bg--w111-f5f5f5 rd-t-40rpx py-32">
  4. <view class="text-center fs-32 text--w111-333 fw-500">赠品</view>
  5. <view class="mt-48 px-20 scroll-content">
  6. <view class="text--w111-333 fs-28 lh-40rpx">本单可获得以下赠品</view>
  7. <view class="gift-card mt-24 bg--w111-fff rd-16rpx p-16 flex-y-center"
  8. v-for="(item,index) in giveCartInfo" :key="item.id" @tap="goPage(1,'/pages/goods_details/index?id=' + item.productInfo.id)">
  9. <image class="w-116 h-116 rd-16rpx" :src="item.productInfo.attrInfo.image" v-if="item.productInfo.attrInfo"></image>
  10. <image class="w-116 h-116 rd-16rpx" :src="item.productInfo.image" v-else></image>
  11. <view class="flex-1 flex-between-center pl-16">
  12. <view class="w-460">
  13. <view class="w-full line1 fs-28 lh-40rpx">{{item.productInfo.store_name}}</view>
  14. <view class="fs-22 text--w111-999 lh-30rpx mt-12">数量x{{item.cart_num}}</view>
  15. </view>
  16. <text class="iconfont icon-ic_rightarrow fs-24 text--w111-999"></text>
  17. </view>
  18. </view>
  19. <view class="gift-card mt-24 bg--w111-fff rd-16rpx p-16 flex-y-center"
  20. v-for="(item,index) in giveData.give_coupon" :key="index" @tap="goPage(1,'/pages/users/user_coupon/index')">
  21. <view class="w-116 h-116 rd-16rpx flex-center bg--w111-f5f5f5">
  22. <text class="fs-48 gold iconfont icon-a-ic_discount1"></text>
  23. </view>
  24. <view class="flex-1 flex-between-center pl-16">
  25. <view class="w-460">
  26. <view class="w-full line1 fs-28 lh-40rpx">{{item.coupon_title}}</view>
  27. <view class="fs-22 text--w111-999 lh-30rpx mt-12">数量x1</view>
  28. </view>
  29. <text class="iconfont icon-ic_rightarrow fs-24 text--w111-999"></text>
  30. </view>
  31. </view>
  32. <view class="gift-card mt-24 bg--w111-fff rd-16rpx p-16 flex-y-center"
  33. v-if="giveData.give_integral>0"
  34. @tap="goPage(1,'/pages/users/user_integral/index')">
  35. <view class="w-116 h-116 rd-16rpx flex-center bg--w111-f5f5f5">
  36. <text class="fs-48 gold iconfont icon-ic_badge11"></text>
  37. </view>
  38. <view class="flex-1 flex-between-center pl-16">
  39. <view class="w-460">
  40. <view class="w-full line1 fs-28 lh-40rpx">{{giveData.give_integral}}积分</view>
  41. <view class="fs-22 text--w111-999 lh-30rpx mt-12">数量x1</view>
  42. </view>
  43. <text class="iconfont icon-ic_rightarrow fs-24 text--w111-999"></text>
  44. </view>
  45. </view>
  46. </view>
  47. <view class="mx-20">
  48. <view class="mt-52 h-72 flex-center rd-36px bg-color fs-26 text--w111-fff" @tap="showGiftDrawer = false">确定</view>
  49. </view>
  50. </view>
  51. </base-drawer>
  52. </template>
  53. <script>
  54. import baseDrawer from '@/components/tui-drawer/tui-drawer.vue';
  55. export default {
  56. props:{
  57. visible: {
  58. type: Boolean,
  59. default: false,
  60. },
  61. giveCartInfo:{
  62. type: Array,
  63. default: ()=>[]
  64. },
  65. giveData:{
  66. type: Object,
  67. default: ()=>{}
  68. },
  69. },
  70. components: {
  71. baseDrawer
  72. },
  73. methods:{
  74. closeDrawer() {
  75. this.$emit('closeDrawer');
  76. },
  77. goPage(type,url){
  78. uni.navigateTo({
  79. url
  80. })
  81. }
  82. }
  83. }
  84. </script>
  85. <style>
  86. .gold{
  87. color: #DCA658;
  88. }
  89. .scroll-content{
  90. height: 800rpx;
  91. overflow-y: auto;
  92. }
  93. </style>