ownCards.vue 3.54 KB
<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.discount,
            plName: i.parkName,
            plAddress: i.parkAddr,
            plNo: i.parkNo,
            cardNo: i.cardNo,
            carNumber: i.carNumber,
            effDate: i.effDate,
            expDate: i.expDate,
            orderPayedFee: i.orderPayedFee,
            custCardNo: i.custCardNo,
            xufeiFlag: 2
          }
        }
      )
      ;
    }
  }
};
</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>