discountCardDetail.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. <template>
  2. <view class="box">
  3. <view style="width: 750rpx;height: 172rpx;background: #FF0000;"></view>
  4. <view class="detailBg">
  5. <view class="detailTop">
  6. <view class="leftB">
  7. <view class="use">¥<span class="use2">{{detail.actMoney}}</span></view>
  8. <!-- <view class="used" v-else>¥<span class="used2">{{detail.actMoney}}</span></view> -->
  9. <view class="tiaojian">{{detail.whereMoney!==0?'满'+detail.whereMoney+'元可用':'满任意金额可用'}}</view>
  10. </view>
  11. <view class="centerB">
  12. <view class="name">{{detail.actName}}</view>
  13. <view class="time" v-if="detail.startTime">
  14. 有效期:{{detail.startTime.slice(0,10)}}-{{detail.endTime.slice(0,10)}}</view>
  15. <view class="time" v-else>有效期:</view>
  16. </view>
  17. </view>
  18. </view>
  19. <view class="comtentBox">
  20. <view style="margin-bottom: 30rpx;">
  21. <view class="titleBox">
  22. <image src="../../static/img/icon_youhui_red.png" mode="" class="redPoint"></image>
  23. <view class="title">可用次数</view>
  24. </view>
  25. <view class="content">{{detail.avaQty}}次</view>
  26. </view>
  27. <view style="margin-bottom: 30rpx;">
  28. <view class="titleBox">
  29. <image src="../../static/img/icon_youhui_red.png" mode="" class="redPoint"></image>
  30. <view class="title">适用门店</view>
  31. </view>
  32. <view v-for="(v,index) in detail.shopNames.split(',')">
  33. <view class="content">{{v}}</view>
  34. </view>
  35. </view>
  36. <view>
  37. <view class="titleBox">
  38. <image src="../../static/img/icon_youhui_red.png" mode="" class="redPoint"></image>
  39. <view class="title">使用说明</view>
  40. </view>
  41. <view v-if="detail.couContent" v-html="detail.couContent"></view>
  42. <view v-else class="content">暂无</view>
  43. </view>
  44. </view>
  45. </view>
  46. </template>
  47. <script>
  48. export default {
  49. data() {
  50. return {
  51. id: '',
  52. detail: {},
  53. }
  54. },
  55. onLoad(opt) {
  56. this.id = opt.id;
  57. this.getData();
  58. },
  59. methods: {
  60. getData() {
  61. uni.showLoading({
  62. title: '加载中'
  63. });
  64. this.$http('opencoupon/detailsCoupon', {
  65. // lat: this.location.lat,
  66. // lng: this.location.lng,
  67. id: this.id,
  68. }, 'GET').then(res => {
  69. uni.hideLoading();
  70. this.detail = res.data;
  71. })
  72. },
  73. }
  74. }
  75. </script>
  76. <style>
  77. .box {
  78. min-height: 100vh;
  79. background: #F4F5F7;
  80. }
  81. .detailBg {
  82. margin: -100rpx 24rpx 0rpx;
  83. background-color: #FFFFFF;
  84. border-radius: 10rpx;
  85. padding: 40rpx 20rpx;
  86. }
  87. .detailTop {
  88. display: flex;
  89. justify-content: flex-start;
  90. }
  91. .use {
  92. font-size: 26rpx;
  93. color: #FF0000;
  94. }
  95. .use2 {
  96. font-size: 40rpx;
  97. font-weight: 500;
  98. color: #FF0000;
  99. line-height: 56rpx;
  100. }
  101. .used {
  102. font-size: 26rpx;
  103. color: #666666;
  104. }
  105. .used2 {
  106. font-size: 40rpx;
  107. font-weight: 500;
  108. color: #666666;
  109. line-height: 56rpx;
  110. }
  111. .tiaojian {
  112. font-size: 24rpx;
  113. color: #666666;
  114. }
  115. .name {
  116. font-size: 30rpx;
  117. font-weight: 500;
  118. color: #333333;
  119. line-height: 56rpx;
  120. }
  121. .time {
  122. font-size: 24rpx;
  123. color: #666666;
  124. }
  125. .leftB {
  126. margin-right: 15rpx;
  127. }
  128. .comtentBox {
  129. margin: 20rpx 24rpx;
  130. background-color: #FFFFFF;
  131. border-radius: 10rpx;
  132. padding: 20rpx;
  133. }
  134. .titleBox {
  135. display: flex;
  136. align-items: center;
  137. }
  138. .redPoint {
  139. width: 18rpx;
  140. height: 18rpx;
  141. margin-right: 10rpx;
  142. }
  143. .title {
  144. font-size: 30rpx;
  145. color: #333333;
  146. font-weight: bold;
  147. }
  148. .content {
  149. font-size: 26rpx;
  150. color: #666666;
  151. margin-top: 16rpx;
  152. margin-left: 28rpx;
  153. }
  154. </style>