index.vue 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. <template>
  2. <div class="coupon">
  3. <div class="top">
  4. <span class="selected" >可使用(9)</span>
  5. <span>已过期(3)</span>
  6. </div>
  7. <div class="bottom">
  8. <div class="item cash">
  9. <div class="left">
  10. <span class="amount">¥<span class="big">100</span></span>
  11. <span>无门槛</span>
  12. </div>
  13. <div class="right">
  14. <span class="title">立减劵</span>
  15. <span class="scope">范围:限汽油</span>
  16. <span class="valid">有效至 2021.03.01</span>
  17. <span class="use"></span>
  18. </div>
  19. </div>
  20. <div class="item discount">
  21. <div class="left">
  22. <span class="amount">¥<span class="big">100</span></span>
  23. <span>无门槛</span>
  24. </div>
  25. <div class="right">
  26. <span class="title">立减劵</span>
  27. <span class="scope">范围:限汽油</span>
  28. <span class="valid">有效至 2021.03.01</span>
  29. <span class="use"></span>
  30. </div>
  31. </div>
  32. <div class="item exchange">
  33. <div class="left">
  34. <span class="amount">¥<span class="big">100</span></span>
  35. <span>无门槛</span>
  36. </div>
  37. <div class="right">
  38. <span class="title">立减劵</span>
  39. <span class="scope">范围:限汽油</span>
  40. <span class="valid">有效至 2021.03.01</span>
  41. <span class="use"></span>
  42. </div>
  43. </div>
  44. <div class="item invalid">
  45. <div class="left">
  46. <span class="amount">¥<span class="big">100</span></span>
  47. <span>无门槛</span>
  48. </div>
  49. <div class="right">
  50. <span class="title">立减劵</span>
  51. <span class="scope">范围:限汽油</span>
  52. <span class="valid">有效至 2021.03.01</span>
  53. </div>
  54. </div>
  55. </div>
  56. </div>
  57. </template>
  58. <script>
  59. import ProductList from "../../components/ProductList";
  60. import moment from "moment";
  61. import { mapGetters } from "vuex";
  62. export default {
  63. head() {
  64. return {
  65. title: "电子卡明细",
  66. };
  67. },
  68. data() {
  69. return {
  70. allList: [],
  71. showList: [],
  72. type: 0, //0全部 1充值 2支出
  73. gasolineAmount: 0,
  74. dieselAmount: 0,
  75. };
  76. },
  77. computed: {
  78. ...mapGetters({
  79. userInfo: "authen/userInfo",
  80. }),
  81. chargeList() {
  82. return this.allList.filter((ele) => {
  83. return ele.usageType === "+";
  84. });
  85. },
  86. payList() {
  87. return this.allList.filter((ele) => {
  88. return ele.usageType === "-";
  89. });
  90. },
  91. },
  92. filters: {
  93. toFixed: function (value) {
  94. return (+value).toFixed(2);
  95. },
  96. },
  97. components: {
  98. ProductList,
  99. },
  100. created() {},
  101. methods: {},
  102. };
  103. </script>
  104. <style lang="scss">
  105. .coupon {
  106. width: 7.5rem;
  107. background: #ffffff;
  108. border: 1px solid #eeeeee;
  109. .top {
  110. height: 1rem;
  111. display: flex;
  112. justify-content: space-around;
  113. align-items: center;
  114. span {
  115. height: 0.45rem;
  116. font-size: 0.32rem;
  117. font-weight: 400;
  118. color: #aaaaaa;
  119. line-height: 0.45rem;
  120. letter-spacing: 0.01rem;
  121. }
  122. span.selected {
  123. color: #111111;
  124. }
  125. }
  126. .bottom {
  127. .item {
  128. width: 6.9rem;
  129. height: 1.6rem;
  130. font-size: .24rem;
  131. font-weight: 500;
  132. color: #ffffff;
  133. line-height: .4rem;
  134. display: flex;
  135. justify-content: space-between;
  136. margin-bottom: .2rem;
  137. .left {
  138. width: 1.5rem;
  139. height: 1.6rem;
  140. display: flex;
  141. flex-direction: column;
  142. justify-content: center;
  143. text-align: center;
  144. .amount {
  145. font-size: .2rem;
  146. .big {
  147. font-size: .33rem;
  148. }
  149. }
  150. }
  151. .right {
  152. width: 5.4rem;
  153. height: 1.6rem;
  154. color: #111111;
  155. position: relative;
  156. .title {
  157. position: absolute;
  158. top: .22rem;
  159. left: .2rem;
  160. height: .4rem;
  161. font-size: .28rem;
  162. font-weight: 500;
  163. line-height: .4rem;
  164. }
  165. .scope {
  166. position: absolute;
  167. top: .72rem;
  168. left: .2rem;
  169. height: .28rem;
  170. font-size: .2rem;
  171. color: #666666;
  172. line-height: .28rem;
  173. }
  174. .valid {
  175. position: absolute;
  176. top: 1.1rem;
  177. left: .2rem;
  178. height: .28rem;
  179. font-size: .20rem;
  180. color: #666666;
  181. line-height: .28rem;
  182. }
  183. .use {
  184. position: absolute;
  185. top: .54rem;
  186. right: .20rem;
  187. display: inline-block;
  188. width: 1.60rem;
  189. height: .55rem;
  190. }
  191. }
  192. }
  193. .cash {
  194. background: url("../../static/coupon/youhuiquan1.2x.png") no-repeat;
  195. background-size: 100% 100%;
  196. }
  197. .discount {
  198. background: url("../../static/coupon/youhuiquan2.2x.png") no-repeat;
  199. background-size: 100% 100%;
  200. }
  201. .exchange {
  202. background: url("../../static/coupon/youhuiquan3.2x.png") no-repeat;
  203. background-size: 100% 100%;
  204. }
  205. .invalid{
  206. background: url("../../static/coupon/youhuiquan0.2x.png") no-repeat;
  207. background-size: 100% 100%;
  208. }
  209. }
  210. }
  211. </style>