index.vue 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  1. <template>
  2. <div class="point-index">
  3. <div class="background">
  4. <div class="top">
  5. <nuxt-link class="text" to="/point/list" tag="h4">我的积分</nuxt-link>
  6. <h2 class="point">999</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. </nuxt-link>
  30. <div class="show">
  31. <product-list />
  32. </div>
  33. </div>
  34. </div>
  35. </template>
  36. <script>
  37. import ProductList from "../../components/ProductList";
  38. export default {
  39. head() {
  40. return {
  41. title: "积分主页",
  42. };
  43. },
  44. data() {
  45. return {
  46. images: [],
  47. list: [],
  48. loading: false, //加载状态
  49. finished: false, //是否完成加载
  50. refreshing: false, //是否正在上拉刷新
  51. };
  52. },
  53. components: {
  54. ProductList,
  55. },
  56. beforeCreate() {},
  57. created() {},
  58. beforeMount() {},
  59. mounted() {
  60. // this.$axios.$get("/getCustomerPointsInfo", {
  61. // params: {
  62. // unionId: this.$store.state.anthen.unionId,
  63. // stationId: this.$store.state.anthen.stationId,
  64. // },
  65. // }).then((res)=>{
  66. // console.log(res)
  67. // });
  68. },
  69. beforeUpdate() {},
  70. updated() {},
  71. beforeDestroy() {},
  72. destroyed() {},
  73. methods: {
  74. // onLoad() {
  75. // var that = this;
  76. // that.$axios
  77. // .get("/getIntegralWaresInfoList", {
  78. // params: {
  79. // stationId: "1",
  80. // },
  81. // })
  82. // .then((res) => {
  83. // if (res.data.retCode == 0) {
  84. // that.list = res.data.data; //追加数据
  85. // // 加载状态结束
  86. // that.loading = false;
  87. // that.finished = true;
  88. // console.log(that.list);
  89. // }
  90. // });
  91. // },
  92. // onRefresh() {
  93. // // 清空列表数据
  94. // that.finished = true;
  95. // // 重新加载数据
  96. // // 将 loading 设置为 true,表示处于加载状态
  97. // that.loading = true;
  98. // that.onLoad();
  99. // },
  100. },
  101. };
  102. </script>
  103. <style>
  104. .point-index {
  105. position: relative;
  106. }
  107. .point-index .background {
  108. background-color: #f3b335;
  109. width: 7.5rem;
  110. height: 49.46vw;
  111. position: relative;
  112. background: url("../../static/point/bj.png") no-repeat 0px 0px;
  113. background-size: 100% 100%;
  114. z-index: -1;
  115. }
  116. .point-index .background .top .text {
  117. position: absolute;
  118. left: 4vw;
  119. top: 8vw;
  120. margin: 0;
  121. padding: 0;
  122. height: 0.4rem;
  123. font-size: 0.28rem;
  124. font-family: PingFangSC-Regular, PingFang SC;
  125. font-weight: 400;
  126. color: #ffffff;
  127. line-height: 0.4rem;
  128. }
  129. .point-index .background .top .point {
  130. position: absolute;
  131. margin: 0;
  132. padding: 0;
  133. left: 4vw;
  134. top: 15.33vw;
  135. width: 36vw;
  136. height: 16.8vw;
  137. font-size: 12vw;
  138. font-family: PingFangSC-Regular, PingFang SC;
  139. font-weight: 400;
  140. color: #ffffff;
  141. line-height: 14vw;
  142. }
  143. .point-index .background .earn {
  144. position: absolute;
  145. right: 0;
  146. top: 20.66vw;
  147. width: 1.6rem;
  148. height: 0.55rem;
  149. font-size: 3.46vw;
  150. font-family: PingFangSC-Regular, PingFang SC;
  151. font-weight: 400;
  152. background: url("../../static/point/jifen.png") no-repeat;
  153. background-size: cover;
  154. box-sizing: border-box;
  155. }
  156. .point-index .background .earn div {
  157. position: absolute;
  158. top: 1.5vw;
  159. right: 2vw;
  160. width: 10.4vw;
  161. height: 4.93vw;
  162. font-size: 3.46vw;
  163. font-family: PingFangSC-Regular, PingFang SC;
  164. font-weight: 400;
  165. color: #f3b235;
  166. line-height: 4.93vw;
  167. }
  168. .point-index .container {
  169. margin-top: -13.33vw;
  170. width: 100%;
  171. padding: 0 4vw;
  172. box-sizing: border-box;
  173. display: flex;
  174. flex-direction: column;
  175. z-index: 99;
  176. }
  177. .point-index .container .menu {
  178. width: 100%;
  179. height: 26.66vw;
  180. background: #ffffff;
  181. box-shadow: 0px 2px 10px 5px rgba(227, 227, 227, 0.5);
  182. border-radius: 20px;
  183. display: flex;
  184. flex-direction: row;
  185. justify-content: space-around;
  186. align-items: center;
  187. }
  188. .point-index .container .menu .item {
  189. width: 14.93vw;
  190. height: 14.93vw;
  191. }
  192. .point-index .container .menu .item img {
  193. display: block;
  194. width: 12vw;
  195. height: 12vw;
  196. margin: 0 auto;
  197. }
  198. .point-index .container .menu .item span {
  199. display: inline-block;
  200. font-family: PingFangSC-Regular, PingFang SC;
  201. font-weight: 400;
  202. color: #666666;
  203. text-align: center;
  204. margin-top: 3vw;
  205. width: 1.3rem;
  206. height: 0.4rem;
  207. font-size: 0.28rem;
  208. font-family: PingFangSC-Regular, PingFang SC;
  209. font-weight: 400;
  210. color: #666666;
  211. line-height: 0.4rem;
  212. }
  213. .point-index .container .news {
  214. margin-top: 4vw;
  215. width: 100%;
  216. height: 21.33vw;
  217. }
  218. .point-index .container .news img {
  219. width: 100%;
  220. height: 100%;
  221. }
  222. </style>