member.vue 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302
  1. <template>
  2. <div class="point-index">
  3. <div class="background"></div>
  4. <div class="card">
  5. <div class="avatar">
  6. <img src="/test/null.jpg" alt="" />
  7. <div class="info">
  8. <div class="name">李哈哈</div>
  9. <div class="text">智慧易加·油站专家</div>
  10. </div>
  11. </div>
  12. <div class="content">
  13. <div class="item">
  14. <div>1280.01</div>
  15. <div>总余额</div>
  16. </div>
  17. <div class="item">
  18. <div>200</div>
  19. <div>积分</div>
  20. </div>
  21. <div class="item">
  22. <div>0张</div>
  23. <div>优惠券</div>
  24. </div>
  25. </div>
  26. <div class="charge">
  27. <div class="tip">充值会员享更多优惠</div>
  28. <button>去充值</button>
  29. </div>
  30. </div>
  31. <div class="title">
  32. <div>
  33. <div class="icon"></div>
  34. <div>黄金会员</div>
  35. </div>
  36. <div>查看详情 ></div>
  37. </div>
  38. <div class="privilege">
  39. <div class="title">会员特权</div>
  40. <div>
  41. <span class="icon"></span>
  42. <span class="text">会员8.5折 </span><span>| 黄金会员加油享会员折扣</span>
  43. </div>
  44. <div>
  45. <span class="icon"></span>
  46. <span class="text">积分抵现 </span><span>| 10积分抵1元</span>
  47. </div>
  48. </div>
  49. </div>
  50. </template>
  51. <script>
  52. import ProductList from "../../components/ProductList";
  53. import { mapState, mapActions } from "vuex";
  54. export default {
  55. head() {
  56. return {
  57. title: "个人中心",
  58. };
  59. },
  60. data() {
  61. return {
  62. images: [],
  63. list: [],
  64. loading: false, // 加载状态
  65. finished: false, // 是否完成加载
  66. refreshing: false, // 是否正在上拉刷新
  67. };
  68. },
  69. components: {
  70. ProductList,
  71. },
  72. computed: {
  73. ...mapState({
  74. pointInfo: (state) => state.point.pointInfo,
  75. }),
  76. },
  77. mounted() {
  78. // this.getPointInfo();
  79. },
  80. methods: {
  81. ...mapActions({
  82. getPointInfo: "point/getPointInfo",
  83. }),
  84. },
  85. };
  86. </script>
  87. <style>
  88. .point-index {
  89. width: 100vw;
  90. height: 100vh;
  91. }
  92. .point-index .background {
  93. width: 7.5rem;
  94. height: 4.24rem;
  95. background: linear-gradient(
  96. 180deg,
  97. #fde1ac 0%,
  98. rgba(255, 242, 219, 0.56) 90%,
  99. rgba(255, 244, 224, 0) 100%
  100. );
  101. }
  102. .point-index .card {
  103. width: 6.9rem;
  104. height: 3.94rem;
  105. margin: 0 auto;
  106. margin-top: -3.84rem;
  107. background: url("~static/personal/bj5@2x.png") no-repeat 0px 0px;
  108. background-size: 100% 100%;
  109. position: relative;
  110. }
  111. .point-index .card .avatar {
  112. width: 3.2rem;
  113. height: 1rem;
  114. position: absolute;
  115. top: 0.4rem;
  116. left: 0.75rem;
  117. display: flex;
  118. justify-content: space-between;
  119. align-items: center;
  120. }
  121. .point-index .card .avatar img {
  122. width: 0.8rem;
  123. height: 0.8rem;
  124. border-radius: 0.4rem;
  125. }
  126. .point-index .card .avatar .info {
  127. display: flex;
  128. flex-direction: column;
  129. justify-content: space-between;
  130. }
  131. .point-index .card .avatar .info .name {
  132. height: 0.45rem;
  133. font-size: 0.32rem;
  134. font-family: PingFangSC-Medium, PingFang SC;
  135. font-weight: 500;
  136. color: #884e16;
  137. line-height: 0.45rem;
  138. }
  139. .point-index .card .avatar .info .text {
  140. height: 0.28rem;
  141. font-size: 0.2rem;
  142. font-family: PingFangSC-Light, PingFang SC;
  143. font-weight: 300;
  144. color: #884e16;
  145. line-height: 0.28rem;
  146. }
  147. .point-index .card .content {
  148. position: absolute;
  149. height: 1.2rem;
  150. width: 5.8rem;
  151. left: 0.7rem;
  152. top: 1.6rem;
  153. display: flex;
  154. justify-content: space-around;
  155. text-align: center;
  156. }
  157. .point-index .card .content .item div:nth-child(1) {
  158. width: 1.26rem;
  159. height: 0.5rem;
  160. font-size: 0.36rem;
  161. font-family: PingFangSC-Medium, PingFang SC;
  162. font-weight: 500;
  163. color: #884e16;
  164. line-height: 0.5rem;
  165. }
  166. .point-index .card .content .item div:nth-child(2) {
  167. height: 0.33rem;
  168. font-size: 0.24rem;
  169. font-family: PingFangSC-Regular, PingFang SC;
  170. font-weight: 400;
  171. color: #884e16;
  172. line-height: 0.33rem;
  173. }
  174. .point-index .card .charge {
  175. border: none;
  176. background-color: transparent;
  177. outline: none;
  178. width: 100%;
  179. left: 0.7rem;
  180. width: 6.1rem;
  181. display: flex;
  182. justify-content: space-between;
  183. align-items: center;
  184. position: absolute;
  185. bottom: 0.3rem;
  186. margin-right: 0.3rem;
  187. }
  188. .point-index .card .charge button {
  189. border: none;
  190. background-color: transparent;
  191. outline: none;
  192. width: 1.64rem;
  193. height: 0.6rem;
  194. background: #ff885d;
  195. border-radius: 0.33rem;
  196. margin-right: 0.3rem;
  197. font-size: 0.28rem;
  198. font-weight: 400;
  199. color: #ffffff;
  200. line-height: 0.4rem;
  201. }
  202. .point-index .title {
  203. box-sizing: border-box;
  204. padding: 0.4rem 0.3rem;
  205. display: flex;
  206. justify-content: space-between;
  207. align-items: center;
  208. }
  209. .point-index .title > div {
  210. display: flex;
  211. }
  212. .point-index .title div .icon {
  213. width: 0.1rem;
  214. height: 0.4rem;
  215. background: #d2a781;
  216. border-radius: 0.05rem;
  217. }
  218. .point-index .title div div:nth-last-child(1) {
  219. width: 1.12rem;
  220. height: 0.4rem;
  221. font-size: 0.28rem;
  222. font-family: PingFangSC-Medium, PingFang SC;
  223. font-weight: 600;
  224. color: #111111;
  225. line-height: 0.4rem;
  226. margin-left: 0.3rem;
  227. }
  228. .point-index .title div:nth-last-child(1) {
  229. height: 0.33rem;
  230. font-size: 0.24rem;
  231. font-family: PingFangSC-Regular, PingFang SC;
  232. font-weight: 400;
  233. color: #aaaaaa;
  234. line-height: 0.33rem;
  235. }
  236. .point-index .privilege {
  237. padding: 0.3rem;
  238. padding-top: 0;
  239. text-align: center;
  240. }
  241. .point-index .privilege div:not(:nth-child(1)) {
  242. width: 6.5rem;
  243. height: 1rem;
  244. border-radius: 0.1rem;
  245. border: 0.01rem solid #d2a781;
  246. margin: 0.2rem;
  247. box-sizing: border-box;
  248. }
  249. .point-index .privilege .title {
  250. width: 100%;
  251. height: 0.4rem;
  252. font-size: 0.28rem;
  253. font-family: PingFangSC-Regular, PingFang SC;
  254. font-weight: 400;
  255. color: #666666;
  256. line-height: 0.4rem;
  257. text-align: center;
  258. display: inline;
  259. }
  260. .point-index .privilege > div:not(.title) {
  261. position: relative;
  262. }
  263. .point-index .privilege div .icon {
  264. position: absolute;
  265. top: 0.27rem;
  266. left: 0.3rem;
  267. }
  268. .point-index .privilege div:nth-child(2) .icon {
  269. display: block;
  270. width: 0.29rem;
  271. height: 0.45rem;
  272. background: url("~static/personal/zhekou@2x.png") no-repeat 0px 0px;
  273. background-size: 100% 100%;
  274. }
  275. .point-index .privilege div:nth-child(3) .icon {
  276. display: block;
  277. width: 0.29rem;
  278. height: 0.45rem;
  279. background: url("~static/personal/jifen-2@2x.png") no-repeat 0px 0px;
  280. background-size: 100% 100%;
  281. }
  282. .point-index .privilege div .text {
  283. height: 0.4rem;
  284. font-size: 0.28rem;
  285. font-family: PingFangSC-Regular, PingFang SC;
  286. font-weight: 400;
  287. color: #111111;
  288. line-height: 0.4rem;
  289. position: absolute;
  290. top: 0.27rem;
  291. left: 0.79rem;
  292. }
  293. .point-index .privilege div span:nth-child(3) {
  294. position: absolute;
  295. color: #c5c5c5;
  296. top:.32rem;
  297. left:2.1rem
  298. }
  299. </style>