discountCardDetail.vue 3.9 KB

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