index.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. <template>
  2. <div class="point-index">
  3. <div class="background">
  4. <div class="avatar">
  5. <img src="/test/null.jpg" alt="" />
  6. </div>
  7. <div class="name">李哈哈</div>
  8. </div>
  9. <div class="container">
  10. <div class="banner"></div>
  11. <div class="menu">
  12. <div class="item">
  13. <div>
  14. <div class="icon"></div>
  15. <div class="text">会员充值</div>
  16. </div>
  17. <div class="go">></div>
  18. </div>
  19. <div class="item">
  20. <div>
  21. <div class="icon"></div>
  22. <div class="text">电子会员</div>
  23. </div>
  24. <div class="go">></div>
  25. </div>
  26. <div class="item">
  27. <div>
  28. <div class="icon"></div>
  29. <div class="text">优惠券</div>
  30. </div>
  31. <div class="go">></div>
  32. </div>
  33. <div class="item">
  34. <div>
  35. <div class="icon"></div>
  36. <div class="text">积分商城</div>
  37. </div>
  38. <div class="go">></div>
  39. </div>
  40. <div class="item">
  41. <div>
  42. <div class="icon"></div>
  43. <div class="text">今日油价</div>
  44. </div>
  45. <div class="go">></div>
  46. </div>
  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. position: relative;
  90. }
  91. .point-index .background {
  92. background-color: #f3b335;
  93. width: 7.5rem;
  94. height: 49.46vw;
  95. position: relative;
  96. background: url("../../static/personal/bj@2x.png") no-repeat 0px 0px;
  97. background-size: 100% 100%;
  98. z-index: -1;
  99. }
  100. .point-index .background .avatar {
  101. width: 1.1rem;
  102. height: 1.1rem;
  103. position: absolute;
  104. top: 0.44rem;
  105. left: 0.3rem;
  106. }
  107. .point-index .background .avatar img {
  108. width: 100%;
  109. height: 100%;
  110. border-radius: 0.55rem;
  111. }
  112. .point-index .background .name {
  113. height: 0.45rem;
  114. font-size: 0.32rem;
  115. font-family: PingFangSC-Medium, PingFang SC;
  116. font-weight: 500;
  117. color: #ffffff;
  118. line-height: 0.45rem;
  119. position: absolute;
  120. top: 0.75rem;
  121. left: 1.6rem;
  122. }
  123. .point-index .container {
  124. margin-top: -1.5rem;
  125. width: 100%;
  126. padding: 0 4vw;
  127. box-sizing: border-box;
  128. display: flex;
  129. flex-direction: column;
  130. z-index: 99;
  131. }
  132. .point-index .container .banner {
  133. width: 100%;
  134. height: 26.66vw;
  135. background: #ffffff;
  136. box-shadow: 0px 2px 10px 5px rgba(227, 227, 227, 0.5);
  137. border-radius: 20px;
  138. display: flex;
  139. flex-direction: row;
  140. justify-content: space-around;
  141. align-items: center;
  142. background: url("../../static/personal/banner@2x.png") no-repeat 0px 0px;
  143. background-size: 100% 100%;
  144. }
  145. .point-index .container .menu {
  146. display: flex;
  147. flex-direction: column;
  148. margin-top: 0.4rem;
  149. width: 6.9rem;
  150. background: #ffffff;
  151. box-shadow: 0rem 0.02rem 0.07rem 0.05rem rgba(243, 243, 243, 0.5);
  152. border-radius: 0.14rem;
  153. }
  154. .point-index .container .menu .item {
  155. box-sizing: border-box;
  156. padding: 0.36rem 0.3rem;
  157. display: flex;
  158. justify-content: space-between;
  159. border-bottom: 1px solid #eeeeee;
  160. }
  161. .point-index .container .menu .item div {
  162. display: flex;
  163. }
  164. .point-index .container .menu .item div .icon {
  165. width: 0.45rem;
  166. height: 0.38rem;
  167. background: url("~static/personal/vip@2x.png") no-repeat 0px 0px;
  168. background-size: 100% 100%;
  169. }
  170. .point-index .container .menu .item:nth-child(2) div .icon {
  171. background: url("~static/personal/bianpinghuatubiaosheji-@2x.png") no-repeat 0px 0px;
  172. background-size: 100% 100%;
  173. }
  174. .point-index .container .menu .item:nth-child(3) div .icon {
  175. background: url("~static/personal/bianpinghuatubiaosheji-@2x.png") no-repeat 0px 0px;
  176. background-size: 100% 100%;
  177. }
  178. .point-index .container .menu .item:nth-child(4) div .icon {
  179. background: url("~static/personal/jifen@2x.png") no-repeat 0px 0px;
  180. background-size: 100% 100%;
  181. }
  182. .point-index .container .menu .item:nth-child(5) div .icon {
  183. background: url("~static/personal/youjia@2x.png") no-repeat 0px 0px;
  184. background-size: 100% 100%;
  185. }
  186. .point-index .container .menu .item div .text {
  187. height: 0.4rem;
  188. font-size: 0.28rem;
  189. font-family: PingFangSC-Regular, PingFang SC;
  190. font-weight: 400;
  191. color: #111111;
  192. line-height: 0.4rem;
  193. margin-left: 0.19rem;
  194. }
  195. .point-index .container .menu .item .go {
  196. color: #666666;
  197. }
  198. </style>