coupon.vue 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261
  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">限{{item.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. <span v-if="item.CouContent" @click="couFn(item.CouContent)"> [使用说明]</span>
  50. <!-- <span v-else>[使用说明]</span> -->
  51. </view>
  52. </view>
  53. </view>
  54. <view class="tkBox" v-if="couShow" @click="couHide">
  55. <view class="popupBox" @click.stop="">
  56. <view class="popupTitleBox">
  57. <view class="popupTitle">使用说明</view>
  58. <image src="../../static/img/cha.png" mode="" class="chaImg" @click="couHide"></image>
  59. </view>
  60. <view>
  61. <rich-text :nodes="txt"></rich-text>
  62. </view>
  63. </view>
  64. </view>
  65. </view>
  66. </template>
  67. <script>
  68. export default {
  69. data() {
  70. return {
  71. customerId:'',
  72. list:[],
  73. integral:'',
  74. levelName:'',
  75. nodataShow:false,
  76. couShow:false,
  77. txt:'',
  78. }
  79. },
  80. onLoad() {
  81. },
  82. methods: {
  83. couFn(txt){
  84. this.txt=txt;
  85. console.log(this.txt)
  86. this.couShow=true;
  87. },
  88. couHide(){
  89. this.couShow=false;
  90. },
  91. getdata(){
  92. var that=this;
  93. this.customerId=uni.getStorageSync('customerId')
  94. this.integral=uni.getStorageSync('integral')
  95. this.levelName=uni.getStorageSync('levelName')
  96. if(!this.customerId){
  97. this.nodataShow=true
  98. }else{
  99. this.$http('enterprise/wechat/listIntegralInfo', {
  100. id:this.customerId,
  101. }, 'GET').then(res => {
  102. this.list=res.data
  103. })
  104. }
  105. }
  106. }
  107. }
  108. </script>
  109. <style scoped>
  110. .topbox{
  111. padding: 24rpx;background: #fff;
  112. }
  113. .top{
  114. width: 702rpx;
  115. height: 156rpx;
  116. background: linear-gradient( 132deg, #FFF0DF 0%, #FED28F 100%);
  117. border-radius: 10rpx;
  118. }
  119. .top{
  120. display: flex;justify-content: space-around;
  121. }
  122. .topx{
  123. opacity: 0.19;
  124. height: 49rpx;
  125. width: 1px;
  126. background: #2D2417;
  127. margin-top: 54rpx;
  128. }
  129. .topLine{
  130. text-align: center;
  131. padding-top: 37rpx;
  132. }
  133. .topTxt1{
  134. font-weight: 500;
  135. font-size: 35rpx;
  136. color: #2D2417;
  137. }
  138. .topTxt2{
  139. font-size: 24rpx;
  140. color: #50402A;
  141. padding-top: 8rpx;
  142. }
  143. .cBox{
  144. padding: 0 24rpx;
  145. }
  146. .line{
  147. padding: 30rpx 0rpx;background: #FFFFFF;
  148. border-radius: 10rpx;margin-top: 20rpx;
  149. }
  150. .nameBox{
  151. display: flex;
  152. }
  153. .type{
  154. font-size: 24rpx;
  155. color: #2B2219;
  156. height: 36rpx;
  157. background: linear-gradient( 128deg, #FFE4C5 0%, #FDC692 100%);
  158. border-radius: 4rpx;
  159. width: 82rpx;
  160. text-align: center;
  161. line-height: 36rpx;
  162. }
  163. .name{
  164. line-height: 36rpx;padding-left: 10rpx;font-weight: 500;
  165. font-size: 28rpx;
  166. color: #333333;
  167. }
  168. .lineTop{
  169. padding: 0 24rpx;
  170. border-bottom: 1px dashed #DDDDDD;
  171. }
  172. .price1{
  173. font-weight: 500;
  174. font-size: 26rpx;
  175. color: #FF3B30;
  176. }
  177. .price2{
  178. font-weight: 500;
  179. font-size: 40rpx;
  180. color: #FF0000;
  181. }
  182. .price3{
  183. font-weight: 400;
  184. font-size: 22rpx;
  185. color: #666666;
  186. }
  187. .chepai{
  188. height: 36rpx;
  189. background:rgba(255, 129, 19, 0.1);
  190. border-radius: 4rpx;
  191. font-size: 22rpx;
  192. color: #FF8113;
  193. line-height: 36rpx;
  194. padding: 0 10rpx;
  195. margin-top: 10rpx;
  196. }
  197. .time{
  198. font-size: 22rpx;
  199. color: #666666;padding-top: 10rpx;
  200. padding-bottom: 15rpx;
  201. }
  202. .lineBottom{
  203. font-size: 22rpx;
  204. color: #666666;
  205. padding: 15rpx 24rpx;
  206. }
  207. .nodataImg{
  208. width: 400rpx;
  209. padding-top: 100rpx;
  210. }
  211. .noTxt{
  212. font-size: 32rpx;
  213. color: #999999;
  214. padding-top: 50rpx;
  215. }
  216. .nodataBox{
  217. text-align: center;
  218. }
  219. .tkBox{
  220. width: 100%;
  221. height: 100%;
  222. position: fixed;
  223. left: 0;
  224. top: 0;
  225. background: rgba(0,0,0,0.5);
  226. }
  227. .popupBox{
  228. width: 750rpx;
  229. height: 60vh;
  230. background: #FFFFFF;
  231. border-radius: 32rpx 32rpx 0rpx 0rpx;
  232. position: absolute;
  233. bottom: 0;
  234. }
  235. .popupTitleBox{
  236. display: flex;
  237. justify-content: space-between;
  238. padding: 30rpx;
  239. }
  240. .popupTitle{
  241. font-size: 30rpx;
  242. color: #3C3C3C;
  243. line-height: 42rpx;
  244. }
  245. .chaImg{
  246. width: 27rpx;height: 27rpx;margin-top: 9rpx;
  247. }
  248. </style>