import uni from "@/utils/uniHooks";
import { mapState } from 'vuex';
// const app = getApp()
const app = {};
export default {
  onLoad(params) {
    this.carno = params.carno;
  },
  data() {
    return {
      carno: '',
      picUrl: this.$picUrl,
      colorAry: ['blue', 'green'],
    };
  },
  computed: {
    ...mapState({
      custTypeId: (state) => state.custTypeId,
    }),
  },
  mounted() {
    setTimeout(() => {
      uni.setNavigationBarTitle({
        title: '提示',
      });
    }, 300);
    setTimeout(() => {
      window?.toWXSendMsg({
        type: 'uni_func',
        funcName: 'setNavigationBarColor',
        options: {
          frontColor: '#000000',
          backgroundColor: '#FBFCFF',
        },
      });
    }, 500)
  },
  methods: {
    search() {
      this.$router.back();
      // const params = {
      // 	carno: this.carno,
      // 	mallid: app.globalData.mallid,
      // 	openid: app.globalData.openId,
      // 	vipcode: app.globalData.member.vipcode,
      //   groupId: app.globalData.groupId,
      //   createuser: "sys_miniprogram",
      // }
      // this.$md(params)
      // uni.request({
      // 	url: this.$baseURL + 'api/1.0/park/checkCarIsInPark',
      // 	data: params,
      // 	method: 'POST',
      // 	header: JSON.parse(uni.getStorageSync('handleUser')),
      // 	success: (res) => {
      // 		uni.hideLoading();
      // 		if (res.data.code === 0) {
      // 			this.$router.push({
      // 				path: '../parkingFeeDetail?carno=' + this.carno
      // 			})
      // 		}
      // 	}
      // });
    },
  },
};
