index.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  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. <router-link to="/charge/amount" class="item">
  13. <div>
  14. <div class="icon"></div>
  15. <div class="text">余额明细</div>
  16. </div>
  17. <div class="go">></div>
  18. </router-link>
  19. <router-link to="/point/bill" class="item">
  20. <div>
  21. <div class="icon"></div>
  22. <div class="text">积分明细</div>
  23. </div>
  24. <div class="go">></div>
  25. </router-link>
  26. <router-link to="/point/list" class="item">
  27. <div>
  28. <div class="icon"></div>
  29. <div class="text">积分订单</div>
  30. </div>
  31. <div class="go">></div>
  32. </router-link>
  33. <!--
  34. <div class="item">
  35. <div>
  36. <div class="icon"></div>
  37. <div class="text">积分商城</div>
  38. </div>
  39. <div class="go">></div>
  40. </div>
  41. <div class="item">
  42. <div>
  43. <div class="icon"></div>
  44. <div class="text">今日油价</div>
  45. </div>
  46. <div class="go">></div>
  47. </div>
  48. -->
  49. </div>
  50. </div>
  51. </div>
  52. </template>
  53. <script>
  54. import ProductList from "../../components/ProductList";
  55. import { mapState, mapActions } from "vuex";
  56. export default {
  57. head() {
  58. return {
  59. title: "个人中心",
  60. };
  61. },
  62. data() {
  63. return {
  64. images: [],
  65. list: [],
  66. loading: false, // 加载状态
  67. finished: false, // 是否完成加载
  68. refreshing: false, // 是否正在上拉刷新
  69. };
  70. },
  71. components: {
  72. ProductList,
  73. },
  74. computed: {
  75. ...mapState({
  76. pointInfo: (state) => state.point.pointInfo,
  77. }),
  78. },
  79. mounted() {
  80. // this.getPointInfo();
  81. },
  82. methods: {
  83. ...mapActions({
  84. getPointInfo: "point/getPointInfo",
  85. }),
  86. },
  87. };
  88. </script>
  89. <style>
  90. .point-index {
  91. position: relative;
  92. }
  93. .point-index .background {
  94. background-color: #f3b335;
  95. width: 7.5rem;
  96. height: 49.46vw;
  97. position: relative;
  98. background: url("../../static/personal/bj@2x.png") no-repeat 0px 0px;
  99. background-size: 100% 100%;
  100. z-index: -1;
  101. }
  102. .point-index .background .avatar {
  103. width: 1.1rem;
  104. height: 1.1rem;
  105. position: absolute;
  106. top: 0.44rem;
  107. left: 0.3rem;
  108. }
  109. .point-index .background .avatar img {
  110. width: 100%;
  111. height: 100%;
  112. border-radius: 0.55rem;
  113. }
  114. .point-index .background .name {
  115. height: 0.45rem;
  116. font-size: 0.32rem;
  117. font-family: PingFangSC-Medium, PingFang SC;
  118. font-weight: 500;
  119. color: #ffffff;
  120. line-height: 0.45rem;
  121. position: absolute;
  122. top: 0.75rem;
  123. left: 1.6rem;
  124. }
  125. .point-index .container {
  126. margin-top: -1.5rem;
  127. width: 100%;
  128. padding: 0 4vw;
  129. box-sizing: border-box;
  130. display: flex;
  131. flex-direction: column;
  132. z-index: 99;
  133. }
  134. .point-index .container .banner {
  135. width: 100%;
  136. height: 26.66vw;
  137. background: #ffffff;
  138. box-shadow: 0px 2px 10px 5px rgba(227, 227, 227, 0.5);
  139. border-radius: 20px;
  140. display: flex;
  141. flex-direction: row;
  142. justify-content: space-around;
  143. align-items: center;
  144. background: url("../../static/personal/banner@2x.png") no-repeat 0px 0px;
  145. background-size: 100% 100%;
  146. }
  147. .point-index .container .menu {
  148. display: flex;
  149. flex-direction: column;
  150. margin-top: 0.4rem;
  151. width: 6.9rem;
  152. background: #ffffff;
  153. box-shadow: 0rem 0.02rem 0.07rem 0.05rem rgba(243, 243, 243, 0.5);
  154. border-radius: 0.14rem;
  155. }
  156. .point-index .container .menu .item {
  157. box-sizing: border-box;
  158. padding: 0.36rem 0.3rem;
  159. display: flex;
  160. justify-content: space-between;
  161. border-bottom: 1px solid #eeeeee;
  162. }
  163. .point-index .container .menu .item div {
  164. display: flex;
  165. }
  166. .point-index .container .menu .item div .icon {
  167. width: 0.45rem;
  168. height: 0.38rem;
  169. background: url("~static/personal/vip@2x.png") no-repeat 0px 0px;
  170. background-size: 100% 100%;
  171. }
  172. .point-index .container .menu .item:nth-child(2) div .icon {
  173. background: url("~static/personal/huiyuan-2@2x.png") no-repeat 0px 0px;
  174. background-size: 100% 100%;
  175. }
  176. .point-index .container .menu .item:nth-child(3) div .icon {
  177. background: url("~static/personal/bianpinghuatubiaosheji-@2x.png") no-repeat
  178. 0px 0px;
  179. background-size: 100% 100%;
  180. }
  181. .point-index .container .menu .item:nth-child(4) div .icon {
  182. background: url("~static/personal/jifen@2x.png") no-repeat 0px 0px;
  183. background-size: 100% 100%;
  184. }
  185. .point-index .container .menu .item:nth-child(5) div .icon {
  186. background: url("~static/personal/youjia@2x.png") no-repeat 0px 0px;
  187. background-size: 100% 100%;
  188. }
  189. .point-index .container .menu .item div .text {
  190. height: 0.4rem;
  191. font-size: 0.28rem;
  192. font-family: PingFangSC-Regular, PingFang SC;
  193. font-weight: 400;
  194. color: #111111;
  195. line-height: 0.4rem;
  196. margin-left: 0.19rem;
  197. }
  198. .point-index .container .menu .item .go {
  199. color: #666666;
  200. }
  201. </style>