discountCardDetail.vue 4.0 KB

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