Blame view

src/views/cards/buyCardDetail.vue 2.63 KB
5e52ed7c   刘淇   个人中心
1
2
3
4
5
6
7
8
9
10
11
12
  <template>
    <section class="">
      <div class="vipCardBg">
        <ul class="cardTypeList">
          <li>年卡</li>
          <li>月卡</li>
          <li>半年卡</li>
        </ul>
  
        <div class="van-ellipsis" style="padding: 20px 0  10px 20px">万达停车场plName</div>
        <div class="van-ellipsis" style="padding: 0 0  0 20px">万达停车场plAddress</div>
      </div>
e7ca4bcb   刘淇   会员卡
13
      <van-cell-group inset style="margin-bottom: 10px;" v-for="i in list" @click="LinkBuyCard">
5e52ed7c   刘淇   个人中心
14
15
16
17
18
        <van-cell >
          <template #title>
            <span style="font-size: 20px;font-weight: 600;">年卡</span>
          </template>
        </van-cell>
e7ca4bcb   刘淇   会员卡
19
        <van-cell :title= "i.cardName" center value="立即购买" :label="'单价:'+(i.actPrice/100).toFixed(2)"  is-link>
5e52ed7c   刘淇   个人中心
20
21
22
        </van-cell>
      </van-cell-group>
  
e7ca4bcb   刘淇   会员卡
23
24
25
26
27
28
29
30
31
      <!--<van-cell-group inset style="margin-bottom: 10px;">-->
        <!--<van-cell >-->
          <!--<template #title>-->
            <!--<span style="font-size: 20px;font-weight: 600;">年卡</span>-->
          <!--</template>-->
        <!--</van-cell>-->
        <!--<van-cell title="万达月卡cardName" center value="立即购买" label="单价:¥1800.00"  is-link>-->
        <!--</van-cell>-->
      <!--</van-cell-group>-->
5e52ed7c   刘淇   个人中心
32
33
34
35
36
    </section>
  
  </template>
  
  <script>
e7ca4bcb   刘淇   会员卡
37
38
  
  import { queryVipCardByPlNo } from "@/api/card/card";
5e52ed7c   刘淇   个人中心
39
40
  export default {
    name: "buyCardDetail",
e7ca4bcb   刘淇   会员卡
41
42
43
44
45
46
47
48
49
50
51
    data(){
      return{
        plNo:'',
        list:[]
      }
    },
    created(){
      this.plNo = this.$route.query.plNo
      console.log(this.plNo)
      this.queryVipCardByPlNo()
    },
5e52ed7c   刘淇   个人中心
52
53
54
55
56
57
58
  
    methods:{
      LinkBuyCard(){
        this.$router.push({
            name: "buyVipCard"
          }
        );
e7ca4bcb   刘淇   会员卡
59
60
61
62
63
64
65
66
67
68
69
70
71
      },
      queryVipCardByPlNo() {
        let jsondata = {
          parkNo:this.plNo,
          saleChannel: "2"
        };
        jsondata.sign = this.$utils.signObject(jsondata);
        queryVipCardByPlNo(jsondata).then(response => {
          // console.log(response.data[0].parkList);
  
          console.log(response);
          this.list = response.data
        });
5e52ed7c   刘淇   个人中心
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
      }
    }
  };
  </script>
  
  <style scoped lang="less">
    .vipCardBg {
      margin-top: 14px;
      margin-left: 10px;
      margin-right: 10px;
      margin-bottom: 10px;
      /* width: 100%; */
      height: 150px;
      background-image: url('../../assets/images/cards/vipcardbg.png');
      background-repeat: no-repeat;
      /* background-position: center center; */
      background-size: 100% 100%;
      -moz-background-size: 100% 100%;
      font-size: 16px;
      color: #fff;
    }
  
    .cardTypeList {
      padding: 20px 0 10px 20px;
      overflow: hidden;
      > li {
        float: left;
        margin-right: 10px;
        padding: 2px 20px;
        border-radius: 10px;
        background: rgba(255, 255, 255, .3);
      }
    }
  </style>