// import payIcon from '../static/images/hint.png';
import payIcon from '../static/images/pay-success.png';
import { mapState } from 'vuex';
import uni from '@/utils/uniHooks';

export default {
  onLoad(params) {
    const parkInfo = JSON.parse(uni.getStorageSync('parkinfo'));
    this.carno = params.carno;
    if (parkInfo && parkInfo.outParkCharging) {
      this.outParkCharging = parkInfo.outParkCharging;
    }
  },
  data() {
    return {
      vehicleNo: '',
      outParkCharging: 15,
      blueIcon: this.$picUrl + '/images/icon-success-blue.png',
      greenIcon: this.$picUrl + '/images/icon-success-green.png',
    };
  },
  computed: {
    ...mapState({
      custTypeId: (state) => state.custTypeId,
    }),
    icon() {
      return payIcon
      /*return this.custTypeId === 0
        ? payIcon
        : this.custTypeId === 1
        ? this.blueIcon
        : this.greenIcon;*/
    },
  },
  mounted() {
    setTimeout(() => {
      uni.setNavigationBarTitle({
        title: '提示',
      });
    }, 300);
    setTimeout(() => {
      window?.toWXSendMsg({
        type: 'uni_func',
        funcName: 'setNavigationBarColor',
        options: {
          frontColor: '#000000',
          backgroundColor: '#FBFCFF',
        },
      });
    }, 500)
    if ( this.$router.query?.vehicleNo ) {
      this.vehicleNo = this.$route.query.vehicleNo  
    }
  },
  methods: {
    page_button() {
      this.$router.replace({
        path: 'parkingFeeList',
      });
    },
    page_button1() {
      this.$router.replace({
        path: 'home',
      });
    },
  },
};
