123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153 |
- import uniPop from '@/components/uni-popup/uni-popup.vue';
- import { Dialog } from 'vant';
- import LoginDom from '@/components/Login/Login.vue';
- import {initWxJsSdkConfig} from '@/utils/login';
- // const app = getApp()
- const app = {};
- import {
- kipGetMemberVehicles,
- kipDeleteMemberVehicles,
- } from '@/utils/api-kip.js';
- import { LICENSE_PLATE_TYPE_ARR } from '@/constants.js';
- import { mapState } from 'vuex';
- // import authorize from '@/components/authorize/authorize.vue';
- import { isCruMarketByKey } from '@/utils/location-util.js';
- import MemberCacheTool from '@/utils/member-cache-tool.js';
- import { REG_SOURCE } from '@/constants.js';
- import uni from '@/utils/uniHooks.js';
- // import { vehicles as vehiclesList } from './list';
- import { wxToLoginCallback, isHZ } from '@/utils/index';
- import { Toast } from 'vant';
- import { getVehicles, delVehicle, parkingLots , getCarInformation} from '@/api/parking/index'
- export default {
- components: {
- uniPop,
- // authorize,
- LoginDom,
- },
- computed: {
- ...mapState({
- custTypeId: (state) => state.custTypeId,
- member: (state) => state.member,
- groupId: (state) => state.groupId,
- openid: (state) => state.openid,
- mallid: (state) => state.mallId,
- mobile: (state) => state.mobile,
- kipUserId: (state) => state.kipUserId,
- isLogin: (state) => state.isLogin,
- }),
- isNoLogin() {
- return JSON.stringify(this.member) === '{}'
- },
- isHZ() {
- return isHZ(this.mallid)
- }
- },
- data() {
- return {
- list: [],
- activeId: '',
- activeCarno: '',
- licensePlateList: [],
- isBeijing: false,
- options: null,
- preUrl: '',
- deleteDialogSwitch: false,
- deleteSuccessDialogSwitch: false,
- show: false, // 删除车牌时提示内容
- parkingLotsInfo: {},
- enableDiscountVehicle: false,
- dataObject: {
- vehicleNo: '',
- area: '',
- spaceNo: '',
- floorName: '',
- carImage: '',
- parkId: ''
- }
- };
- },
- async created() {
- this.options = this.$route.query;
- // this.parkingLots()
- },
- async mounted() {
- this.$nextTick(()=>{
- this.getCarInformations(this.options.vehicleNo)
- })
- await initWxJsSdkConfig(['checkJsApi', 'scanQRCode']);
- setTimeout(() => {
- uni.setNavigationBarTitle({
- title: '反向寻车',
- });
- }, 300);
- // setTimeout(() => {
- // window?.toWXSendMsg({
- // type: 'uni_func',
- // funcName: 'setNavigationBarColor',
- // options: {
- // frontColor: '#000000',
- // backgroundColor: '#FBFCFF',
- // },
- // });
- // }, 500)
- },
- onUnload() {
- // #ifdef MP-WEIXIN
- var pages = getCurrentPages();
- var prevPage = pages[pages.length - 2];
- console.log('==> 车牌管理-返回上一页');
- prevPage.setData({
- parkData: 'parkData',
- });
- // #endif
- // #ifdef H5
- uni.setStorage({
- key: 'parkData',
- data: 'parkData',
- success: function () {
- console.log('parkData-success');
- },
- });
- // #endif
- },
- methods: {
- // 获取反向寻车信息
- async getCarInformations(carNum) {
- const res = await getCarInformation(carNum)
- if (res.data) {
- this.dataObject = res.data
- }
- },
- isQHKC() {
- const lbsList = ['8a88a9fd7f73ffcd017f968739870006','8a8486a37f48f7bd017f4e5bddd10000','8a8486a37f48f7bd017f4e5bddd10000', '8aaa82ea804d07cd0180516ff03b0008']
- return lbsList.indexOf(this.mallid) > -1
- },
- findcarNum (){
- // 如果是北京的ETCP 微信支付宝通用版
- // if (this.isQHKC()) {
- wx.miniProgram.navigateTo({
- url: `../package-parkingFee/findCar?lotId=${encodeURIComponent(
- this.dataObject.parkId
- )}&parkNo=${encodeURIComponent(
- this.dataObject.spaceNo
- )}&carNo=${encodeURIComponent(
- this.dataObject.vehicleNo
- )}`,
- complete: function (res) {
- console.log('回调::', res)
- },
- success: function (res) {
- console.log('跳转成功::', res)
- },
- fail: function (err) {
- console.log('跳转失败::', res)
- }
- });
- // this.$router.back()
- return
- // }
- },
- },
- };
|