coupon.vue 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. <template>
  2. <view class="content">
  3. <view class="nodataBox" v-show="nodataShow">
  4. <image src="http://dmsphoto.66km.com.cn/thFiles/3C95A4C5-73F8-4B34-902B-703B8A0825C9.png" mode="widthFix" class="nodataImg"></image>
  5. <view class="noTxt">暂无数据</view>
  6. </view>
  7. <view class="topbox" v-show="!nodataShow">
  8. <view class="top">
  9. <view class="topLine">
  10. <view class="topTxt1">{{levelName}}</view>
  11. <view class="topTxt2">客户等级</view>
  12. </view>
  13. <view class="topx"></view>
  14. <view class="topLine">
  15. <view class="topTxt1">{{list.length}}</view>
  16. <view class="topTxt2">可用优惠券</view>
  17. </view>
  18. <view class="topx"></view>
  19. <view class="topLine">
  20. <view class="topTxt1">{{integral}}</view>
  21. <view class="topTxt2">可用积分</view>
  22. </view>
  23. </view>
  24. </view>
  25. <view class="cBox" v-show="!nodataShow">
  26. <view class="line" v-for="(item,index) in list">
  27. <view class="lineTop">
  28. <view class="nameBox">
  29. <view class="type" v-if="item.discountType==1">满减券</view>
  30. <view class="type" v-if="item.discountType==2">商品券</view>
  31. <view class="type" v-if="item.discountType==3">服务券</view>
  32. <view class="name">{{item.ActName}}</view>
  33. </view>
  34. <view class="lprice">
  35. <span class="price1">¥</span>
  36. <span class="price2">{{item.ActMoney}}</span>
  37. <span class="price3">{{item.WhereMoney}}</span>
  38. </view>
  39. <view style="display: flex;">
  40. <view class="chepai" v-if="item.applyCarPlateNumber">限{{tem.applyCarPlateNumber}}使用</view>
  41. <view class="chepai" v-else>不限车牌</view>
  42. </view>
  43. <view class="time" v-if="item.StartTime">{{item.StartTime.slice(0,10)}}至{{item.EndTime.slice(0,10)}}</view>
  44. <view class="time" v-else>有效期:领取后{{item.EndOffsetDays}}天有效</view>
  45. </view>
  46. <view class="lineBottom">
  47. {{item.overlyType == 0 ? '[不可叠加]' : '[可叠加]'}}
  48. {{item.shopLimit == 0 ? '[不限门店]' : '[限门店]'}}
  49. [使用说明]
  50. </view>
  51. </view>
  52. </view>
  53. </view>
  54. </template>
  55. <script>
  56. export default {
  57. data() {
  58. return {
  59. customerId:'',
  60. list:[],
  61. integral:'',
  62. levelName:'',
  63. nodataShow:false,
  64. }
  65. },
  66. onLoad() {
  67. },
  68. methods: {
  69. getdata(){
  70. var that=this;
  71. this.customerId=uni.getStorageSync('customerId')
  72. this.integral=uni.getStorageSync('integral')
  73. this.levelName=uni.getStorageSync('levelName')
  74. if(!this.customerId){
  75. this.nodataShow=true
  76. }else{
  77. this.$http('enterprise/wechat/listIntegralInfo', {
  78. id:this.customerId,
  79. }, 'GET').then(res => {
  80. this.list=res.data
  81. })
  82. }
  83. }
  84. }
  85. }
  86. </script>
  87. <style scoped>
  88. .topbox{
  89. padding: 24rpx;background: #fff;
  90. }
  91. .top{
  92. width: 702rpx;
  93. height: 156rpx;
  94. background: linear-gradient( 132deg, #FFF0DF 0%, #FED28F 100%);
  95. border-radius: 10rpx;
  96. }
  97. .top{
  98. display: flex;justify-content: space-around;
  99. }
  100. .topx{
  101. opacity: 0.19;
  102. height: 49rpx;
  103. width: 1px;
  104. background: #2D2417;
  105. margin-top: 54rpx;
  106. }
  107. .topLine{
  108. text-align: center;
  109. padding-top: 37rpx;
  110. }
  111. .topTxt1{
  112. font-weight: 500;
  113. font-size: 35rpx;
  114. color: #2D2417;
  115. }
  116. .topTxt2{
  117. font-size: 24rpx;
  118. color: #50402A;
  119. padding-top: 8rpx;
  120. }
  121. .cBox{
  122. padding: 0 24rpx;
  123. }
  124. .line{
  125. padding: 30rpx 0rpx;background: #FFFFFF;
  126. border-radius: 10rpx;margin-top: 20rpx;
  127. }
  128. .nameBox{
  129. display: flex;
  130. }
  131. .type{
  132. font-size: 24rpx;
  133. color: #2B2219;
  134. height: 36rpx;
  135. background: linear-gradient( 128deg, #FFE4C5 0%, #FDC692 100%);
  136. border-radius: 4rpx;
  137. width: 82rpx;
  138. text-align: center;
  139. line-height: 36rpx;
  140. }
  141. .name{
  142. line-height: 36rpx;padding-left: 10rpx;font-weight: 500;
  143. font-size: 28rpx;
  144. color: #333333;
  145. }
  146. .lineTop{
  147. padding: 0 24rpx;
  148. border-bottom: 1px dashed #DDDDDD;
  149. }
  150. .price1{
  151. font-weight: 500;
  152. font-size: 26rpx;
  153. color: #FF3B30;
  154. }
  155. .price2{
  156. font-weight: 500;
  157. font-size: 40rpx;
  158. color: #FF0000;
  159. }
  160. .price3{
  161. font-weight: 400;
  162. font-size: 22rpx;
  163. color: #666666;
  164. }
  165. .chepai{
  166. height: 36rpx;
  167. background:rgba(255, 129, 19, 0.1);
  168. border-radius: 4rpx;
  169. font-size: 22rpx;
  170. color: #FF8113;
  171. line-height: 36rpx;
  172. padding: 0 10rpx;
  173. margin-top: 10rpx;
  174. }
  175. .time{
  176. font-size: 22rpx;
  177. color: #666666;padding-top: 10rpx;
  178. padding-bottom: 15rpx;
  179. }
  180. .lineBottom{
  181. font-size: 22rpx;
  182. color: #666666;
  183. padding: 15rpx 24rpx;
  184. }
  185. .nodataImg{
  186. width: 400rpx;
  187. padding-top: 100rpx;
  188. }
  189. .noTxt{
  190. font-size: 32rpx;
  191. color: #999999;
  192. padding-top: 50rpx;
  193. }
  194. .nodataBox{
  195. text-align: center;
  196. }
  197. </style>