Blame view

src/views/cards/ownCards.vue 3.47 KB
552b3337   刘淇   我已经购买会员卡
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
  <template>
    <section class="commonPagePadding">
      <ul class="cardListWrap">
        <li class="cardMain" v-for="(i,index) in mycardlist" @click="gotoNextPay(i)" :key="index">
          <p class="cardTags">
            <span>{{i.cardType | cardType}}</span>
            <span>{{i.carType | carType}}</span>
          </p>
  
          <p class="cardCarNum">{{i.carNumber}}</p>
          <p>{{i.parkName}}</p>
          <p class="cardDate">有效期:{{i.effDate}} 至 {{i.expDate}}</p>
          <div class="renewBtn">续费</div>
        </li>
      </ul>
  
      <!--<div style="text-align: center;padding-top: 60px;">-->
      <!--<van-image :src="require('../../assets/images/cards/novipcard.png')"></van-image>-->
      <!--<p>暂无购买会员卡记录</p>-->
      <!--</div>-->
    </section>
  </template>
  
  <script>
  import { queryVipCardsByCustId } from "@/api/card/card";
  export default {
    name: "ownCards",
    data() {
      return {
        mycardlist: [{
          "cardName": "测试1",
          "parkName": "东济路",
          "num": 1,
          "discount": "1.0",
          "invoiceState": "0",
          "useType": "1",
          "cardNo": "V1123900924620210176",
          "expDate": "2023-07-28",
          "effDate": "2023-06-29",
          "carType": "2",
          "payType": "12",
          "price": "100",
          "isSupportRenew": "1",
          "cardStatus": "2",
          "parkNo": "P15040000000018",
          "payFinishTime": "2023-06-29 09:01:37",
          "cardType": "4",
          "orderPayedFee": "10",
          "custCardNo": "7011123901072930799616",
          "carNumber": "苏B13ERR",
          "parkAddr": "江阴市江阴高新技术产业开发区东济路",
          "totalAmount": "100",
          "saleChannel": "4",
          "custCardId": "4493",
          "actPrice": "100"
        }]
      };
    },
    created() {
      this.queryVipCardsByCustId();
    },
    methods: {
      queryVipCardsByCustId() {
        let jsondata = {
          saleChannel: "2"
        };
        jsondata.sign = this.$utils.signObject(jsondata);
        queryVipCardsByCustId(jsondata).then(response => {
          console.log(response);
          // this.mycardlist = response.data
        });
      },
      gotoNextPay(i) {
        this.$router.push({
            name: "buyVipCard",
            query: {
              cardName: i.cardName,
              carType: i.carType,
              cardType: i.cardType,
              actPrice: i.actPrice,
              discValue: i.discValue,
              plName: i.parkName,
              plAddress: i.parkAddr,
              plNo: i.parkNo,
              cardNo: i.cardNo,
              carNumber: i.carNumber,
              effDate: i.effDate,
              expDate: i.expDate,
              orderPayedFee: i.orderPayedFee
            }
          }
        );
      }
    }
  };
  </script>
  
  <style scoped lang="less">
    .cardMain {
      height: 190px;
      padding: 20px;
      margin-top: 10px;
      position: relative;
      background: url("../../assets/images/cards/myvipcardBg.png") no-repeat;
      background-size: 100% 100%;
      color: #fff;
    }
  
    .cardTags {
      span {
        padding: 2px 25px;
        border-radius: 15px;
        background: rgba(255, 255, 255, .3);
        margin-right: 10px;
        font-size: 12px;
  
      }
    }
  
    .cardCarNum {
      padding: 20px 0 2px;
      font-size: 22px;
      font-weight: 600;
    }
  
    .cardDate {
      padding-top: 34px;
    }
  
    .renewBtn {
      width: 80px;
      height: 35px;
      line-height: 35px;
      text-align: center;
      position: absolute;
      right: 70px;
      top: 50%;
      transform: translateY(-50%);
      background: url("../../assets/images/cards/vipcardbtnBg.png") no-repeat;
    }
  </style>