index.vue 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. <template>
  2. <div class="point-index">
  3. <div class="background">
  4. <div class="avatar">
  5. <img :src="userInfo.headimgurl" alt="" />
  6. </div>
  7. <div class="name">{{userInfo.nickname}}</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,mapGetters } 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. ...mapGetters({
  76. userInfo: "authen/userInfo",
  77. }),
  78. ...mapState({
  79. pointInfo: (state) => state.point.pointInfo,
  80. }),
  81. },
  82. mounted() {
  83. // this.getPointInfo();
  84. console.log(this.userInfo)
  85. },
  86. methods: {
  87. ...mapActions({
  88. getPointInfo: "point/getPointInfo",
  89. }),
  90. },
  91. };
  92. </script>
  93. <style>
  94. .point-index {
  95. position: relative;
  96. }
  97. .point-index .background {
  98. background-color: #f3b335;
  99. width: 7.5rem;
  100. height: 49.46vw;
  101. position: relative;
  102. background: url("../../static/personal/bj@2x.png") no-repeat 0px 0px;
  103. background-size: 100% 100%;
  104. z-index: -1;
  105. }
  106. .point-index .background .avatar {
  107. width: 1.1rem;
  108. height: 1.1rem;
  109. position: absolute;
  110. top: 0.44rem;
  111. left: 0.3rem;
  112. }
  113. .point-index .background .avatar img {
  114. width: 100%;
  115. height: 100%;
  116. border-radius: 0.55rem;
  117. }
  118. .point-index .background .name {
  119. height: 0.45rem;
  120. font-size: 0.32rem;
  121. font-family: PingFangSC-Medium, PingFang SC;
  122. font-weight: 500;
  123. color: #ffffff;
  124. line-height: 0.45rem;
  125. position: absolute;
  126. top: 0.75rem;
  127. left: 1.6rem;
  128. }
  129. .point-index .container {
  130. margin-top: -1.5rem;
  131. width: 100%;
  132. padding: 0 4vw;
  133. box-sizing: border-box;
  134. display: flex;
  135. flex-direction: column;
  136. z-index: 99;
  137. }
  138. .point-index .container .banner {
  139. width: 100%;
  140. height: 26.66vw;
  141. background: #ffffff;
  142. box-shadow: 0px 2px 10px 5px rgba(227, 227, 227, 0.5);
  143. border-radius: 20px;
  144. display: flex;
  145. flex-direction: row;
  146. justify-content: space-around;
  147. align-items: center;
  148. background: url("../../static/personal/banner@2x.png") no-repeat 0px 0px;
  149. background-size: 100% 100%;
  150. }
  151. .point-index .container .menu {
  152. display: flex;
  153. flex-direction: column;
  154. margin-top: 0.4rem;
  155. width: 6.9rem;
  156. background: #ffffff;
  157. box-shadow: 0rem 0.02rem 0.07rem 0.05rem rgba(243, 243, 243, 0.5);
  158. border-radius: 0.14rem;
  159. }
  160. .point-index .container .menu .item {
  161. box-sizing: border-box;
  162. padding: 0.36rem 0.3rem;
  163. display: flex;
  164. justify-content: space-between;
  165. border-bottom: 1px solid #eeeeee;
  166. }
  167. .point-index .container .menu .item div {
  168. display: flex;
  169. }
  170. .point-index .container .menu .item div .icon {
  171. width: 0.45rem;
  172. height: 0.38rem;
  173. background: url("~static/personal/vip@2x.png") no-repeat 0px 0px;
  174. background-size: 100% 100%;
  175. }
  176. .point-index .container .menu .item:nth-child(2) div .icon {
  177. background: url("~static/personal/huiyuan-2@2x.png") no-repeat 0px 0px;
  178. background-size: 100% 100%;
  179. }
  180. .point-index .container .menu .item:nth-child(3) div .icon {
  181. background: url("~static/personal/bianpinghuatubiaosheji-@2x.png") no-repeat
  182. 0px 0px;
  183. background-size: 100% 100%;
  184. }
  185. .point-index .container .menu .item:nth-child(4) div .icon {
  186. background: url("~static/personal/jifen@2x.png") no-repeat 0px 0px;
  187. background-size: 100% 100%;
  188. }
  189. .point-index .container .menu .item:nth-child(5) div .icon {
  190. background: url("~static/personal/youjia@2x.png") no-repeat 0px 0px;
  191. background-size: 100% 100%;
  192. }
  193. .point-index .container .menu .item div .text {
  194. height: 0.4rem;
  195. font-size: 0.28rem;
  196. font-family: PingFangSC-Regular, PingFang SC;
  197. font-weight: 400;
  198. color: #111111;
  199. line-height: 0.4rem;
  200. margin-left: 0.19rem;
  201. }
  202. .point-index .container .menu .item .go {
  203. color: #666666;
  204. }
  205. </style>