charge.vue 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  1. <template>
  2. <div class="point-index">
  3. <div class="background">
  4. <div class="headline"></div>
  5. </div>
  6. <div class="content">
  7. <div class="title">我的卡片 (2)</div>
  8. <div class="gasoline">
  9. <div class="title">汽油卡</div>
  10. <div class="text">余额 <span>850.00</span>元</div>
  11. <button>充值</button>
  12. </div>
  13. <div class="diesel">
  14. <div class="title">柴油卡</div>
  15. <div class="text">余额 <span>850.00</span>元</div>
  16. <button>充值</button>
  17. </div>
  18. </div>
  19. <div class="mask">
  20. <div class="layer"></div>
  21. <div class="charge">
  22. <div class="title">充值</div>
  23. <div class="tip">提示:充值汽油1000元,赠送100元,实际到账1100元</div>
  24. <div class="amount">
  25. <span>汽油充值</span>
  26. <input type="text" placeholder="输入充值金额" />
  27. <span>¥</span>
  28. </div>
  29. </div>
  30. <button>确认充值</button>
  31. </div>
  32. </div>
  33. </template>
  34. <script>
  35. import ProductList from "../../components/ProductList";
  36. import { mapState, mapActions } from "vuex";
  37. export default {
  38. head() {
  39. return {
  40. title: "会员充值",
  41. };
  42. },
  43. data() {
  44. return {
  45. images: [],
  46. list: [],
  47. loading: false, //加载状态
  48. finished: false, //是否完成加载
  49. refreshing: false, //是否正在上拉刷新
  50. };
  51. },
  52. components: {
  53. ProductList,
  54. },
  55. computed: {
  56. ...mapState({
  57. pointInfo: (state) => state.point.pointInfo,
  58. }),
  59. },
  60. mounted() {
  61. // this.getPointInfo();
  62. },
  63. methods: {
  64. ...mapActions({
  65. getPointInfo: "point/getPointInfo",
  66. }),
  67. },
  68. };
  69. </script>
  70. <style>
  71. .point-index {
  72. position: relative;
  73. height: 100vh;
  74. }
  75. .point-index .background {
  76. background-color: #f3b335;
  77. width: 7.5rem;
  78. height: 7.5rem;
  79. position: relative;
  80. background: url("~static/personal/23@2x.png") no-repeat 0px 0px;
  81. background-size: 100% 100%;
  82. z-index: -1;
  83. overflow: hidden;
  84. }
  85. .point-index .background .headline {
  86. width: 6.9rem;
  87. height: 4.33rem;
  88. background: url("~static/personal/bj2@2x.png") no-repeat 0px 0px;
  89. background-size: 100% 100%;
  90. margin: 0.3rem auto;
  91. }
  92. .point-index .content {
  93. position: absolute;
  94. top: 3.78rem;
  95. bottom: 0rem;
  96. left: 0rem;
  97. right: 0rem;
  98. background-color: #ffffff;
  99. border-radius: 0.3rem 0.3rem 0 0;
  100. padding: 0.3rem;
  101. display: flex;
  102. flex-direction: column;
  103. }
  104. .point-index .content > div:not(.title) {
  105. width: 6.9rem;
  106. height: 1.6rem;
  107. margin-top: 0.3rem;
  108. position: relative;
  109. }
  110. .point-index .content .title {
  111. font-size: 0.35rem;
  112. color: #333333;
  113. font-weight: 600;
  114. }
  115. .point-index .content .gasoline {
  116. background: url("~static/personal/bj3@2x.png") no-repeat 0px 0px;
  117. background-size: 100% 100%;
  118. }
  119. .point-index .content .diesel {
  120. background: url("~static/personal/bj4@2x.png") no-repeat 0px 0px;
  121. background-size: 100% 100%;
  122. }
  123. .point-index .content div .title {
  124. height: 0.45rem;
  125. font-size: 0.32rem;
  126. font-family: PingFangSC-Medium, PingFang SC;
  127. font-weight: 500;
  128. color: #ffffff;
  129. line-height: 0.45rem;
  130. position: absolute;
  131. top: 0.27rem;
  132. left: 1.67rem;
  133. }
  134. .point-index .content .gasoline .text {
  135. height: 0.45rem;
  136. font-size: 0.32rem;
  137. font-family: PingFangSC-Medium, PingFang SC;
  138. font-weight: 500;
  139. color: #3db58f;
  140. line-height: 0.45rem;
  141. position: absolute;
  142. top: 0.9rem;
  143. left: 1.67rem;
  144. }
  145. .point-index .content .diesel .text {
  146. height: 0.45rem;
  147. font-size: 0.32rem;
  148. font-family: PingFangSC-Medium, PingFang SC;
  149. font-weight: 500;
  150. color: #ea8c7d;
  151. line-height: 0.45rem;
  152. position: absolute;
  153. top: 0.9rem;
  154. left: 1.67rem;
  155. }
  156. .point-index .content div .text span {
  157. color: #fff;
  158. }
  159. .point-index .content div button {
  160. border: none;
  161. background-color: transparent;
  162. outline: none;
  163. display: block;
  164. width: 1.4rem;
  165. height: 0.6rem;
  166. background: #ffffff;
  167. border-radius: 0.3rem;
  168. position: absolute;
  169. top: 0.5rem;
  170. right: 0.3rem;
  171. }
  172. .point-index .content .gasoline button {
  173. color: #24ac81;
  174. }
  175. .point-index .content .diesel button {
  176. color: #e87d6d;
  177. }
  178. .point-index .mask {
  179. position: absolute;
  180. top: 0;
  181. bottom: 0;
  182. left: 0;
  183. right: 0;
  184. }
  185. .point-index .mask .layer {
  186. position: absolute;
  187. top: 0;
  188. bottom: 0;
  189. left: 0;
  190. right: 0;
  191. background: #111111;
  192. opacity: 0.59;
  193. }
  194. .point-index .mask .charge {
  195. position: absolute;
  196. top: 8.24rem;
  197. bottom: 0;
  198. left: 0;
  199. right: 0;
  200. background: #f2f2f2;
  201. border-radius: 0.42rem 0.42rem 0rem 0rem;
  202. box-sizing: border-box;
  203. padding: 0.3rem 0;
  204. display: flex;
  205. flex-direction: column;
  206. align-items: center;
  207. }
  208. .point-index .mask .charge div {
  209. margin-top: 0.2rem;
  210. }
  211. .point-index .mask .charge .title {
  212. width: 0.64rem;
  213. height: 0.45rem;
  214. font-size: 0.32rem;
  215. font-family: PingFangSC-Regular, PingFang SC;
  216. font-weight: 400;
  217. color: #111111;
  218. line-height: 0.45rem;
  219. }
  220. .point-index .mask .charge .tip {
  221. height: 0.33rem;
  222. font-size: 0.24rem;
  223. font-family: PingFangSC-Regular, PingFang SC;
  224. font-weight: 400;
  225. color: #aaaaaa;
  226. line-height: 0.33rem;
  227. }
  228. .point-index .mask .charge .amount {
  229. width: 6.9rem;
  230. height: 1.2rem;
  231. background: url("~static/personal/biankuang@2x.png") no-repeat 0px 0px;
  232. background-size: 100% 100%;
  233. position: relative;
  234. }
  235. .point-index .mask .charge .amount span:nth-child(1) {
  236. height: 0.4rem;
  237. font-size: 0.28rem;
  238. font-weight: 600;
  239. color: #884e16;
  240. line-height: 0.4rem;
  241. position: absolute;
  242. top: 0.4rem;
  243. left: 0.51rem;
  244. }
  245. .point-index .mask .charge .amount input {
  246. background: none;
  247. outline: none;
  248. border: none;
  249. height: 0.4rem;
  250. font-size: 0.28rem;
  251. font-family: PingFangSC-Regular, PingFang SC;
  252. font-weight: 400;
  253. color: #111111;
  254. line-height: 0.4rem;
  255. position: absolute;
  256. top: 0.4rem;
  257. left: 2.54rem;
  258. }
  259. .point-index .mask .charge .amount span:nth-last-child(1) {
  260. height: 0.4rem;
  261. font-size: 0.28rem;
  262. font-family: PingFangSC-Regular, PingFang SC;
  263. font-weight: 400;
  264. color: #aaaaaa;
  265. line-height: 0.4rem;
  266. position: absolute;
  267. top: 0.4rem;
  268. right: 0.4rem;
  269. }
  270. .point-index .mask button {
  271. border: none;
  272. background-color: transparent;
  273. outline: none;
  274. bottom: 0.83rem;
  275. position: absolute;
  276. width: 6.9rem;
  277. height: 0.8rem;
  278. left:.3rem;
  279. background: #CCCCCC;
  280. border-radius: 0.45rem;
  281. font-size: 0.32rem;
  282. font-family: PingFangSC-Regular, PingFang SC;
  283. font-weight: 400;
  284. color: #FFFFFF;
  285. line-height: 0.45rem;
  286. }
  287. </style>