Blame view

src/views/cards/Cards.vue 2.33 KB
8b40a4fc   刘淇   会员卡
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
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
  <template>
    <div style="height: 100%;display: flex;flex-direction: column;">
      <div style="flex: 1;overflow-y: auto;padding: 15px">
        <div v-if="cardList.length == 0" class="noCardData">
          <p>您目前没有任何会员卡,</p>
          <p>请绑定车牌通过认证后再购买会员卡!</p>
        </div>
        <div class="cardBg">
          <ul class="cardList">
            <li>
              会员卡- 月卡
            </li>
            <li>
              绑定车牌号: 京A12312
            </li>
            <li>
              有效时间段: 2021-11-11 至 2021-12-10
            </li>
            <li>
              适用停车场: 万达停车场
            </li>
          </ul>
        </div>
        <div class="cardBg">
          <ul class="cardList">
            <li>
              会员卡- 月卡
            </li>
            <li>
              绑定车牌号: 京A12312
            </li>
            <li>
              有效时间段: 2021-11-11 至 2021-12-10
            </li>
            <li>
              适用停车场: 万达停车场
            </li>
          </ul>
        </div>
      </div>
      <x-button type="primary" @click.native="$router.push({path:'CardList'})">购买会员卡</x-button>
    </div>
  </template>
  
  <script>
  import { queryVipCardsByCustId } from "@/api/cards/cards";
  export default {
    name: "Cards",
    data() {
      return {
        cardList: []
      };
    },
    mounted() {
      this.queryVipCardsByCustId();
    },
    methods: {
      queryVipCardsByCustId: function() {
        let jsondata = this.$utils.commonParams();
        jsondata.sign = this.$utils.signObject(jsondata);
        queryVipCardsByCustId(jsondata).then(data => {
          console.log(data);
          if (data.code == 0) {
            let res = data.data;
          } else {
            this.$vux.toast.text(data.message, "top");
          }
        });
      }
    }
  };
  </script>
  
  <style scoped lang="scss">
    .noCardData {
      padding-top: 130px;
      background: url("../../assets/images/cards/nodata.png") no-repeat center 0;
      background-size: 121px 100px;
      text-align: center;
    }
  
    .cardBg {
      width: 100%;
      height: 150px;
      background: #26a2ff url("../../assets/images/cards/cards.png") no-repeat 20px 20px;
      background-size: 90% 90%;
      border-radius: 8px;
      margin-bottom: 15px;
    }
    .cardList{
      padding: 20px 0 0 20px;
      color: #fff;
      li{
        line-height: 30px;
      }
    }
  
  </style>