discountCardDetail.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. <template>
  2. <view class="box">
  3. <view style="width: 750rpx;height: 172rpx;" class="boxtop" :style="{background:'#'+themeColor}"></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. themeColor:'',
  54. }
  55. },
  56. onLoad(opt) {
  57. this.themeColor = uni.getStorageSync("themeColor");
  58. this.id = opt.id;
  59. this.getData();
  60. },
  61. methods: {
  62. getData() {
  63. uni.showLoading({
  64. title: '加载中'
  65. });
  66. this.$http('opencoupon/detailsCoupon', {
  67. // lat: this.location.lat,
  68. // lng: this.location.lng,
  69. id: this.id,
  70. }, 'GET').then(res => {
  71. uni.hideLoading();
  72. this.detail = res.data;
  73. })
  74. },
  75. }
  76. }
  77. </script>
  78. <style scoped>
  79. .boxtop{
  80. background: #FF0000;
  81. }
  82. .box {
  83. min-height: 100vh;
  84. background: #F4F5F7;
  85. }
  86. .detailBg {
  87. margin: -100rpx 24rpx 0rpx;
  88. background-color: #FFFFFF;
  89. border-radius: 10rpx;
  90. padding: 40rpx 20rpx;
  91. }
  92. .detailTop {
  93. display: flex;
  94. justify-content: flex-start;
  95. }
  96. .use {
  97. font-size: 26rpx;
  98. color: #FF0000;
  99. }
  100. .use2 {
  101. font-size: 40rpx;
  102. font-weight: 500;
  103. color: #FF0000;
  104. line-height: 56rpx;
  105. }
  106. .used {
  107. font-size: 26rpx;
  108. color: #666666;
  109. }
  110. .used2 {
  111. font-size: 40rpx;
  112. font-weight: 500;
  113. color: #666666;
  114. line-height: 56rpx;
  115. }
  116. .tiaojian {
  117. font-size: 24rpx;
  118. color: #666666;
  119. }
  120. .name {
  121. font-size: 30rpx;
  122. font-weight: 500;
  123. color: #333333;
  124. line-height: 56rpx;
  125. }
  126. .time {
  127. font-size: 24rpx;
  128. color: #666666;
  129. }
  130. .leftB {
  131. margin-right: 15rpx;
  132. }
  133. .comtentBox {
  134. margin: 20rpx 24rpx;
  135. background-color: #FFFFFF;
  136. border-radius: 10rpx;
  137. padding: 20rpx;
  138. }
  139. .titleBox {
  140. display: flex;
  141. align-items: center;
  142. }
  143. .redPoint {
  144. width: 18rpx;
  145. height: 18rpx;
  146. margin-right: 10rpx;
  147. }
  148. .title {
  149. font-size: 30rpx;
  150. color: #333333;
  151. font-weight: bold;
  152. }
  153. .content {
  154. font-size: 26rpx;
  155. color: #666666;
  156. margin-top: 16rpx;
  157. margin-left: 28rpx;
  158. }
  159. </style>