123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212 |
- <template>
- <div class="point-index">
- <div class="bg">
- <div class="top">
- <nuxt-link class="text" to="/point/list" tag="h4">我的积分</nuxt-link>
- <h2 class="point">{{this.pointInfo.points}}</h2>
- <div class="earn">
- <div>赚积分</div>
- </div>
- </div>
- </div>
- <div class="container">
- <div class="menu">
- <nuxt-link class="item item1" to="/point/shop" tag="div">
- <img src="../../static/point/shangcheng.png" alt="" />
- <span>积分商城</span>
- </nuxt-link>
- <nuxt-link class="item item2" to="/point/bill" tag="div">
- <img src="../../static/point/mingxi.png" alt="" />
- <span>积分明细</span>
- </nuxt-link>
- <nuxt-link class="item item3" to="/point/list" tag="div">
- <img src="../../static/point/dingdan.png" alt="" />
- <span>积分订单</span>
- </nuxt-link>
- </div>
- <nuxt-link class="news" to="/point/shop" tag="div">
- <span class="title">积分商城上线啦!</span>
- <span class="des">多重好礼等着你</span>
- </nuxt-link>
- <div class="show">
- <product-list />
- </div>
- </div>
- </div>
- </template>
- <script>
- import ProductList from "../../components/ProductList";
- import { mapState, mapActions } from "vuex"
- export default {
- head() {
- return {
- title: "积分主页",
- };
- },
- data() {
- return {
- images: [],
- list: [],
- loading: false, //加载状态
- finished: false, //是否完成加载
- refreshing: false, //是否正在上拉刷新
- };
- },
- components: {
- ProductList,
- },
- computed:{
- ...mapState({
- pointInfo:state=>state.point.pointInfo
- })
- },
- mounted() {
- this.getPointInfo();
- },
- methods: {
- ...mapActions({
- getPointInfo:"point/getPointInfo"
- })
- },
- };
- </script>
- <style>
- .point-index {
- position: relative;
- }
- .point-index .bg {
- background-color: #f3b335;
- width: 7.5rem;
- height: 3.72rem;
- position: relative;
- background: url("../../static/point/bj.png") no-repeat 0px 0px;
- background-size: 100% 100%;
- z-index: -1;
- }
- .point-index .bg .top .text {
- position: absolute;
- left: 4vw;
- top: 8vw;
- margin: 0;
- padding: 0;
- height: 0.4rem;
- font-size: 0.28rem;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #ffffff;
- line-height: 0.4rem;
- }
- .point-index .bg .top .point {
- position: absolute;
- margin: 0;
- padding: 0;
- left: 4vw;
- top: 15.33vw;
- width: 36vw;
- height: 16.8vw;
- font-size: 12vw;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #ffffff;
- line-height: 14vw;
- }
- .point-index .bg .earn {
- position: absolute;
- right: 0;
- top: 20.66vw;
- width: 1.6rem;
- height: 0.55rem;
- font-size: 3.46vw;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- background: url("../../static/point/jifen.png") no-repeat;
- background-size: cover;
- box-sizing: border-box;
- }
- .point-index .bg .earn div {
- position: absolute;
- top: 1.5vw;
- right: 2vw;
- height: 4.93vw;
- font-size: 3.46vw;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #f3b235;
- line-height: 4.93vw;
- }
- .point-index .container {
- margin-top: -13.33vw;
- width: 100%;
- padding: 0 4vw;
- box-sizing: border-box;
- display: flex;
- flex-direction: column;
- z-index: 99;
- }
- .point-index .container .menu {
- width: 6.9rem;
- height: 1.9rem;
- background: #ffffff;
- box-shadow: 0px 2px 10px 5px rgba(227, 227, 227, 0.5);
- border-radius: 20px;
- display: flex;
- flex-direction: row;
- justify-content: space-around;
- align-items: center;
- text-align:center;
- }
- .point-index .container .menu .item {
- width:1.12rem;
- }
- .point-index .container .menu .item img {
- display: inline-block;
- width: .9rem;
- height: .9rem;
- margin: 0 auto;
- }
- .point-index .container .menu .item span {
- display: inline-block;
- font-weight: 400;
- color: #666666;
- text-align: center;
- margin-top: .2rem;
- height: 0.4rem;
- font-size: 0.26rem;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #666666;
- line-height: 0.4rem;
- }
- .point-index .container .news {
- margin-top: .3rem;
- width: 6.9rem;
- height: 1.6rem;
- background: url("../../static/point/banner.png") no-repeat;
- background-size: 100% 100%;
- position: relative;
- }
- .point-index .container .news img {
- width: 100%;
- height: 100%;
- }
- .point-index .container .news .title{
- font-size:.4rem;
- color:#f9f9e5;
- font-weight:700;
- position: absolute;
- left:.75rem;
- top:.38rem;
- }
- .point-index .container .news .des{
- font-size:.24rem;
- color:#f9d996;
- font-weight:600;
- position: absolute;
- left:2.2rem;
- top:.9rem;
- }
- </style>
|