purchaseCoupon.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. <template>
  2. <view class="page">
  3. <!-- #ifdef H5-->
  4. <uni-nav-bar v-if="!$isWxBrowser()" :fixed="true" background-color="#FFE05C" :border="false" :statusBar="false" left-icon="left" title="购买优惠券" @clickLeft="back" />
  5. <!-- #endif -->
  6. <view class="flex-row coupon" v-for="i in 10">
  7. <view class="flex-col couponLeft">
  8. <text class="discounts">¥50</text>
  9. <text class="condition">满300可用</text>
  10. </view>
  11. <view class="couponRight">
  12. <view class="flex-col couponRight1">
  13. <view class="flex-row justify-between">
  14. <text class="couponName">门店通用</text>
  15. <view class="price">
  16. <text class="couponValue">单价:</text>
  17. <text class="couponPrice">¥50</text>
  18. </view>
  19. </view>
  20. <view class="flex-row">
  21. <view class="couponMsg">
  22. <view class="couponValue">
  23. <text>使用平台:</text>
  24. <text>全平台</text>
  25. </view>
  26. <view class="couponValue">
  27. <text>使用次数:</text>
  28. <text>1次</text>
  29. </view>
  30. <view class="couponValue">
  31. <text>到期时间:</text>
  32. <text>2024-01-01</text>
  33. </view>
  34. </view>
  35. <view class="flex-col justify-end">
  36. <view class="purchaseBtn" @click="openPurchase">
  37. <text>立即购买</text>
  38. </view>
  39. </view>
  40. </view>
  41. </view>
  42. </view>
  43. </view>
  44. <!--#ifdef H5-->
  45. <liu-drag-button v-if="$isWxBrowser()" @clickBtn="back">返回</liu-drag-button>
  46. <!--#endif-->
  47. <uni-popup ref="purchasePopup" type="bottom">
  48. <view class="purchasePopup">
  49. <view class="flex-row justify-between">
  50. <text class="popupTitle">价格明显</text>
  51. <u-icon name="close-circle" color="#000000" size="28"></u-icon>
  52. </view>
  53. <view class="flex-row coupon">
  54. <view class="flex-col couponLeft">
  55. <text class="discounts">¥50</text>
  56. <text class="condition">满300可用</text>
  57. </view>
  58. <view class="couponRight">
  59. <view class="flex-col couponRight1">
  60. <view class="flex-row justify-between">
  61. <text class="couponName">门店通用</text>
  62. </view>
  63. <view class="flex-row">
  64. <view class="couponMsg">
  65. <view class="couponValue">
  66. <text>使用平台:</text>
  67. <text>全平台</text>
  68. </view>
  69. <view class="couponValue">
  70. <text>使用次数:</text>
  71. <text>1次</text>
  72. </view>
  73. <view class="couponValue">
  74. <text>到期时间:</text>
  75. <text>2024-01-01</text>
  76. </view>
  77. </view>
  78. </view>
  79. </view>
  80. </view>
  81. </view>
  82. <view class="flex-row justify-between titleView bordBottom">
  83. <text class="title">优惠券单价</text>
  84. <text class="couponPrice1">¥50.00</text>
  85. </view>
  86. <view class="flex-row justify-between titleView">
  87. <text class="title">数量</text>
  88. <u-number-box
  89. min="1"
  90. step="1"
  91. inputWidth="50"
  92. integer
  93. button-size="30"
  94. color="#666666"
  95. bgColor="#ffffff"
  96. iconStyle="color: #999999"
  97. ></u-number-box>
  98. </view>
  99. <view class="flex-row justify-between conView">
  100. <view>
  101. <text class="conPriceValue">待支付</text>
  102. <text class="conPrice">¥500</text>
  103. </view>
  104. <view class="conBtn">
  105. <text>提交</text>
  106. </view>
  107. </view>
  108. </view>
  109. </uni-popup>
  110. </view>
  111. </template>
  112. <script>
  113. export default {
  114. components: {},
  115. data() {
  116. return {
  117. }
  118. },
  119. methods: {
  120. back() {
  121. let pages = getCurrentPages()
  122. if (pages.length > 1){
  123. uni.navigateBack({
  124. delta: 1,
  125. fail:err=>{
  126. console.log(err)
  127. }
  128. })
  129. }else {
  130. uni.switchTab({
  131. url: '/pages/my/my'
  132. });
  133. }
  134. },
  135. openPurchase(){
  136. this.$refs.purchasePopup.open()
  137. }
  138. }
  139. }
  140. </script>
  141. <style lang="scss" scoped>
  142. @import './index.rpx.css';
  143. </style>