coupon.vue 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281
  1. <template>
  2. <view class="content">
  3. <view style="margin-top: -26rpx;"></view>
  4. <view class="topbox" v-show="!nodataShow">
  5. <view class="top">
  6. <view class="topLine">
  7. <view class="topTxt1">{{levelName}}</view>
  8. <view class="topTxt2">客户等级</view>
  9. </view>
  10. <view class="topx"></view>
  11. <view class="topLine">
  12. <view class="topTxt1">{{list.length}}</view>
  13. <view class="topTxt2">可用优惠券</view>
  14. </view>
  15. <view class="topx"></view>
  16. <view class="topLine">
  17. <view class="topTxt1">{{integral}}</view>
  18. <view class="topTxt2">可用积分</view>
  19. </view>
  20. </view>
  21. </view>
  22. <view class="nodataBox" v-show="nodataShow||list.length==0">
  23. <image src="http://dmsphoto.66km.com.cn/thFiles/3C95A4C5-73F8-4B34-902B-703B8A0825C9.png" mode="widthFix" class="nodataImg"></image>
  24. <view class="noTxt">暂无数据</view>
  25. </view>
  26. <view class="cBox" v-show="!nodataShow&&list.length!=0">
  27. <view class="line" v-for="(item,index) in list">
  28. <view class="lineTop">
  29. <view class="nameBox">
  30. <view class="type" v-if="item.discountType==1">满减券</view>
  31. <view class="type" v-if="item.discountType==2">商品券</view>
  32. <view class="type" v-if="item.discountType==3">服务券</view>
  33. <view class="name">{{item.ActName}}</view>
  34. </view>
  35. <view class="lprice" v-if="item.discountType==1">
  36. <span class="price1">¥</span>
  37. <span class="price2">{{item.ActMoney}}</span>
  38. <span class="price3">{{item.WhereMoney}}</span>
  39. </view>
  40. <view style="display: flex;">
  41. <view class="chepai" v-if="item.applyCarPlateNumber">限{{item.applyCarPlateNumber}}使用</view>
  42. <view class="chepai" v-else>不限车牌</view>
  43. </view>
  44. <view class="time" v-if="item.StartTime">{{item.StartTime.slice(0,10)}}至{{item.EndTime.slice(0,10)}}</view>
  45. <view class="time" v-else>有效期:领取后{{item.EndOffsetDays}}天有效</view>
  46. </view>
  47. <view class="lineBottom">
  48. {{item.overlyType == 0 ? '[不可叠加]' : '[可叠加]'}}
  49. {{item.shopLimit == 0 ? '[不限门店]' : '[限门店]'}}
  50. <span v-if="item.CouContent" @click="couFn(item.CouContent)"> [使用说明]</span>
  51. <!-- <span v-else>[使用说明]</span> -->
  52. </view>
  53. </view>
  54. <view style="height: 40rpx;"></view>
  55. </view>
  56. <view class="tkBox" v-if="couShow" @click="couHide">
  57. <view class="popupBox" @click.stop="">
  58. <view class="popupTitleBox">
  59. <view class="chaImg"></view>
  60. <view class="popupTitle">使用说明</view>
  61. <image src="../../static/img/cha.png" mode="" class="chaImg" @click="couHide"></image>
  62. </view>
  63. <view>
  64. <rich-text :nodes="txt"></rich-text>
  65. </view>
  66. </view>
  67. </view>
  68. </view>
  69. </template>
  70. <script>
  71. export default {
  72. data() {
  73. return {
  74. customerId:'',
  75. list:[],
  76. integral:'',
  77. levelName:'',
  78. nodataShow:false,
  79. couShow:false,
  80. txt:'',
  81. }
  82. },
  83. onLoad() {
  84. },
  85. methods: {
  86. couFn(txt){
  87. this.txt=txt;
  88. console.log(this.txt)
  89. this.couShow=true;
  90. },
  91. couHide(){
  92. this.couShow=false;
  93. },
  94. getdata(){
  95. var that=this;
  96. this.customerId=uni.getStorageSync('customerId')
  97. this.integral=uni.getStorageSync('integral')
  98. this.levelName=uni.getStorageSync('levelName')
  99. if(!this.customerId){
  100. this.nodataShow=true
  101. }else{
  102. uni.showLoading({
  103. title: '加载中'
  104. });
  105. this.$http('enterprise/wechat/listIntegralInfo', {
  106. id:this.customerId,
  107. }, 'GET').then(res => {
  108. uni.hideLoading();
  109. this.list=res.data
  110. })
  111. }
  112. }
  113. }
  114. }
  115. </script>
  116. <style scoped>
  117. .topbox{
  118. padding: 24rpx;background: #fff;
  119. }
  120. .top{
  121. width: 702rpx;
  122. height: 156rpx;
  123. background: linear-gradient( 132deg, #FFF0DF 0%, #FED28F 100%);
  124. border-radius: 10rpx;
  125. }
  126. .top{
  127. display: flex;justify-content: space-around;
  128. }
  129. .topx{
  130. opacity: 0.19;
  131. height: 49rpx;
  132. width: 1px;
  133. background: #2D2417;
  134. margin-top: 54rpx;
  135. }
  136. .topLine{
  137. text-align: center;
  138. padding-top: 37rpx;
  139. }
  140. .topTxt1{
  141. font-weight: 500;
  142. font-size: 35rpx;
  143. color: #2D2417;
  144. }
  145. .topTxt2{
  146. font-size: 26rpx;
  147. color: #50402A;
  148. padding-top: 10rpx;
  149. }
  150. .cBox{
  151. padding: 0 24rpx;
  152. }
  153. .line{
  154. padding: 30rpx 0rpx 16rpx 0;background: #FFFFFF;
  155. border-radius: 10rpx;margin-top: 20rpx;
  156. }
  157. .nameBox{
  158. display: flex;
  159. }
  160. .type{
  161. font-size: 24rpx;
  162. color: #2B2219;
  163. /* padding-top: 2rpx;
  164. padding-bottom: 2rpx; */
  165. background: linear-gradient( 128deg, #FFE4C5 0%, #FDC692 100%);
  166. border-radius: 4rpx;
  167. width: 82rpx;
  168. text-align: center;
  169. line-height: 38rpx;
  170. height: 36rpx;
  171. }
  172. .name{
  173. line-height: 38rpx;padding-left: 10rpx;font-weight: 500;
  174. font-size: 28rpx;
  175. color: #333333;
  176. }
  177. .lineTop{
  178. padding: 0 24rpx;
  179. border-bottom: 1px dashed #DDDDDD;
  180. }
  181. .price1{
  182. font-weight: 500;
  183. font-size: 26rpx;
  184. color: #FF3B30;
  185. }
  186. .price2{
  187. font-weight: 500;
  188. font-size: 40rpx;
  189. color: #FF0000;
  190. }
  191. .price3{
  192. font-weight: 400;
  193. font-size: 26rpx;
  194. color: #666666;
  195. }
  196. .chepai{
  197. /* height: 36rpx; */
  198. background:rgba(255, 129, 19, 0.1);
  199. border-radius: 4rpx;
  200. font-size: 22rpx;
  201. color: #FF8113;
  202. /* line-height: 38rpx; */
  203. padding: 4rpx 10rpx;
  204. margin-top: 10rpx;
  205. }
  206. .time{
  207. font-size: 26rpx;
  208. color: #666666;padding-top: 10rpx;
  209. padding-bottom: 15rpx;
  210. }
  211. .lineBottom{
  212. font-size: 26rpx;
  213. color: #666666;
  214. padding: 15rpx 24rpx;
  215. padding-bottom: 0;
  216. }
  217. .nodataImg{
  218. width: 400rpx;
  219. padding-top: 100rpx;
  220. }
  221. .noTxt{
  222. font-size: 32rpx;
  223. color: #999999;
  224. padding-top: 50rpx;
  225. }
  226. .nodataBox{
  227. text-align: center;background: #fff;
  228. }
  229. .tkBox{
  230. width: 100%;
  231. height: 100%;
  232. position: fixed;
  233. left: 0;
  234. top: 0;
  235. background: rgba(0,0,0,0.5);
  236. }
  237. .popupBox{
  238. width: 750rpx;
  239. height: 60vh;
  240. background: #FFFFFF;
  241. border-radius: 32rpx 32rpx 0rpx 0rpx;
  242. position: absolute;
  243. bottom: 0;
  244. }
  245. .popupTitleBox{
  246. display: flex;
  247. justify-content: space-between;
  248. padding: 30rpx;
  249. }
  250. .popupTitle{
  251. font-size: 30rpx;
  252. color: #3C3C3C;
  253. line-height: 42rpx;
  254. font-weight: 600;
  255. }
  256. .chaImg{
  257. width: 27rpx;height: 27rpx;margin-top: 9rpx;
  258. }
  259. .lprice{
  260. padding-top: 10rpx;
  261. }
  262. .price3{
  263. padding-left: 16rpx;
  264. }
  265. </style>