index.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  1. <template>
  2. <div class="point-index">
  3. <div class="bg">
  4. <div class="top">
  5. <nuxt-link class="text" to="/point/list" tag="h4">我的积分</nuxt-link>
  6. <h2 class="point">{{this.pointInfo.points}}</h2>
  7. <div class="earn">
  8. <div>赚积分</div>
  9. </div>
  10. </div>
  11. </div>
  12. <div class="container">
  13. <div class="menu">
  14. <nuxt-link class="item item1" to="/point/shop" tag="div">
  15. <img src="../../static/point/shangcheng.png" alt="" />
  16. <span>积分商城</span>
  17. </nuxt-link>
  18. <nuxt-link class="item item2" to="/point/bill" tag="div">
  19. <img src="../../static/point/mingxi.png" alt="" />
  20. <span>积分明细</span>
  21. </nuxt-link>
  22. <nuxt-link class="item item3" to="/point/list" tag="div">
  23. <img src="../../static/point/dingdan.png" alt="" />
  24. <span>积分订单</span>
  25. </nuxt-link>
  26. </div>
  27. <nuxt-link class="news" to="/point/shop" tag="div">
  28. <!-- <img src="../../static/test/new.png" alt="" /> -->
  29. <span class="title">积分商城上线啦!</span>
  30. <span class="des">多重好礼等着你</span>
  31. </nuxt-link>
  32. <div class="show">
  33. <product-list />
  34. </div>
  35. </div>
  36. </div>
  37. </template>
  38. <script>
  39. import ProductList from "../../components/ProductList";
  40. import { mapState, mapActions } from "vuex"
  41. export default {
  42. head() {
  43. return {
  44. title: "积分主页",
  45. };
  46. },
  47. data() {
  48. return {
  49. images: [],
  50. list: [],
  51. loading: false, //加载状态
  52. finished: false, //是否完成加载
  53. refreshing: false, //是否正在上拉刷新
  54. };
  55. },
  56. components: {
  57. ProductList,
  58. },
  59. computed:{
  60. ...mapState({
  61. pointInfo:state=>state.point.pointInfo
  62. })
  63. },
  64. mounted() {
  65. this.getPointInfo();
  66. },
  67. methods: {
  68. ...mapActions({
  69. getPointInfo:"point/getPointInfo"
  70. })
  71. },
  72. };
  73. </script>
  74. <style>
  75. .point-index {
  76. position: relative;
  77. }
  78. .point-index .bg {
  79. background-color: #f3b335;
  80. width: 7.5rem;
  81. height: 3.72rem;
  82. position: relative;
  83. background: url("../../static/point/bj.png") no-repeat 0px 0px;
  84. background-size: 100% 100%;
  85. z-index: -1;
  86. }
  87. .point-index .bg .top .text {
  88. position: absolute;
  89. left: 4vw;
  90. top: 8vw;
  91. margin: 0;
  92. padding: 0;
  93. height: 0.4rem;
  94. font-size: 0.28rem;
  95. font-family: PingFangSC-Regular, PingFang SC;
  96. font-weight: 400;
  97. color: #ffffff;
  98. line-height: 0.4rem;
  99. }
  100. .point-index .bg .top .point {
  101. position: absolute;
  102. margin: 0;
  103. padding: 0;
  104. left: 4vw;
  105. top: 15.33vw;
  106. width: 36vw;
  107. height: 16.8vw;
  108. font-size: 12vw;
  109. font-family: PingFangSC-Regular, PingFang SC;
  110. font-weight: 400;
  111. color: #ffffff;
  112. line-height: 14vw;
  113. }
  114. .point-index .bg .earn {
  115. position: absolute;
  116. right: 0;
  117. top: 20.66vw;
  118. width: 1.6rem;
  119. height: 0.55rem;
  120. font-size: 3.46vw;
  121. font-family: PingFangSC-Regular, PingFang SC;
  122. font-weight: 400;
  123. background: url("../../static/point/jifen.png") no-repeat;
  124. background-size: cover;
  125. box-sizing: border-box;
  126. }
  127. .point-index .bg .earn div {
  128. position: absolute;
  129. top: 1.5vw;
  130. right: 2vw;
  131. height: 4.93vw;
  132. font-size: 3.46vw;
  133. font-family: PingFangSC-Regular, PingFang SC;
  134. font-weight: 400;
  135. color: #f3b235;
  136. line-height: 4.93vw;
  137. }
  138. .point-index .container {
  139. margin-top: -13.33vw;
  140. width: 100%;
  141. padding: 0 4vw;
  142. box-sizing: border-box;
  143. display: flex;
  144. flex-direction: column;
  145. z-index: 99;
  146. }
  147. .point-index .container .menu {
  148. width: 100%;
  149. height: 26.66vw;
  150. background: #ffffff;
  151. box-shadow: 0px 2px 10px 5px rgba(227, 227, 227, 0.5);
  152. border-radius: 20px;
  153. display: flex;
  154. flex-direction: row;
  155. justify-content: space-around;
  156. align-items: center;
  157. }
  158. .point-index .container .menu .item {
  159. width: 14.93vw;
  160. height: 14.93vw;
  161. }
  162. .point-index .container .menu .item img {
  163. display: block;
  164. width: 12vw;
  165. height: 12vw;
  166. margin: 0 auto;
  167. }
  168. .point-index .container .menu .item span {
  169. display: inline-block;
  170. font-family: PingFangSC-Regular, PingFang SC;
  171. font-weight: 400;
  172. color: #666666;
  173. text-align: center;
  174. margin-top: 3vw;
  175. width: 1.3rem;
  176. height: 0.4rem;
  177. font-size: 0.28rem;
  178. font-family: PingFangSC-Regular, PingFang SC;
  179. font-weight: 400;
  180. color: #666666;
  181. line-height: 0.4rem;
  182. }
  183. .point-index .container .news {
  184. margin-top: 4vw;
  185. width: 100%;
  186. height: 21.33vw;
  187. background: url("../../static/point/banner.png") no-repeat;
  188. background-size: 100% 100%;
  189. position: relative;
  190. }
  191. .point-index .container .news img {
  192. width: 100%;
  193. height: 100%;
  194. }
  195. .point-index .container .news .title{
  196. font-size:.4rem;
  197. color:#f9f9e5;
  198. font-weight:700;
  199. position: absolute;
  200. left:.75rem;
  201. top:.38rem;
  202. }
  203. .point-index .container .news .des{
  204. font-size:.24rem;
  205. color:#f9d996;
  206. font-weight:600;
  207. position: absolute;
  208. left:2.2rem;
  209. top:.9rem;
  210. }
  211. </style>